koverstreet / bcachefs-tools

http://bcachefs.org
GNU General Public License v2.0
120 stars 89 forks source link

Can't mount one device fs: Fatal error: No device found from specified parameters #250

Closed marcin-github closed 4 months ago

marcin-github commented 5 months ago

Last working commit: c28af3c0ccdc6

On later commits I can't mount one-device-fs:

# mount /dev/vg-xxF/yyyy /mnt/rdns/
ERROR - bcachefs::commands::cmd_mount: Fatal error: No device found from specified parameters
marcin-github commented 5 months ago

With latest commit I have:

bcachefs (/dev/sdc): error reading default superblock: Not a bcachefs superblock (got magic 00100000-0000-0000-00f0-0f0000000000)
bcachefs (/dev/sdc): error reading superblock: Not a bcachefs superblock layout
bcachefs (/dev/sdd): error reading default superblock: Not a bcachefs superblock (got magic 00100000-0000-0000-00f0-0f0000000000)
bcachefs (/dev/sde): error reading default superblock: Not a bcachefs superblock (got magic 00100000-0000-0000-00f0-0f0000000000)
bcachefs (/dev/sde): error reading superblock: Not a bcachefs superblock layout
bcachefs (/dev/sda): error reading default superblock: Not a bcachefs superblock (got magic 00000000-0000-0000-0000-000000000000)
bcachefs (/dev/sda): error reading superblock: Not a bcachefs superblock layout
bcachefs (/dev/sda1): error reading default superblock: Not a bcachefs superblock (got magic 31d06b00-e831-b0f0-6b01-8dae8a74a732)
bcachefs (/dev/sda1): error reading superblock: Not a bcachefs superblock layout
bcachefs (/dev/sda2): error reading default superblock: Not a bcachefs superblock (got magic 15b9ba4b-93bb-b1ea-7a73-657277657265)
bcachefs (/dev/sda2): error reading superblock: Not a bcachefs superblock layout
bcachefs (/dev/sda3): error reading default superblock: Not a bcachefs superblock (got magic 00100000-0000-0000-00f0-0f0000000000)
bcachefs (/dev/sda3): error reading superblock: Not a bcachefs superblock layout
bcachefs (/dev/sda4): error reading default superblock: Not a bcachefs superblock (got magic 00100000-0000-0000-00f0-0f0000000000)
bcachefs (/dev/sda4): error reading superblock: Not a bcachefs superblock layout
bcachefs (/dev/sdb): error reading default superblock: Not a bcachefs superblock (got magic 00100000-0000-0000-00f0-0f0000000000)
bcachefs (/dev/sdb): error reading superblock: Not a bcachefs superblock layout
bcachefs (/dev/zram0): error reading default superblock: IO error: -5
bcachefs (/dev/zram0): error reading superblock: IO error: -5
bcachefs (/dev/zram1): error reading default superblock: Not a bcachefs superblock (got magic 876dcddb-f41f-9d5f-0000-000000000000)
bcachefs (/dev/zram1): error reading superblock: IO error: -5
bcachefs (/dev/zram2): error reading default superblock: IO error: -5
bcachefs (/dev/zram2): error reading superblock: IO error: -5
bcachefs (/dev/zram3): error reading default superblock: IO error: -5
bcachefs (/dev/zram3): error reading superblock: IO error: -5
bcachefs (/dev/dm-10): error reading default superblock: Not a bcachefs superblock (got magic c06f7a4b-617f-0000-d86f-7a4b617f0000)
bcachefs (/dev/dm-10): error reading superblock: Not a bcachefs superblock layout
bcachefs (/dev/dm-3): error reading default superblock: Not a bcachefs superblock (got magic 83e63b14-f51f-bfb1-0000-000000000000)
bcachefs (/dev/dm-3): error reading superblock: Not a bcachefs superblock layout
bcachefs (/dev/dm-4): error reading default superblock: Not a bcachefs superblock (got magic 00000000-0000-e484-2801-000038010000)
bcachefs (/dev/dm-4): error reading superblock: Not a bcachefs superblock layout
bcachefs (/dev/dm-8): error reading default superblock: Not a bcachefs superblock (got magic 0f2402d2-e406-0092-0000-000000000000)
bcachefs (/dev/dm-8): error reading superblock: Not a bcachefs superblock layout
bcachefs (/dev/md22): error reading default superblock: Not a bcachefs superblock (got magic 00100000-0000-0000-00f0-0f0000000000)
bcachefs (/dev/md22): error reading superblock: Not a bcachefs superblock layout

what is going here?

tasleson commented 5 months ago

what is going here?

The code is taking the device node, retrieving the UUID for the FS and then walking all the block devices reading up the superblock to see if it has a bcachefs superblock and if it does it compares the UUID to see if it matches. You should see the exact same output if you issue the mount command using the UUID= syntax in the mount command instead of the device node.

This change in functionality was added so that you can mount a multi-device FS at boot using the UUID in /etc/fstab. These errors are benign and should not be causing any issues with the FS being mounted.

marcin-github commented 4 months ago

Ok, is it something that will be changed in future? I'm not sure that printing where there is no bcachefs is useful (for me:)) )

tasleson commented 4 months ago

Ok, is it something that will be changed in future? I'm not sure that printing where there is no bcachefs is useful (for me:)) )

I'm working on a change that will make this disappear, although there is a question about why it is being printed as the code is calling a function read_super_silent which doesn't appear to be silent :-)

marcin-github commented 4 months ago

Great, thanks!