You are not logged in.

#1 2023-04-27 08:01:24

azusa
Member
Registered: 2023-04-27
Posts: 1

Corrupted btrfs file system (Structure needs cleaning)

Accessing some files in my file system failed with the following error:

$ ls /usr/lib/libXau.so.6
ls: cannot access '/usr/lib/libXau.so.6': Structure needs cleaning

Some posts suggests that the file system is corrupted. Since this is my root partion with btrfs, I booted into a live Arch Linux USB and tried `btrfs check /dev/vda1`. The command produced the following output and failed with Segmentation fault (core dumped).
https://0x0.st/HKvE.txt
I fond some bugs from about 10 years ago that produces similar result but all marked as fixed.

I also tried `btrfs inspect-internal dump-tree /dev/vda1`. It produced some output larger than 200MB, and failed with

ERROR: child eb corrupted: parent bytenr=34521088 item=116 parent level=1 child bytenr=30457856 child level=1

Output from `btrfs inspect-internal dump-super /dev/vda1`:

superblock: bytenr=65536, device=/dev/vda1
---------------------------------------------------------
csum_type               0 (crc32c)
csum_size               4
csum                    0x09bee668 [match]
bytenr                  65536
flags                   0x1
                        ( WRITTEN )
magic                   _BHRfS_M [match]
fsid                    3977f629-7297-4552-b08a-17fa17413bc4
metadata_uuid           3977f629-7297-4552-b08a-17fa17413bc4
label
generation              10846
root                    85803008
sys_array_size          129
chunk_root_generation   4104
root_level              0
chunk_root              23134208
chunk_root_level        0
log_root                0
log_root_transid (deprecated)   0
log_root_level          0
total_bytes             128034627584
bytes_used              95408877568
sectorsize              4096
nodesize                16384
leafsize (deprecated)   16384
stripesize              4096
root_dir                6
num_devices             1
compat_flags            0x0
compat_ro_flags         0x3
                        ( FREE_SPACE_TREE |
                          FREE_SPACE_TREE_VALID )
incompat_flags          0x369
                        ( MIXED_BACKREF |
                          COMPRESS_LZO |
                          BIG_METADATA |
                          EXTENDED_IREF |
                          SKINNY_METADATA |
                          NO_HOLES )
cache_generation        0
uuid_tree_generation    10846
dev_item.uuid           b0fe3e2c-6ff6-48c5-83fa-0de28774a785
dev_item.fsid           3977f629-7297-4552-b08a-17fa17413bc4 [match]
dev_item.type           0
dev_item.total_bytes    128034627584
dev_item.bytes_used     97735671808
dev_item.io_align       4096
dev_item.io_width       4096
dev_item.sector_size    4096
dev_item.devid          1
dev_item.dev_group      0
dev_item.seek_speed     0
dev_item.bandwidth      0
dev_item.generation     0

The disk is a SSD passthrough with qemu, and it worked fine in the past few months.

<disk type='block' device='disk'>
  <driver name='qemu' type='raw' cache='writeback'/>
  <source dev='/dev/disk/by-id/ata-Colorful_SL300_128GB_AA000000000000001087' index='2'/>
  <backingStore/>
  <target dev='hdc' bus='virtio'/>
  <boot order='1'/>
  <alias name='virtio-disk2'/>
  <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</disk>

I'm not sure if the disk is broken, so I'm also posting the SMART info here:
https://0x0.st/HKvl.txt

Offline

Board footer

Powered by FluxBB