You are not logged in.
Pages: 1
Hello everybody
I recently decided to tried btrfs as a file system on some of my system partitions and now I´m experiencing my first ever big btrfs file system corruption. This left me thinking could it have been prevented and how do I continue?
It all started whit my home partitions suddenly started mounting as read only and after searching the internet I came to the conclusion that it was most likely caused by file system corruption.
I then freed up some space on my other disk and copied everything whit rsync that gave a lot of error doing so
rsync: readlink_stat("/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/Eastern_Europe/Biltema.ov2") failed: Input/output error (5)
rsync: readlink_stat("/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/Eastern_Europe/Okq8Stationer.bmp") failed: Input/output error (5)
rsync: readlink_stat("/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/Eastern_Europe/Okq8Stationer.ov2") failed: Input/output error (5)
rsync: readlink_stat("/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/Eastern_Europe/DeletedPoi.local") failed: Input/output error (5)
rsync: readlink_stat("/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/Eastern_Europe/MapServerPatch.dat") failed: Input/output error (5)
rsync: readlink_stat("/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/Eastern_Europe/MapSettings.cfg") failed: Input/output error (5)
rsync: readlink_stat("/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/Eastern_Europe/MapUserPatch.dat") failed: Input/output error (5)
rsync: readlink_stat("/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/Eastern_Europe/PatchFilter.dat") failed: Input/output error (5)
rsync: readlink_stat("/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/Eastern_Europe/ServerLineIndex.dat") failed: Input/output error (5)
rsync: readlink_stat("/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/Eastern_Europe/ServerNameIndex.dat") failed: Input/output error (5)
rsync: readlink_stat("/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/Eastern_Europe/traffic.inc") failed: Input/output error (5)
rsync: read errors mapping "/home/crazy-baby/Jesper/Pictures/Pictures/Monicas 2017-2018/IMG_0772.JPG": Input/output error (5)
rsync: readlink_stat("/home/crazy-baby/VirtualBox VMs/Win2/Logs") failed: Input/output error (5)
rsync: read errors mapping "/home/crazy-baby/Jesper/System Volume Information/_restore{500DDF50-AC69-417D-A026-C5F921A5C432}/RP637/A0123574.nfo": Input/output error (5)
rsync: send_files failed to open "/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/Eastern_Europe/poi.dat": Input/output error (5)
rsync: read errors mapping "/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/raster/eure01_01373,06636.jpg": Input/output error (5)
rsync: read errors mapping "/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/raster/eure01_02060,06636.jpg": Input/output error (5)
rsync: read errors mapping "/home/crazy-baby/Jesper/Pictures/Pictures/Monicas 2017-2018/IMG_0772.JPG": Input/output error (5)
rsync: read errors mapping "/home/crazy-baby/VirtualBox VMs/Win2/Win2.vdi": Input/output error (5)
rsync: read errors mapping "/home/crazy-baby/Jesper/System Volume Information/_restore{500DDF50-AC69-417D-A026-C5F921A5C432}/RP637/A0123574.nfo": Input/output error (5)
rsync: read errors mapping "/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/raster/eure01_01373,06636.jpg": Input/output error (5)
rsync: read errors mapping "/home/crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/raster/eure01_02060,06636.jpg": Input/output error (5)
ERROR: crazy-baby/Jesper/Pictures/Pictures/Monicas 2017-2018/IMG_0772.JPG failed verification -- update discarded.
rsync: read errors mapping "/home/crazy-baby/VirtualBox VMs/Win2/Win2.vdi": Input/output error (5)
ERROR: crazy-baby/Jesper/System Volume Information/_restore{500DDF50-AC69-417D-A026-C5F921A5C432}/RP637/A0123574.nfo failed verification -- update discarded.
ERROR: crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/raster/eure01_01373,06636.jpg failed verification -- update discarded.
ERROR: crazy-baby/Jesper/S\#303\#244kerhetskopia/ONE XL/Backup01/InternalMemory/raster/eure01_02060,06636.jpg failed verification -- update discarded.
ERROR: crazy-baby/VirtualBox VMs/Win2/Win2.vdi failed verification -- update discarded.
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]I think in total some 50gb of data could not be copied but I had recently backed up most of my stuff.
Then I attempted to fix my disk whit btrfs repair but it didn't help
Nonie-bebek% sudo btrfs check --repair /dev/mapper/SysPart1-home
[sudo] password for crazy-baby:
enabling repair mode
Checking filesystem on /dev/mapper/SysPart1-home
UUID: ead4630a-ae6c-447f-8603-4e2159295dba
parent transid verify failed on 261356306432 wanted 178728 found 176676
parent transid verify failed on 261356306432 wanted 178728 found 176676
parent transid verify failed on 261356306432 wanted 178728 found 176676
parent transid verify failed on 261356306432 wanted 178728 found 176676
Ignoring transid failure
parent transid verify failed on 261355388928 wanted 178728 found 176675
parent transid verify failed on 261355388928 wanted 178728 found 176675
parent transid verify failed on 261355388928 wanted 178728 found 176675
parent transid verify failed on 261355388928 wanted 178728 found 176675
Ignoring transid failure
parent transid verify failed on 261355405312 wanted 178728 found 176675
parent transid verify failed on 261355405312 wanted 178728 found 176675
parent transid verify failed on 261355405312 wanted 178728 found 176675
parent transid verify failed on 261355405312 wanted 178728 found 176675
Ignoring transid failure
parent transid verify failed on 261355487232 wanted 178728 found 176675
parent transid verify failed on 261355487232 wanted 178728 found 176675
parent transid verify failed on 261355487232 wanted 178728 found 176675
parent transid verify failed on 261355487232 wanted 178728 found 176675
Ignoring transid failure
ERROR: child eb corrupted: parent bytenr=32178176 item=161 parent level=1 child level=1
ERROR: failed to repair root items: Input/output errorSo now I was thinking what to do isn't there some moor options for repairing a btrfs system and could this have been avoided? In my fstab for example I have used the standard fstab gen configuration
# /dev/mapper/SysPart1-home
#UUID=ead4630a-ae6c-447f-8603-4e2159295dba /home btrfs rw,relatime,space_cache,subvolid=5,subvol=/ 0 0If there is no possibility to reaper the file system I will have to format it and I was thinking if ext4 would bee a better choice than btrfs. I never experienced this typ of file corruption on ext4 but maybe I have been lucky
Offline
Try the IRC link from Main_Page#Project_information.2FContact see if those familiar with btrfs have more suggestions on repairing the filesystem.
Without knowing the cause of the issue I could only speculate on if another filesystem could have avoided it.
Offline
Try btrfsck --init-extent-tree. If you don't have a backup you might be screwed. And don't interrupt that command even if it takes ages to run
Last edited by ugjka (2018-08-11 13:36:33)
Offline
Hi thank you all for your help
I really have no idea why this happened the damage seems to bee very evenly distributed over the partition
So far I have been in luck every thing that I really needed was backed up or it was not damaged.
I tried the the init-extent-tree command it took only seconds before it was done the result didn’t tell me much moor then the file system is pretty fucked up.
Nonie-bebek% sudo btrfsck --init-extent-tree /dev/mapper/SysPart1-home
[sudo] password for crazy-baby:
Checking filesystem on /dev/mapper/SysPart1-home
UUID: ead4630a-ae6c-447f-8603-4e2159295dba
Creating a new extent tree
Failed to find [29360128, 168, 16384]
btrfs unable to find ref byte nr 29425664 parent 0 root 1 owner 1 offset 0
Failed to find [29458432, 168, 16384]
btrfs unable to find ref byte nr 29474816 parent 0 root 1 owner 0 offset 1
Failed to find [29360128, 168, 16384]
btrfs unable to find ref byte nr 29442048 parent 0 root 1 owner 0 offset 1
parent transid verify failed on 29458432 wanted 178849 found 178850
Ignoring transid failure
checking extents
parent transid verify failed on 261354864640 wanted 178728 found 176674
parent transid verify failed on 261354864640 wanted 178728 found 176674
parent transid verify failed on 261354897408 wanted 178728 found 176674
parent transid verify failed on 261354897408 wanted 178728 found 176674
parent transid verify failed on 261354913792 wanted 178728 found 176674
parent transid verify failed on 261354913792 wanted 178728 found 176674
parent transid verify failed on 261354930176 wanted 178728 found 176674
parent transid verify failed on 261354930176 wanted 178728 found 176674
parent transid verify failed on 261354946560 wanted 178728 found 176674
parent transid verify failed on 261354946560 wanted 178728 found 176674
parent transid verify failed on 261354962944 wanted 178728 found 176674
parent transid verify failed on 261354962944 wanted 178728 found 176674
parent transid verify failed on 261354979328 wanted 178728 found 176674
parent transid verify failed on 261354979328 wanted 178728 found 176674
parent transid verify failed on 261354995712 wanted 178728 found 176674
parent transid verify failed on 261354995712 wanted 178728 found 176674
parent transid verify failed on 261355028480 wanted 178728 found 176674
parent transid verify failed on 261355028480 wanted 178728 found 176674
parent transid verify failed on 261355028480 wanted 178728 found 176674
parent transid verify failed on 261355028480 wanted 178728 found 176674
Ignoring transid failure
leaf parent key incorrect 261355028480
bad block 261355028480
ERROR: errors found in extent allocation tree or chunk allocation
checking free space cache
cache and super generation don’t match, space cache will be invalidated
checking fs roots
root 5 missing its root dir, recreating
Failed to find [29638656, 168, 16384]
btrfs unable to find ref byte nr 31096832 parent 0 root 4 owner 1 offset 0
Failed to find [29638656, 168, 16384]
btrfs unable to find ref byte nr 31113216 parent 0 root 4 owner 0 offset 1
Failed to find [20971520, 168, 16384]
btrfs unable to find ref byte nr 21037056 parent 0 root 3 owner 0 offset 1
leaf free space ret -20955206, leaf data size 16283, used 20971489 nritems 154
leaf free space ret -20955206, leaf data size 16283, used 20971489 nritems 154
leaf free space incorrect 20971520 -20955206
extent-tree.c:1907: do_chunk_alloc: BUG_ON ‘ret’ triggered, value -1
btrfs check(+0x1dc32)[0x55f2338a0c32]
btrfs check(+0x23b03)[0x55f2338a6b03]
btrfs check(btrfs_reserve_extent+0xb6)[0x55f2338a6c06]
btrfs check(btrfs_alloc_free_block+0x5d)[0x55f2338a779d]
btrfs check(__btrfs_cow_block+0x188)[0x55f233896d98]
btrfs check(btrfs_cow_block+0xf9)[0x55f2338975a9]
btrfs check(btrfs_search_slot+0x36d)[0x55f23389a40d]
btrfs check(btrfs_insert_empty_items+0x99)[0x55f23389bbf9]
btrfs check(btrfs_insert_item+0x61)[0x55f23389bfe1]
btrfs check(btrfs_insert_inode+0x35)[0x55f2338ad395]
btrfs check(btrfs_make_root_dir+0xa3)[0x55f2338b4bf3]
btrfs check(+0x5e471)[0x55f2338e1471]
btrfs check(cmd_check+0x2b92)[0x55f2338e9d72]
btrfs check(main+0x88)[0x55f2338957d8]
/usr/lib/libc.so.6(__libc_start_main+0xeb)[0x7f52c52c906b]
btrfs check(_start+0x2a)[0x55f2338958fa]
zsh: abort sudo btrfsck --init-extent-tree /dev/mapper/SysPart1-homeOffline
Pages: 1