Hello Qu, On 18.05.22 at 12:59 Qu Wenruo wrote: > On 2022/5/18 18:38, Johannes Kastl wrote: >> Fixing the device size fails nonetheless (see below). And I can no >> longer mount the filesystem, when I try I find this in the logs: >> >>> [87396.889043] BTRFS error (device sdb1): super_total_bytes >>> 15393162784768 mismatch with fs_devices total_rw_bytes 15393162788864 >>> [87396.889974] BTRFS error (device sdb1): failed to read chunk tree: -22 >>> [87396.892741] BTRFS error (device sdb1): open_ctree failed >> >> (Don't get confused by sdb1, this is from a rescue system with only some >> HDDs attached) >> >> Fixing the device-size on Leap 15.3: >>> # btrfs filesystem show /mnt/DUMBO_BACKUP_4TB/ >>> Label: 'DUMBO_BACKUP_4TB'  uuid: 50651b41-bf33-47e7-8a08-afbc71ba0bf8 >>>         Total devices 2 FS bytes used 3.17TiB >>>         devid    1 size 7.00TiB used 3.64TiB path /dev/sdd1 >>>         devid    2 size 7.00TiB used 3.63TiB path /dev/sdc1 > > That's super weird, we have tons of unallocated space. > > So definitely something wrong in btrfs-progs. > Normally `btrfs fi usage` would provide more info, but it needs the fs > to be mountable. > > Can you prepare a building environment for btrfs-progs? > > I can update the code to skip transaction commit so that we won't be > bother with -ENOSPC at all. > > And since we're not really doing any metadata update, we don't really > need any new space. > > And after your building environment prepared, you can fetch this branch > to compile the btrfs-progs and try to use the compiled `btrfs` command > to rescue the device again. Thanks for your help! > https://github.com/adam900710/btrfs-progs/tree/dirty_fix > > I did some local tests, it shows no problem, but not sure if it would > work for you. I am trying to build this and will test it, hopefully tomorrow. I'll let you know what happens... Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537