Closed trougnouf closed 1 year ago
The issue, besides the FS corruption and inability to mount, seems to be the input handling as described in the title. Invoking "bcachefs fsck -p
I ended up giving up on bcachefs fsck because it's too slow and it seems that mount.bcachefs -o ...,fsck,fix_errors works with the following fixed errors in dmesg
[Jun 4 23:19] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): recovering from unclean shutdown
[ +17.612837] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): ja->sectors_free == ca->mi.bucket_size
[ +0.000004] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): cur_idx 0/8192
[ +0.000003] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): bucket_seq[8191] = 6845537
[ +0.000003] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): bucket_seq[0] = 6845729
[ +0.000001] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): bucket_seq[1] = 7073927
[ +0.000031] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): journal read done, replaying entries 7074003-7074078
[ +0.398225] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): checking allocations
[Jun 4 23:34] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): starting journal replay, 4905 keys
[ +0.000540] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): going read-write
[ +3.759552] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): journal replay done
[ +0.000005] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): checking need_discard and freespace btrees
[ +21.379713] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): checking lrus
[ +6.358593] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): checking backpointers to alloc keys
[Jun 4 23:46] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): checking backpointers to extents
[Jun 4 23:57] backpointer for missing extent
[ +0.000002] bucket=1:16186272:0 btree=extents l=0 offset=128:0 len=128 pos=604149741:15672:U32_MAX, fixing
[ +0.000016] backpointer for missing extent
[ +0.000001] bucket=1:16186272:0 btree=extents l=0 offset=256:0 len=128 pos=604149741:15800:U32_MAX, fixing
[ +0.000005] backpointer for missing extent
[ +0.000000] bucket=1:16186272:0 btree=extents l=0 offset=384:0 len=80 pos=604149741:15880:U32_MAX, fixing
[ +0.000004] backpointer for missing extent
[ +0.000000] bucket=1:16186272:0 btree=extents l=0 offset=464:0 len=128 pos=604149741:16008:U32_MAX, fixing
[ +0.000004] backpointer for missing extent
[ +0.000001] bucket=1:16186272:0 btree=extents l=0 offset=592:0 len=96 pos=604149741:16104:U32_MAX, fixing
[ +0.000004] backpointer for missing extent
[ +0.000000] bucket=1:16186272:0 btree=extents l=0 offset=688:0 len=32 pos=604149741:16136:U32_MAX, fixing
[ +0.000004] backpointer for missing extent
[ +0.000000] bucket=1:16186272:0 btree=extents l=0 offset=720:0 len=128 pos=604149741:16264:U32_MAX, fixing
[ +0.000004] backpointer for missing extent
[ +0.000000] bucket=1:16186272:0 btree=extents l=0 offset=848:0 len=56 pos=604149741:16320:U32_MAX, fixing
[ +0.000004] backpointer for missing extent
[ +0.000000] bucket=1:16186272:0 btree=extents l=0 offset=904:0 len=120 pos=604149741:16440:U32_MAX, fixing
[Jun 5 00:08] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): checking extents to backpointers
[Jun 5 00:30] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): checking alloc to lru refs
[ +30.554001] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): starting fsck
[ +0.000014] snapshot points to missing/incorrect tree:
[ +0.000001] u64s 8 type snapshot 0:4294967295:0 len 0 ver 0: is_subvol 1 deleted 0 parent 0 children 0 0 subvol 1, fixing
[Jun 5 00:31] extent in missing inode:
[ +0.000002] u64s 9 type extent 268715392:103494000:U32_MAX len 8 ver 0: durability: 2 crc: c_size 8 size 8 offset 0 nonce 0 csum crc32c compress incompressible ptr: 2:18030724:784 gen 2 ptr: 1:20366460:992 gen 0 ptr: 3:5840930:1016 gen 5 cached, fixing
[ +0.003539] extent in missing inode:
[ +0.000001] u64s 9 type extent 268715392:105981824:U32_MAX len 88 ver 0: durability: 2 crc: c_size 88 size 88 offset 0 nonce 0 csum crc32c compress incompressible ptr: 3:6249214:680 gen 0 ptr: 1:20385213:472 gen 0 ptr: 2:877322:936 gen 5 cached, fixing
[ +0.003651] extent in missing inode:
[ +0.000001] u64s 8 type extent 268715392:113852440:U32_MAX len 56 ver 0: durability: 2 crc: c_size 56 size 56 offset 0 nonce 0 csum crc32c compress incompressible ptr: 2:12647064:0 gen 0 ptr: 1:20377573:224 gen 0, fixing
[ +0.002647] extent in missing inode:
[ +0.000000] u64s 8 type extent 268715392:115038832:U32_MAX len 24 ver 0: durability: 2 crc: c_size 24 size 24 offset 0 nonce 0 csum crc32c compress incompressible ptr: 2:18362906:520 gen 1 ptr: 1:20371069:744 gen 0, fixing
[ +0.001824] extent in missing inode:
[ +0.000001] u64s 9 type extent 268715392:116576288:U32_MAX len 88 ver 0: durability: 2 crc: c_size 88 size 88 offset 0 nonce 0 csum crc32c compress incompressible ptr: 3:6249214:768 gen 0 ptr: 1:20385213:560 gen 0 ptr: 2:913362:936 gen 8 cached, fixing
[ +0.002288] extent in missing inode:
[ +0.000001] u64s 9 type extent 268715392:117130952:U32_MAX len 16 ver 0: durability: 2 crc: c_size 16 size 16 offset 0 nonce 0 csum crc32c compress incompressible ptr: 3:10305754:224 gen 1 ptr: 2:2006431:256 gen 1 cached ptr: 1:20369192:728 gen 0, fixing
[Jun 5 00:33] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): mounted version=snapshot_trees opts=metadata_replicas=3,data_replicas=2,compression=lz4,foreground_target=/dev/sdb,background_target=/dev/sdb,promote_target=/dev/sdb,fsck,fix_errors
but I have a working filesystem again! :)
I just pushed a fix for the prompt bug - we weren't trimming the newline before checking the string length.
Have not dug into the rest of these yet.
Thank you! :) As far as I'm concerned the bug is fixed since I have a working filesystem, I will let you close it in case there's more that caused the errors in the first place. I don't know if I missed anything on the IRC, I was using the web interface and it doesn't show me messages once it disconnects, sorry if that's the case.
Version
Generic info
$ sudo bcachefs show-super /dev/sda
``` External UUID: 9d883cf4-3574-4d4d-a74f-45457bd07cac Internal UUID: e871d6f5-0d10-4427-9f2b-577f294cfb94 Device index: 3 Label: Version: snapshot_trees Oldest version on disk: fragmentation_lru Created: Tue Mar 7 18:22:51 2023 Sequence number: 140 Superblock size: 6488 Clean: 0 Devices: 5 Sections: members,replicas_v0,disk_groups,clean,journal_seq_blacklist,journal_v2,counters Features: lz4,journal_seq_blacklist_v3,reflink,new_siphash,inline_data,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,reflink_inline_data,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes Compat features: alloc_info,alloc_metadata,extents_above_btree_updates_done,bformat_overflow_done Options: block_size: 4.00 KiB btree_node_size: 256 KiB errors: continue [ro] panic metadata_replicas: 3 data_replicas: 2 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 compression: none [lz4] gzip zstd background_compression: [none] lz4 gzip zstd str_hash: crc32c crc64 [siphash] metadata_target: none foreground_target: ssd background_target: hdd promote_target: ssd erasure_code: 0 inodes_32bit: 1 shard_inode_numbers: 1 inodes_use_key_cache: 1 gc_reserve_percent: 8 gc_reserve_bytes: 0 B root_reserve_percent: 0 wide_macs: 0 acl: 1 usrquota: 0 grpquota: 0 prjquota: 0 journal_flush_delay: 1000 journal_flush_disabled: 0 journal_reclaim_delay: 100 journal_transaction_names: 1 nocow: 0 members (size 288): Device: 0 UUID: ccd2ec0f-8c27-4a5c-92f3-cd289e1945c9 Size: 954 GiB Bucket size: 512 KiB First bucket: 0 Buckets: 1953524 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: ssd1 (1) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 1 UUID: 9557b304-37f1-4638-a7f4-7841c8e2e490 Size: 14.6 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 30519296 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd16tb1 (3) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 2 UUID: 410ed87f-c09f-4caf-a841-e41bb0576745 Size: 14.6 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 30519296 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd16tb2 (4) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 3 UUID: 6289f799-0c98-4aff-941d-bbd0f5f34b3b Size: 7.28 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 15261770 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd8tb1 (5) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 4 UUID: 2f4111ac-43e6-4e76-8087-9772543c706a Size: 1.82 TiB Bucket size: 1.00 MiB First bucket: 0 Buckets: 1907729 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: ssd2 (7) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 ```$ sudo bcachefs show-super /dev/sdb
``` External UUID: 9d883cf4-3574-4d4d-a74f-45457bd07cac Internal UUID: e871d6f5-0d10-4427-9f2b-577f294cfb94 Device index: 1 Label: Version: snapshot_trees Oldest version on disk: fragmentation_lru Created: Tue Mar 7 18:22:51 2023 Sequence number: 140 Superblock size: 6488 Clean: 0 Devices: 5 Sections: members,replicas_v0,disk_groups,clean,journal_seq_blacklist,journal_v2,counters Features: lz4,journal_seq_blacklist_v3,reflink,new_siphash,inline_data,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,reflink_inline_data,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes Compat features: alloc_info,alloc_metadata,extents_above_btree_updates_done,bformat_overflow_done Options: block_size: 4.00 KiB btree_node_size: 256 KiB errors: continue [ro] panic metadata_replicas: 3 data_replicas: 2 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 compression: none [lz4] gzip zstd background_compression: [none] lz4 gzip zstd str_hash: crc32c crc64 [siphash] metadata_target: none foreground_target: ssd background_target: hdd promote_target: ssd erasure_code: 0 inodes_32bit: 1 shard_inode_numbers: 1 inodes_use_key_cache: 1 gc_reserve_percent: 8 gc_reserve_bytes: 0 B root_reserve_percent: 0 wide_macs: 0 acl: 1 usrquota: 0 grpquota: 0 prjquota: 0 journal_flush_delay: 1000 journal_flush_disabled: 0 journal_reclaim_delay: 100 journal_transaction_names: 1 nocow: 0 members (size 288): Device: 0 UUID: ccd2ec0f-8c27-4a5c-92f3-cd289e1945c9 Size: 954 GiB Bucket size: 512 KiB First bucket: 0 Buckets: 1953524 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: ssd1 (1) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 1 UUID: 9557b304-37f1-4638-a7f4-7841c8e2e490 Size: 14.6 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 30519296 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd16tb1 (3) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 2 UUID: 410ed87f-c09f-4caf-a841-e41bb0576745 Size: 14.6 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 30519296 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd16tb2 (4) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 3 UUID: 6289f799-0c98-4aff-941d-bbd0f5f34b3b Size: 7.28 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 15261770 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd8tb1 (5) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 4 UUID: 2f4111ac-43e6-4e76-8087-9772543c706a Size: 1.82 TiB Bucket size: 1.00 MiB First bucket: 0 Buckets: 1907729 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: ssd2 (7) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 ```$ sudo bcachefs show-super /dev/sdc
``` External UUID: 9d883cf4-3574-4d4d-a74f-45457bd07cac Internal UUID: e871d6f5-0d10-4427-9f2b-577f294cfb94 Device index: 2 Label: Version: snapshot_trees Oldest version on disk: fragmentation_lru Created: Tue Mar 7 18:22:51 2023 Sequence number: 140 Superblock size: 6488 Clean: 0 Devices: 5 Sections: members,replicas_v0,disk_groups,clean,journal_seq_blacklist,journal_v2,counters Features: lz4,journal_seq_blacklist_v3,reflink,new_siphash,inline_data,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,reflink_inline_data,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes Compat features: alloc_info,alloc_metadata,extents_above_btree_updates_done,bformat_overflow_done Options: block_size: 4.00 KiB btree_node_size: 256 KiB errors: continue [ro] panic metadata_replicas: 3 data_replicas: 2 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 compression: none [lz4] gzip zstd background_compression: [none] lz4 gzip zstd str_hash: crc32c crc64 [siphash] metadata_target: none foreground_target: ssd background_target: hdd promote_target: ssd erasure_code: 0 inodes_32bit: 1 shard_inode_numbers: 1 inodes_use_key_cache: 1 gc_reserve_percent: 8 gc_reserve_bytes: 0 B root_reserve_percent: 0 wide_macs: 0 acl: 1 usrquota: 0 grpquota: 0 prjquota: 0 journal_flush_delay: 1000 journal_flush_disabled: 0 journal_reclaim_delay: 100 journal_transaction_names: 1 nocow: 0 members (size 288): Device: 0 UUID: ccd2ec0f-8c27-4a5c-92f3-cd289e1945c9 Size: 954 GiB Bucket size: 512 KiB First bucket: 0 Buckets: 1953524 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: ssd1 (1) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 1 UUID: 9557b304-37f1-4638-a7f4-7841c8e2e490 Size: 14.6 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 30519296 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd16tb1 (3) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 2 UUID: 410ed87f-c09f-4caf-a841-e41bb0576745 Size: 14.6 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 30519296 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd16tb2 (4) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 3 UUID: 6289f799-0c98-4aff-941d-bbd0f5f34b3b Size: 7.28 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 15261770 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd8tb1 (5) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 4 UUID: 2f4111ac-43e6-4e76-8087-9772543c706a Size: 1.82 TiB Bucket size: 1.00 MiB First bucket: 0 Buckets: 1907729 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: ssd2 (7) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 ```$ sudo bcachefs show-super /dev/nvme0n1
``` External UUID: 9d883cf4-3574-4d4d-a74f-45457bd07cac Internal UUID: e871d6f5-0d10-4427-9f2b-577f294cfb94 Device index: 4 Label: Version: snapshot_trees Oldest version on disk: fragmentation_lru Created: Tue Mar 7 18:22:51 2023 Sequence number: 140 Superblock size: 6472 Clean: 0 Devices: 5 Sections: members,replicas_v0,disk_groups,clean,journal_seq_blacklist,journal_v2,counters Features: lz4,journal_seq_blacklist_v3,reflink,new_siphash,inline_data,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,reflink_inline_data,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes Compat features: alloc_info,alloc_metadata,extents_above_btree_updates_done,bformat_overflow_done Options: block_size: 4.00 KiB btree_node_size: 256 KiB errors: continue [ro] panic metadata_replicas: 3 data_replicas: 2 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 compression: none [lz4] gzip zstd background_compression: [none] lz4 gzip zstd str_hash: crc32c crc64 [siphash] metadata_target: none foreground_target: ssd background_target: hdd promote_target: ssd erasure_code: 0 inodes_32bit: 1 shard_inode_numbers: 1 inodes_use_key_cache: 1 gc_reserve_percent: 8 gc_reserve_bytes: 0 B root_reserve_percent: 0 wide_macs: 0 acl: 1 usrquota: 0 grpquota: 0 prjquota: 0 journal_flush_delay: 1000 journal_flush_disabled: 0 journal_reclaim_delay: 100 journal_transaction_names: 1 nocow: 0 members (size 288): Device: 0 UUID: ccd2ec0f-8c27-4a5c-92f3-cd289e1945c9 Size: 954 GiB Bucket size: 512 KiB First bucket: 0 Buckets: 1953524 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: ssd1 (1) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 1 UUID: 9557b304-37f1-4638-a7f4-7841c8e2e490 Size: 14.6 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 30519296 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd16tb1 (3) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 2 UUID: 410ed87f-c09f-4caf-a841-e41bb0576745 Size: 14.6 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 30519296 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd16tb2 (4) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 3 UUID: 6289f799-0c98-4aff-941d-bbd0f5f34b3b Size: 7.28 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 15261770 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd8tb1 (5) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 4 UUID: 2f4111ac-43e6-4e76-8087-9772543c706a Size: 1.82 TiB Bucket size: 1.00 MiB First bucket: 0 Buckets: 1907729 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: ssd2 (7) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 ```$ sudo bcachefs show-super /dev/nvme2n1
``` External UUID: 9d883cf4-3574-4d4d-a74f-45457bd07cac Internal UUID: e871d6f5-0d10-4427-9f2b-577f294cfb94 Device index: 0 Label: Version: snapshot_trees Oldest version on disk: fragmentation_lru Created: Tue Mar 7 18:22:51 2023 Sequence number: 140 Superblock size: 6488 Clean: 0 Devices: 5 Sections: members,replicas_v0,disk_groups,clean,journal_seq_blacklist,journal_v2,counters Features: lz4,journal_seq_blacklist_v3,reflink,new_siphash,inline_data,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,reflink_inline_data,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes Compat features: alloc_info,alloc_metadata,extents_above_btree_updates_done,bformat_overflow_done Options: block_size: 4.00 KiB btree_node_size: 256 KiB errors: continue [ro] panic metadata_replicas: 3 data_replicas: 2 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 compression: none [lz4] gzip zstd background_compression: [none] lz4 gzip zstd str_hash: crc32c crc64 [siphash] metadata_target: none foreground_target: ssd background_target: hdd promote_target: ssd erasure_code: 0 inodes_32bit: 1 shard_inode_numbers: 1 inodes_use_key_cache: 1 gc_reserve_percent: 8 gc_reserve_bytes: 0 B root_reserve_percent: 0 wide_macs: 0 acl: 1 usrquota: 0 grpquota: 0 prjquota: 0 journal_flush_delay: 1000 journal_flush_disabled: 0 journal_reclaim_delay: 100 journal_transaction_names: 1 nocow: 0 members (size 288): Device: 0 UUID: ccd2ec0f-8c27-4a5c-92f3-cd289e1945c9 Size: 954 GiB Bucket size: 512 KiB First bucket: 0 Buckets: 1953524 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: ssd1 (1) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 1 UUID: 9557b304-37f1-4638-a7f4-7841c8e2e490 Size: 14.6 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 30519296 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd16tb1 (3) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 2 UUID: 410ed87f-c09f-4caf-a841-e41bb0576745 Size: 14.6 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 30519296 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd16tb2 (4) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 3 UUID: 6289f799-0c98-4aff-941d-bbd0f5f34b3b Size: 7.28 TiB Bucket size: 512 KiB First bucket: 0 Buckets: 15261770 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: hdd8tb1 (5) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 Device: 4 UUID: 2f4111ac-43e6-4e76-8087-9772543c706a Size: 1.82 TiB Bucket size: 1.00 MiB First bucket: 0 Buckets: 1907729 Last mount: Sat Jun 3 08:23:07 2023 State: rw Label: ssd2 (7) Data allowed: journal,btree,user Has data: journal,btree,user,cached Discard: 0 Freespace initialized: 1 ```Tools bugs
My bcachefs won't mount after an unclean shutdown. fsck appears to ask if I want to have it fixed but the prompt "fix? (y,n,Y,N)" responds to nothing. Below are the relevant logs:
dmesg after the above mount command
``` [ 171.900299] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): recovering from unclean shutdown [ 191.785409] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): ja->sectors_free == ca->mi.bucket_size [ 191.785414] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): cur_idx 0/8192 [ 191.785417] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): bucket_seq[8191] = 6845537 [ 191.785419] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): bucket_seq[0] = 6845729 [ 191.785421] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): bucket_seq[1] = 7073927 [ 191.785436] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): journal read done, replaying entries 7073963-7073963 [ 191.785442] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): dropped unflushed entries 7073964-7073964 [ 192.170995] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): going read-write [ 193.181435] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): journal replay done [ 193.181456] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): error -2 checking snapshots [ 193.181504] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): Error in recovery: error in recovery (ENOENT) [ 193.181506] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): error starting filesystem: ENOENT ```$ sudo bcachefs fsck /dev/sda /dev/sdb /dev/sdc /dev/nvme0n1 /dev/nvme2n1 # this is what I'm reporting here, though any help getting my filesystem running would be very greatly appreciated
``` recovering from unclean shutdown ja->sectors_free == ca->mi.bucket_size cur_idx 0/8192 bucket_seq[8191] = 6845473 bucket_seq[0] = 6845665 bucket_seq[1] = 7073918 ja->sectors_free == ca->mi.bucket_size cur_idx 0/8192 bucket_seq[8191] = 6845537 bucket_seq[0] = 6845729 bucket_seq[1] = 7073927 journal read done, replaying entries 7073994-7073994 checking allocations starting journal replay, 0 keys journal replay done checking need_discard and freespace btrees checking lrus incorrect lru entry: lru read time 88971037880 u64s 5 type set 1125988877880504:1125899908132210:0 len 0 ver 0 for u64s 12 type alloc_v4 4:1289586:0 len 0 ver 0: gen 2 oldest_gen 0 data_type cached journal_seq 5745080 need_discard 1 need_inc_gen 1 dirty_sectors 0 cached_sectors 2048 stripe 0 stripe_redundancy 0 io_time[READ] 96298116000 io_time[WRITE] 112457381816 fragmentation 0 bp_start 7 : fix? (y,n,Y,N) Y (y,n,Y,N) y (y,n,Y,N) yes (y,n,Y,N) Yes (y,n,Y,N) (y,n,Y,N) n (y,n,Y,N) N (y,n,Y,N) fix (y,n,Y,N) fix? (y,n,Y,N) ^C ```dmesg after the above fsck:
``` [ 1884.589261] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): recovering from unclean shutdown [ 1900.793094] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): ja->sectors_free == ca->mi.bucket_size [ 1900.793097] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): cur_idx 0/8192 [ 1900.793099] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): bucket_seq[8191] = 6845473 [ 1900.793100] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): bucket_seq[0] = 6845665 [ 1900.793101] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): bucket_seq[1] = 7073918 [ 1904.216762] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): ja->sectors_free == ca->mi.bucket_size [ 1904.216764] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): cur_idx 0/8192 [ 1904.216766] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): bucket_seq[8191] = 6845537 [ 1904.216767] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): bucket_seq[0] = 6845729 [ 1904.216768] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): bucket_seq[1] = 7073927 [ 1904.216781] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): journal read done, replaying entries 7073994-7073994 [ 1904.677054] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): journal replay done [ 1904.677066] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): error -2 checking snapshots [ 1904.677093] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): Error in recovery: error in recovery (ENOENT) [ 1904.677094] bcachefs (9d883cf4-3574-4d4d-a74f-45457bd07cac): error starting filesystem: ENOENT ```# gdb -ex run --args bcachefs fsck /dev/sda /dev/sdb /dev/sdc /dev/nvme0n1 /dev/nvme2n1
``` GNU gdb (GDB) 13.1 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later