udisks
udisks copied to clipboard
"Error finding object for block device" when unmounting Btrfs drives
Every time I unmount any of my Btrfs-formated external drives I get something like this:
$ umount /run/media/ignacio/External
Error finding object for block device 0:61
Even using umount on the device file directly doesn't work:
$ umount /dev/sdf1
Error finding object for block device 0:61
The only way I can make this work is by using udisksctl -b like this:
$ udisksctl unmount -b /dev/sdf1
Unmounted /dev/sdf1.
umount is unrelated to UDisks, please open an issue on https://github.com/util-linux/util-linux/
umountis unrelated to UDisks, please open an issue on https://github.com/util-linux/util-linux/
I forgot to answer here. This was my first thought as well, but no, this is actually error from our unmount helper called by umount. Unfortunately umount.udisks2 is very basic tool that doesn't work with btrfs (it's completely confused by the major 0 of the device) and will need some work.
Ah, I see that now, totally forgot about the mount helper.
TODO: add umount tests in test_80_filesystem.py, so far we're only testing unmount through the D-Bus API.
The problem with btrfs and device major:minor numbers is this one: https://github.com/storaged-project/udisks/blob/master/src/udisksmountmonitor.c#L504-L553