bcachefs icon indicating copy to clipboard operation
bcachefs copied to clipboard

cannot mount by UUID

Open mentaluproar opened this issue 2 months ago • 4 comments

I can mount the bcachefs pool with the list of devices (sudo mount -t bcachefs /dev/nvme0n1p4:/dev/sda:/dev/sdb /mnt/tempy) but I cannot mount by the external UUID shown in the bcachefs show-super (sudo mount -t bcachefs UUID=a51bd973-479a-4ccd-8ec3-95e3205ec01b /mnt/tempy)

When I try to use the UUID, one or more of the devices in the pool will not attach, so it remains degraded. If I unmount and try mounting again using the list of devices instead of UUID, it works fine.

sean@localhost-live:~$ sudo bcachefs format --acl --discard --label=ssd.T500A /dev/nvme0n1p4 --discard=0 --label=hdd.ironwolfA /dev/sda --label=hdd.ironwolfB /dev/sdb --foreground_target=ssd --promote_target=ssd --metadata_target=ssd --background_target=hdd /dev/nvme0n1p4 contains a bcachefs filesystem Proceed anyway? (y,n) y y/dev/sda contains a bcachefs filesystem Proceed anyway? (y,n) y/dev/sdb contains a bcachefs filesystem Proceed anyway? (y,n) External UUID: a51bd973-479a-4ccd-8ec3-95e3205ec01b Internal UUID: 39fd6b4d-a598-49ac-a877-fc7e89508051 Magic number: c68573f6-66ce-90a9-d96a-60cf803df7ef Device index: 2 Label: (none) Version: 1.31: btree_node_accounting Incompatible features allowed: 1.31: btree_node_accounting Incompatible features in use: 0.0: (unknown version) Version upgrade complete: 0.0: (unknown version) Oldest version on disk: 1.31: btree_node_accounting Created: Mon Nov 10 02:02:07 2025 Sequence number: 0 Time of last write: Wed Dec 31 19:00:00 1969 Superblock size: 1.59 KiB/1.00 MiB Clean: 0 Devices: 3 Sections: members_v1,disk_groups,members_v2 Features: new_siphash,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes,incompat_version_field Compat features:

Options: block_size: 4.00 KiB btree_node_size: 256 KiB errors: continue [fix_safe] panic ro write_error_timeout: 30 metadata_replicas: 1 data_replicas: 1 metadata_replicas_required: 1 data_replicas_required: 1 encoded_extent_max: 64.0 KiB metadata_checksum: none [crc32c] crc64 xxhash data_checksum: none [crc32c] crc64 xxhash checksum_err_retry_nr: 3 compression: none background_compression: none str_hash: crc32c crc64 [siphash] metadata_target: ssd foreground_target: ssd background_target: hdd promote_target: ssd erasure_code: 0 casefold: 0 inodes_32bit: 0 shard_inode_numbers_bits: 0 inodes_use_key_cache: 1 gc_reserve_percent: 8 gc_reserve_bytes: 0 B root_reserve_percent: 0 wide_macs: 0 promote_whole_extents: 1 acl: 1 usrquota: 0 grpquota: 0 prjquota: 0 degraded: [ask] yes very no journal_flush_delay: 1000 journal_flush_disabled: 0 journal_reclaim_delay: 100 journal_transaction_names: 1 allocator_stuck_timeout: 30 version_upgrade: [compatible] incompatible none nocow: 0 rebalance_on_ac_only: 0 Device 0: /dev/nvme0n1p4 CT2000T500SSD8
Label: ssd.T500A UUID: 701bd941-674f-40ce-a9ec-e0bca2579d1b Size: 1.61 TiB read errors: 0 write errors: 0 checksum errors: 0 seqread iops: 0 seqwrite iops: 0 randread iops: 0 randwrite iops: 0 Bucket size: 2.00 MiB First bucket: 0 Buckets: 841998 Last mount: (never) Last superblock write: 0 State: rw Data allowed: journal,btree,user Has data: (none) Btree allocated bitmap blocksize: 1.00 B Btree allocated bitmap: 0000000000000000000000000000000000000000000000000000000000000000 Durability: 1 Discard: 1 Freespace initialized: 0 Resize on mount: 0 Device 1: /dev/sda ST6000VN001-2BB1 Label: hdd.ironwolfA UUID: b4c6f62b-bec6-4858-bb34-6e850dd7c386 Size: 5.46 TiB read errors: 0 write errors: 0 checksum errors: 0 seqread iops: 0 seqwrite iops: 0 randread iops: 0 randwrite iops: 0 Bucket size: 2.00 MiB First bucket: 0 Buckets: 2861583 Last mount: (never) Last superblock write: 0 State: rw Data allowed: journal,btree,user Has data: (none) Btree allocated bitmap blocksize: 1.00 B Btree allocated bitmap: 0000000000000000000000000000000000000000000000000000000000000000 Durability: 1 Discard: 0 Freespace initialized: 0 Resize on mount: 0 Device 2: /dev/sdb ST6000VN001-2BB1 Label: hdd.ironwolfB UUID: 72753b78-dcdf-4e49-a09b-ce3231caf510 Size: 5.46 TiB read errors: 0 write errors: 0 checksum errors: 0 seqread iops: 0 seqwrite iops: 0 randread iops: 0 randwrite iops: 0 Bucket size: 2.00 MiB First bucket: 0 Buckets: 2861583 Last mount: (never) Last superblock write: 0 State: rw Data allowed: journal,btree,user Has data: (none) Btree allocated bitmap blocksize: 1.00 B Btree allocated bitmap: 0000000000000000000000000000000000000000000000000000000000000000 Durability: 1 Discard: 0 Freespace initialized: 0 Resize on mount: 0 starting version 1.31: btree_node_accounting with devices /dev/nvme0n1p4 /dev/sda /dev/sdb Using encoding defined by superblock: utf8-12.1.0 initializing new filesystem going read-write initializing freespace clean shutdown complete, journal seq 15 sean@localhost-live:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 5.5T 0 disk sdb 8:16 0 5.5T 0 disk sdc 8:32 0 238.5G 0 disk ├─sdc1 8:33 0 576M 0 part /boot/efi ├─sdc2 8:34 0 2G 0 part /boot └─sdc3 8:35 0 235.8G 0 part /home / zram0 251:0 0 8G 0 disk [SWAP] nvme0n1 259:0 0 1.8T 0 disk ├─nvme0n1p1 259:1 0 572M 0 part ├─nvme0n1p2 259:2 0 1.9G 0 part ├─nvme0n1p3 259:3 0 29.8G 0 part └─nvme0n1p4 259:4 0 1.6T 0 part sean@localhost-live:~$ sudo mount -t bcachefs UUID=a51bd973-479a-4ccd-8ec3-95e3205ec01b /mnt/tempy sean@localhost-live:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 5.5T 0 disk sdb 8:16 0 5.5T 0 disk sdc 8:32 0 238.5G 0 disk ├─sdc1 8:33 0 576M 0 part /boot/efi ├─sdc2 8:34 0 2G 0 part /boot └─sdc3 8:35 0 235.8G 0 part /home / zram0 251:0 0 8G 0 disk [SWAP] nvme0n1 259:0 0 1.8T 0 disk ├─nvme0n1p1 259:1 0 572M 0 part ├─nvme0n1p2 259:2 0 1.9G 0 part ├─nvme0n1p3 259:3 0 29.8G 0 part └─nvme0n1p4 259:4 0 1.6T 0 part /mnt/tempy

sean@localhost-live:~$ sudo bcachefs show-super /dev/nvme0n1p4 External UUID: a51bd973-479a-4ccd-8ec3-95e3205ec01b Internal UUID: 39fd6b4d-a598-49ac-a877-fc7e89508051 Magic number: c68573f6-66ce-90a9-d96a-60cf803df7ef Device index: 0 Label: (none) Version: 1.31: btree_node_accounting Incompatible features allowed: 1.31: btree_node_accounting Incompatible features in use: 0.0: (unknown version) Version upgrade complete: 1.31: btree_node_accounting Oldest version on disk: 1.31: btree_node_accounting Created: Mon Nov 10 02:02:07 2025 Sequence number: 39 Time of last write: Mon Nov 10 02:04:01 2025 Superblock size: 5.93 KiB/1.00 MiB Clean: 0 Devices: 3 Sections: members_v1,replicas_v0,disk_groups,clean,journal_v2,counters,members_v2,errors,ext,downgrade,recovery_passes Features: new_siphash,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes,incompat_version_field Compat features: alloc_info,alloc_metadata,extents_above_btree_updates_done,bformat_overflow_done,no_stale_ptrs

Options: block_size: 4.00 KiB btree_node_size: 256 KiB errors: continue [fix_safe] panic ro write_error_timeout: 30 metadata_replicas: 1 data_replicas: 1 metadata_replicas_required: 1 data_replicas_required: 1 encoded_extent_max: 64.0 KiB metadata_checksum: none [crc32c] crc64 xxhash data_checksum: none [crc32c] crc64 xxhash checksum_err_retry_nr: 3 compression: none background_compression: none str_hash: crc32c crc64 [siphash] metadata_target: ssd foreground_target: ssd background_target: hdd promote_target: ssd erasure_code: 0 casefold: 0 inodes_32bit: 0 shard_inode_numbers_bits: 4 inodes_use_key_cache: 1 gc_reserve_percent: 8 gc_reserve_bytes: 0 B root_reserve_percent: 0 wide_macs: 0 promote_whole_extents: 1 acl: 1 usrquota: 0 grpquota: 0 prjquota: 0 degraded: [ask] yes very no journal_flush_delay: 1000 journal_flush_disabled: 0 journal_reclaim_delay: 100 journal_transaction_names: 1 allocator_stuck_timeout: 30 version_upgrade: [compatible] incompatible none nocow: 0 rebalance_on_ac_only: 0

errors (size 8):

ext (size 96): Recovery passes required:
Errors to silently fix:
Btrees with missing data:
Device 0: /dev/nvme0n1p4 CT2000T500SSD8
Label: ssd.T500A UUID: 701bd941-674f-40ce-a9ec-e0bca2579d1b Size: 1.61 TiB read errors: 0 write errors: 0 checksum errors: 0 seqread iops: 0 seqwrite iops: 0 randread iops: 0 randwrite iops: 0 Bucket size: 2.00 MiB First bucket: 0 Buckets: 841998 Last mount: Mon Nov 10 02:04:01 2025 Last superblock write: 39 State: rw Data allowed: journal,btree,user Has data: journal,btree Btree allocated bitmap blocksize: 512 KiB Btree allocated bitmap: 0000000000000000000000000000000100000000000000000000000000000000 Durability: 1 Discard: 1 Freespace initialized: 1 Resize on mount: 0 Device 1: (not found)
Label: hdd.ironwolfA UUID: b4c6f62b-bec6-4858-bb34-6e850dd7c386 Size: 5.46 TiB read errors: 0 write errors: 0 checksum errors: 0 seqread iops: 0 seqwrite iops: 0 randread iops: 0 randwrite iops: 0 Bucket size: 2.00 MiB First bucket: 0 Buckets: 2861583 Last mount: Mon Nov 10 02:04:01 2025 Last superblock write: 39 State: rw Data allowed: journal,btree,user Has data: (none) Btree allocated bitmap blocksize: 1.00 B Btree allocated bitmap: 0000000000000000000000000000000000000000000000000000000000000000 Durability: 1 Discard: 0 Freespace initialized: 1 Resize on mount: 0 Device 2: /dev/sdb ST6000VN001-2BB1 Label: hdd.ironwolfB UUID: 72753b78-dcdf-4e49-a09b-ce3231caf510 Size: 5.46 TiB read errors: 0 write errors: 0 checksum errors: 0 seqread iops: 0 seqwrite iops: 0 randread iops: 0 randwrite iops: 0 Bucket size: 2.00 MiB First bucket: 0 Buckets: 2861583 Last mount: Mon Nov 10 02:04:01 2025 Last superblock write: 39 State: rw Data allowed: journal,btree,user Has data: (none) Btree allocated bitmap blocksize: 1.00 B Btree allocated bitmap: 0000000000000000000000000000000000000000000000000000000000000000 Durability: 1 Discard: 0 Freespace initialized: 1 Resize on mount: 0 sean@localhost-live:~$ ls /dev/sd* /dev/sda /dev/sdb /dev/sdc /dev/sdc1 /dev/sdc2 /dev/sdc3 sean@localhost-live:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 5.5T 0 disk sdb 8:16 0 5.5T 0 disk sdc 8:32 0 238.5G 0 disk ├─sdc1 8:33 0 576M 0 part /boot/efi ├─sdc2 8:34 0 2G 0 part /boot └─sdc3 8:35 0 235.8G 0 part /home / zram0 251:0 0 8G 0 disk [SWAP] nvme0n1 259:0 0 1.8T 0 disk ├─nvme0n1p1 259:1 0 572M 0 part ├─nvme0n1p2 259:2 0 1.9G 0 part ├─nvme0n1p3 259:3 0 29.8G 0 part └─nvme0n1p4 259:4 0 1.6T 0 part /mnt/tempy sean@localhost-live:~$ sudo umount /mnt/tempy sean@localhost-live:~$ sudo mount -t bcachefs /dev/nvme0n1p4:/dev/sda:/dev/sdb /mnt/tempy sean@localhost-live:~$ sudo bcachefs show-super /dev/sda External UUID: a51bd973-479a-4ccd-8ec3-95e3205ec01b Internal UUID: 39fd6b4d-a598-49ac-a877-fc7e89508051 Magic number: c68573f6-66ce-90a9-d96a-60cf803df7ef Device index: 1 Label: (none) Version: 1.31: btree_node_accounting Incompatible features allowed: 1.31: btree_node_accounting Incompatible features in use: 0.0: (unknown version) Version upgrade complete: 1.31: btree_node_accounting Oldest version on disk: 1.31: btree_node_accounting Created: Mon Nov 10 02:02:07 2025 Sequence number: 52 Time of last write: Mon Nov 10 02:11:03 2025 Superblock size: 5.93 KiB/1.00 MiB Clean: 0 Devices: 3 Sections: members_v1,replicas_v0,disk_groups,clean,journal_v2,counters,members_v2,errors,ext,downgrade,recovery_passes Features: new_siphash,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes,incompat_version_field Compat features: alloc_info,alloc_metadata,extents_above_btree_updates_done,bformat_overflow_done,no_stale_ptrs

Options: block_size: 4.00 KiB btree_node_size: 256 KiB errors: continue [fix_safe] panic ro write_error_timeout: 30 metadata_replicas: 1 data_replicas: 1 metadata_replicas_required: 1 data_replicas_required: 1 encoded_extent_max: 64.0 KiB metadata_checksum: none [crc32c] crc64 xxhash data_checksum: none [crc32c] crc64 xxhash checksum_err_retry_nr: 3 compression: none background_compression: none str_hash: crc32c crc64 [siphash] metadata_target: ssd foreground_target: ssd background_target: hdd promote_target: ssd erasure_code: 0 casefold: 0 inodes_32bit: 0 shard_inode_numbers_bits: 4 inodes_use_key_cache: 1 gc_reserve_percent: 8 gc_reserve_bytes: 0 B root_reserve_percent: 0 wide_macs: 0 promote_whole_extents: 1 acl: 1 usrquota: 0 grpquota: 0 prjquota: 0 degraded: [ask] yes very no journal_flush_delay: 1000 journal_flush_disabled: 0 journal_reclaim_delay: 100 journal_transaction_names: 1 allocator_stuck_timeout: 30 version_upgrade: [compatible] incompatible none nocow: 0 rebalance_on_ac_only: 0

errors (size 8):

ext (size 96): Recovery passes required:
Errors to silently fix:
Btrees with missing data:
Device 0: /dev/nvme0n1p4 CT2000T500SSD8
Label: ssd.T500A UUID: 701bd941-674f-40ce-a9ec-e0bca2579d1b Size: 1.61 TiB read errors: 0 write errors: 0 checksum errors: 0 seqread iops: 0 seqwrite iops: 0 randread iops: 0 randwrite iops: 0 Bucket size: 2.00 MiB First bucket: 0 Buckets: 841998 Last mount: Mon Nov 10 02:11:03 2025 Last superblock write: 52 State: rw Data allowed: journal,btree,user Has data: journal,btree Btree allocated bitmap blocksize: 512 KiB Btree allocated bitmap: 0000000000000000000000000000000100000000000000000000000000000000 Durability: 1 Discard: 1 Freespace initialized: 1 Resize on mount: 0 Device 1: /dev/sda ST6000VN001-2BB1 Label: hdd.ironwolfA UUID: b4c6f62b-bec6-4858-bb34-6e850dd7c386 Size: 5.46 TiB read errors: 0 write errors: 0 checksum errors: 0 seqread iops: 0 seqwrite iops: 0 randread iops: 0 randwrite iops: 0 Bucket size: 2.00 MiB First bucket: 0 Buckets: 2861583 Last mount: Mon Nov 10 02:11:03 2025 Last superblock write: 52 State: rw Data allowed: journal,btree,user Has data: (none) Btree allocated bitmap blocksize: 1.00 B Btree allocated bitmap: 0000000000000000000000000000000000000000000000000000000000000000 Durability: 1 Discard: 0 Freespace initialized: 1 Resize on mount: 0 Device 2: /dev/sdb ST6000VN001-2BB1 Label: hdd.ironwolfB UUID: 72753b78-dcdf-4e49-a09b-ce3231caf510 Size: 5.46 TiB read errors: 0 write errors: 0 checksum errors: 0 seqread iops: 0 seqwrite iops: 0 randread iops: 0 randwrite iops: 0 Bucket size: 2.00 MiB First bucket: 0 Buckets: 2861583 Last mount: Mon Nov 10 02:11:03 2025 Last superblock write: 52 State: rw Data allowed: journal,btree,user Has data: (none) Btree allocated bitmap blocksize: 1.00 B Btree allocated bitmap: 0000000000000000000000000000000000000000000000000000000000000000 Durability: 1 Discard: 0 Freespace initialized: 1 Resize on mount: 0

mentaluproar avatar Nov 10 '25 07:11 mentaluproar

Where are you seeing a degraded mount, though? From the logs above the filesystem mounted by the UUID just fine?

Also please provide blkid output too, and dmesg logs from a "bad" mount.

himikof avatar Nov 10 '25 23:11 himikof

Right now I don't think we can distinguish between blkid problems (which we've seen) and devices just being slow to show up.

We've got a plan sketched out for waiting for devices to show up (cannot recall ElvishJericos's GitHub and I'm on my phone, or I'd ping him) - I think we better try to make that happen soon.

Also landing soon are better error messages on mount failure due to insufficient devices - we'll know tell you what was missing.

If blkid really is the issue post waiting-for-devices-to-show-up, we might need some debug code or fallbacks in the mount helper.

On Mon, Nov 10, 2025, 6:23 PM Nikita Ofitserov @.***> wrote:

himikof left a comment (koverstreet/bcachefs#975) https://github.com/koverstreet/bcachefs/issues/975#issuecomment-3514328018

Where are you seeing a degraded mount, though? From the logs above the filesystem mounted by the UUID just fine?

Also please provide blkid output too, and dmesg logs from a "bad" mount.

— Reply to this email directly, view it on GitHub https://github.com/koverstreet/bcachefs/issues/975#issuecomment-3514328018, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPGX3SRW4C6YAJ5G55MSTT34EM7TAVCNFSM6AAAAACLUDG3YWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKMJUGMZDQMBRHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

koverstreet avatar Nov 10 '25 23:11 koverstreet

Where are you seeing a degraded mount, though? From the logs above the filesystem mounted by the UUID just fine?

Also please provide blkid output too, and dmesg logs from a "bad" mount.

Look closer at the show-super of the UUID mounted pool.

Device 1: (not found) Label: hdd.ironwolfA UUID: b4c6f62b-bec6-4858-bb34-6e850dd7c386

mentaluproar avatar Nov 11 '25 03:11 mentaluproar

The fact that bcachefs show-super could not find the hdd.ironwolfA device in one case may indeed indicate a problem with blkid, that is why I explicitly requested you to provide full blkid output (from a "bad" state). That is not the mounting process, though, show-super is completely independent from that.

I still see no evidence that the actual mounting process was degraded (using bcachefs terminology). Please explain what exactly you consider wrong with the FS mounted by the sudo mount -t bcachefs UUID=a51bd973-479a-4ccd-8ec3-95e3205ec01b /mnt/tempy command that makes you say "cannot mount by UUID", and provide the requested logs.

himikof avatar Nov 13 '25 10:11 himikof