All of lore.kernel.org
 help / color / mirror / Atom feed
* force btrfs to release underlying block device(s)
@ 2017-04-01  5:58 Glenn Washburn
  2017-04-01 23:31 ` Duncan
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Washburn @ 2017-04-01  5:58 UTC (permalink / raw)
  To: linux-btrfs

I've run into a frustrating problem with a btrfs volume just now.  I
have a USB drive which has many partitions, two of which are luks
encrypted, which can be unlocked as a single, multi-device btrfs
volume.  For some reason the drive logically disconnected at the USB
protocol level, but not physically.  Then it reconnected.  This caused
the mount point to be removed at the vfs layer, however I could not
close the luks devices.

When looking in /sys/fs/btrfs, I see a directory with the UUID of the
offending volume, which shows the luks devices under the devices
directory.  So I presume the btrfs module is still holding references
to the block devices, not allowing them to be closed.  I know I can do
a "dmsetup remove --force" to force closing the luks devices, but I
doubt that will cause the btrfs module to release the offending block
devices.  So if I do that and then open the luks devices again and try
to remount the btrfs volume, I'm guessing insanity will ensue.

I can't unload/reload the btrfs module because the root fs among others
are using it.  Obviously, I can reboot, but that's a windows solution.
Anyone have a solution to this issue?  Is anyone looking into ways to
prevent this from happening?  I think this situation should be trivial
to reproduce.

Any help would be welcome,
Glenn

PS. I'm on a 4.10 kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-02 14:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-01  5:58 force btrfs to release underlying block device(s) Glenn Washburn
2017-04-01 23:31 ` Duncan
2017-04-02 14:46   ` Dmitrii Tcvetkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.