ZFS on LUKS: shutting down devices fails #18697
Unanswered
grim-ripper
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I was looking around about these error messages that appear in
journalctl:device-mapper: remove ioctl on [...] failed: Device or resource busyThere are also similar messages about
/dev/dm-Xdevices, appearing during shutdown after some delay. They don't appear to be persisted in any logs though. As far as I understand, these are the same Device Mapper devices for LUKS HDDs. The devices in thejournalctlerror messages are in/dev/mapper.I have a
zpoolon these LUKS HDDs, which likely causes them to remain "busy". Here's some discussions about similar situations:Apparently the only way to "close" the
zpoolso that the LUKS devices can be properly closed is toexportthezpool. Which then leads to the necessity of it being scanned again on next startup, because it's removed from import cache. I tried shutting down the NFS server since a filesystem in thezpoolis shared, and alsozfs unmount, but neither had any effect on the aforementioned error messages. Not surprisingly, since thezpool, as far as I understand, remains active.Is this correct? The only working way to "close" the
zpoolso that the devices are no longer "busy" isexport, which then needs an explicitimportinstead of thezpoolcurrently being added back byzfs-import-cache.service? I could add asystemdservice to do theexport, and apparently usingzfs-import-scan.serviceinstead ofzfs-import-cache.servicewould handle importing thezpoolafter it has been exported.I'd like confirmation that this is the correct approach, and that ZFS doesn't provide anything out of the box to suitably "close" the
zpooland free the devices. I´d also like to know more about what difference this makes in terms of data integrity and such.Beta Was this translation helpful? Give feedback.
All reactions