Input/output error (BTRFS corruption?) What can I do?


I’m not familiar with btrfs, so this might be a noob question.

A few weeks ago I noticed that I cannot run apt upgrade.

I’m running Home/KDE 4.9 amd64 installed via Debian Standard
Multiboot is configured to work with Windows 10.


apt install --fix-broken

yields this:

The following additional packages will be installed:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 253 not upgraded.
2 not fully installed or removed.

Preparing to unpack .../node-aws-sign2_0.7.1-2_all.deb ...
Unpacking node-aws-sign2 (0.7.1-2) ...
dpkg: error processing archive /var/cache/apt/archives/node-aws-sign2_0.7.1-2_all.deb (--unpack):
 unable to stat './usr/share/doc/node-aws-sign2' (which I was about to install): Input/output error
Errors were encountered while processing:
Scanning application launchers
Removing duplicate launchers from Debian
Launchers are updated
E: Sub-process /usr/bin/dpkg returned an error code (1)

I also cannot intact with /usr/share/doc/node-aws4/ and

rm: cannot remove '/usr/share/doc/node-aws-sign2': Input/output error

I ran:

smartctl  selftest 

and it had returned no errors.

sudo badblocks -o out.txt 

and it also had returned nothing.

btrfs scrub 

returns this:

UUID:             bf72308a-0aa3-4f98-a2d6-47c534b89afb
Scrub started:    Tue Jun 16 10:37:50 2020
Status:           finished
Duration:         0:09:25
Total to scrub:   197.41GiB
Rate:             354.55MiB/s
Error summary:    csum=4
  Corrected:      0
  Uncorrectable:  4
  Unverified:     0



I can see errors like this:

[  999.323567] BTRFS error (device dm-0): bad tree block start, want 910409728 have 18446653972965947952
[ 3450.431703] BTRFS error (device dm-0): bad tree block start, want 910442496 have 5111886

and after running btrfs scrub I get errors like these:

[ 3549.272977] BTRFS warning (device dm-0): checksum error at logical 910442496 on dev /dev/mapper/parrot--vg-root, physical 910442496: metadata leaf (level 0) in tree 5
[ 3549.272993] BTRFS error (device dm-0): bdev /dev/mapper/parrot--vg-root errs: wr 0, rd 0, flush 0, corrupt 9, gen 0
[ 3549.272999] BTRFS error (device dm-0): unable to fixup (regular) error at logical 910442496 on dev /dev/mapper/parrot--vg-root

Otherwise my system runs normally, as far as I can tell nothing but files relating to node-aws-sign2 were affected.

I don’t know what to do now. Do I have to wipe the disk and restore from backup? Or is there an option for deleting those files. They are non-critical and it would be a lot more convenient to simply re-download them.

I’m sorry if this is a duplicate topic. Last time I submitted, website hang and I couldn’t find it anywhere.

try How to Fix/Repair Badblocks in Linux

Thanks for your reply. I followed this guide. However, I get stuck because smartctl and badblocks return no errors.

Nothing have helped, I restored from backup.

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.