bcachefs-tools
bcachefs-tools copied to clipboard
Migrating from a filesystem within LUKS fails to find the block device
When trying to migrate a filesystem that is not residing directly in a block device the bcachefs migrate
tool comes back with readlink error while looking up block device: No such file or directory
.
The following mount combinations were tried and didn't work:
- LUKS (
by-uuid
) then btrfs (mapper
) - LUKS (path/
sd*
) then btrfs (mapper
) - LUKS (path/
sd*
) then btrfs (path/dm-*
)
Side question since this problem appeared; Is there any downside to have bcachefs within LUKS?
When I tried to migrate from btrfs, the same error occurred.
This seems to be because btrfs return a "fake" device id, such as https://unix.stackexchange.com/questions/345220/btrfs-how-to-get-real-device-id .
And these device ids not exist in /sys/dev/block
:
https://github.com/koverstreet/bcachefs-tools/blob/61134a06fa714f32a405680d3515af94dfa11d2c/cmd_migrate.c#L50-L56
So it seems that the migrate command does not support btrfs now.