Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysfs internal/disk_groups shows entry with no devices #773

Open
samhug opened this issue Oct 31, 2024 · 0 comments
Open

sysfs internal/disk_groups shows entry with no devices #773

samhug opened this issue Oct 31, 2024 · 0 comments

Comments

@samhug
Copy link

samhug commented Oct 31, 2024

Is it expected for /sys/fs/bcachefs/*/internal/disk_groups to contain old entries with no devices?

Note: I'm running a patch to include the label in the below output (samhug/linux@3361236)

# cat /sys/fs/bcachefs/a068e2aa-78bb-4c9d-842f-75cf3dbfd455/internal/disk_groups
[label hdd parent 0 devs sdb sdc] [label hdd1 parent 1 devs sdb] [label hdd2 parent 1 devs sdc] [label ssd parent 0 devs nvme4n1 nvme3n1 nvme1n1 nvme0n1] [label ssd1 parent 4 devs nvme3n1] [label ssd2 parent 4 devs nvme4n1] [label ssd3 parent 4 devs nvme1n1] [label ssd4 parent 4 devs nvme0n1] [label ssd5 parent 4 devs]

The last entry, label ssd5, has no devs
I previously had a device labeled ssd.ssd5, but this was removed a while ago.
I don't remember exactly how the device was removed, but I do remember running into problems doing it

bcachefs show-super /dev/nvme0n1
Device:                                     CT1000P3SSD8                            
External UUID:                             a068e2aa-78bb-4c9d-842f-75cf3dbfd455
Internal UUID:                             da355333-3c72-427e-be3a-57e3eed3ec7c
Magic number:                              c68573f6-66ce-90a9-d96a-60cf803df7ef
Device index:                              13
Label:                                     (none)
Version:                                   1.13: inode_has_child_snapshots
Version upgrade complete:                  1.13: inode_has_child_snapshots
Oldest version on disk:                    1.13: inode_has_child_snapshots
Created:                                   Sat Mar 30 18:34:35 2024
Sequence number:                           2724
Time of last write:                        Thu Oct 31 13:08:18 2024
Superblock size:                           8.05 KiB/1.00 MiB
Clean:                                     0
Devices:                                   6
Sections:                                  members_v1,crypt,replicas_v0,disk_groups,clean,journal_seq_blacklist,journal_v2,counters,members_v2,errors,ext,downgrade
Features:                                  lz4,zstd,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 [fix_safe] panic ro 
  metadata_replicas:                       2
  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:                             lz4
  background_compression:                  zstd
  str_hash:                                crc32c crc64 [siphash] 
  metadata_target:                         ssd
  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
  promote_whole_extents:                   1
  acl:                                     1
  usrquota:                                0
  grpquota:                                0
  prjquota:                                0
  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

members_v2 (size 2032):
Device:                                    8
  Label:                                   ssd2 (5)
  UUID:                                    8975c957-cda5-4a87-a12b-66b281faef5f
  Size:                                    1.86 TiB
  read errors:                             0
  write errors:                            0
  checksum errors:                         2
  seqread iops:                            0
  seqwrite iops:                           0
  randread iops:                           0
  randwrite iops:                          0
  Bucket size:                             1.00 MiB
  First bucket:                            0
  Buckets:                                 1953514
  Last mount:                              Thu Oct 31 13:07:58 2024
  Last superblock write:                   2724
  State:                                   rw
  Data allowed:                            journal,btree,user
  Has data:                                journal,btree,user,cached
  Btree allocated bitmap blocksize:        64.0 MiB
  Btree allocated bitmap:                  0000000000000000000000000000010011100111000110001000000111101101
  Durability:                              1
  Discard:                                 1
  Freespace initialized:                   1
Device:                                    9
  Label:                                   hdd1 (1)
  UUID:                                    23685053-6ad2-4651-9171-8ca53a2ff975
  Size:                                    10.9 TiB
  read errors:                             0
  write errors:                            0
  checksum errors:                         0
  seqread iops:                            0
  seqwrite iops:                           0
  randread iops:                           0
  randwrite iops:                          0
  Bucket size:                             1.00 MiB
  First bucket:                            0
  Buckets:                                 11444224
  Last mount:                              Thu Oct 31 13:07:58 2024
  Last superblock write:                   2724
  State:                                   rw
  Data allowed:                            journal,btree,user
  Has data:                                journal,user
  Btree allocated bitmap blocksize:        1.00 B
  Btree allocated bitmap:                  0000000000000000000000000000000000000000000000000000000000000000
  Durability:                              1
  Discard:                                 0
  Freespace initialized:                   1
Device:                                    10
  Label:                                   hdd2 (2)
  UUID:                                    81bfd22d-430e-4a9e-9378-84545b6069d9
  Size:                                    10.9 TiB
  read errors:                             0
  write errors:                            0
  checksum errors:                         0
  seqread iops:                            0
  seqwrite iops:                           0
  randread iops:                           0
  randwrite iops:                          0
  Bucket size:                             1.00 MiB
  First bucket:                            0
  Buckets:                                 11444224
  Last mount:                              Thu Oct 31 13:07:58 2024
  Last superblock write:                   2724
  State:                                   rw
  Data allowed:                            journal,btree,user
  Has data:                                journal,user
  Btree allocated bitmap blocksize:        1.00 B
  Btree allocated bitmap:                  0000000000000000000000000000000000000000000000000000000000000000
  Durability:                              1
  Discard:                                 0
  Freespace initialized:                   1
Device:                                    11
  Label:                                   ssd1 (4)
  UUID:                                    77178b9b-7c68-4377-91d5-469297a16231
  Size:                                    466 GiB
  read errors:                             0
  write errors:                            0
  checksum errors:                         0
  seqread iops:                            0
  seqwrite iops:                           0
  randread iops:                           0
  randwrite iops:                          0
  Bucket size:                             512 KiB
  First bucket:                            0
  Buckets:                                 953880
  Last mount:                              Thu Oct 31 13:07:58 2024
  Last superblock write:                   2724
  State:                                   rw
  Data allowed:                            journal,btree,user
  Has data:                                journal,btree,user,cached
  Btree allocated bitmap blocksize:        8.00 MiB
  Btree allocated bitmap:                  0000000000000000000001000000000000000000000000111111111111111111
  Durability:                              1
  Discard:                                 1
  Freespace initialized:                   1
Device:                                    12
  Label:                                   ssd3 (6)
  UUID:                                    52e72585-a5c4-4169-aeb8-20be20d03f32
  Size:                                    932 GiB
  read errors:                             0
  write errors:                            0
  checksum errors:                         0
  seqread iops:                            0
  seqwrite iops:                           0
  randread iops:                           0
  randwrite iops:                          0
  Bucket size:                             512 KiB
  First bucket:                            0
  Buckets:                                 1907739
  Last mount:                              Thu Oct 31 13:07:58 2024
  Last superblock write:                   2724
  State:                                   rw
  Data allowed:                            journal,btree,user
  Has data:                                journal,btree,user,cached
  Btree allocated bitmap blocksize:        16.0 MiB
  Btree allocated bitmap:                  0000000000000000000000000000011110100000000000000000111010001111
  Durability:                              1
  Discard:                                 1
  Freespace initialized:                   1
Device:                                    13
  Label:                                   ssd4 (7)
  UUID:                                    1cc96964-a55f-49e9-aad0-c5fa957651ab
  Size:                                    932 GiB
  read errors:                             0
  write errors:                            0
  checksum errors:                         0
  seqread iops:                            0
  seqwrite iops:                           0
  randread iops:                           0
  randwrite iops:                          0
  Bucket size:                             512 KiB
  First bucket:                            0
  Buckets:                                 1907739
  Last mount:                              Thu Oct 31 13:07:58 2024
  Last superblock write:                   2724
  State:                                   rw
  Data allowed:                            journal,btree,user
  Has data:                                journal,btree,user,cached
  Btree allocated bitmap blocksize:        16.0 MiB
  Btree allocated bitmap:                  0000000000000000000000000000011111100000000000000000111110000111
  Durability:                              1
  Discard:                                 1
  Freespace initialized:                   1

errors (size 536):
journal_entries_missing                     1               Mon May 27 19:45:56 2024
journal_entry_replicas_not_marked           1               Mon May 27 19:45:56 2024
journal_entry_bkey_invalid                  22492704        Sun Apr 14 17:11:42 2024
btree_node_bad_magic                        8               Sat Jun 29 15:42:19 2024
btree_node_bad_seq                          1               Mon Jun 24 15:32:14 2024
btree_node_bad_bkey                         1               Mon Jun  3 18:49:16 2024
fs_usage_data_wrong                         1               Mon May 27 19:54:20 2024
fs_usage_cached_wrong                       1               Mon May 27 19:54:20 2024
fs_usage_nr_inodes_wrong                    2               Mon May 27 19:54:20 2024
fs_usage_replicas_wrong                     4               Mon May 27 19:54:20 2024
dev_usage_buckets_wrong                     12              Mon May 27 19:54:20 2024
dev_usage_sectors_wrong                     6               Mon May 27 19:54:20 2024
dev_usage_fragmented_wrong                  4               Mon May 27 19:54:20 2024
alloc_key_data_type_bad                     2               Mon Jun  3 18:49:16 2024
alloc_key_to_missing_lru_entry              1008            Sat Jun  8 08:59:02 2024
alloc_key_data_type_wrong                   8252            Fri Jun 21 17:30:51 2024
alloc_key_dirty_sectors_wrong               8254            Fri Jun 21 17:30:51 2024
alloc_key_cached_sectors_wrong              56              Mon May 27 19:54:19 2024
freespace_hole_missing                      3               Fri Jun 21 17:31:34 2024
backpointer_bucket_offset_wrong             44985408        Sun Apr 14 17:11:42 2024
ptr_crc_nonce_mismatch                      1               Wed Jun 26 21:55:24 2024
reflink_v_refcount_wrong                    28              Wed Jun 26 15:28:35 2024
reflink_p_to_missing_reflink_v              319             Wed Jun 26 15:24:27 2024
snapshot_tree_to_missing_subvol             1               Fri May 31 21:44:01 2024
inode_dir_wrong_nlink                       2               Tue Aug 20 12:59:18 2024
inode_wrong_nlink                           63168           Tue Aug 20 13:07:38 2024
inode_unreachable                           60668           Tue Aug 20 10:52:19 2024
dirent_to_missing_inode                     1               Mon Jun 10 19:55:15 2024
accounting_mismatch                         107             Thu Oct 17 07:02:08 2024
accounting_replicas_not_marked              2               Mon Jun  3 06:34:45 2024
accounting_key_junk_at_end                  324             Sat Aug 10 20:24:00 2024
accounting_key_replicas_nr_devs_0           498             Sat Aug 10 20:24:00 2024
accounting_key_version_0                    133             Thu Oct 17 10:29:01 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant