0

I was reindexing blockchain and I got this message:

Unable to open file /home/ki/.bitcoin/rev00502.dat ERROR: Flush: fail to open file 502 *** Flushing undo file to disk failed. This is likely the result of an I/ error

Any ideas how to solve it?

3
  • Disk full? Any errors in the journal?
    – HuHa
    May 28, 2021 at 15:50
  • Disk is not full. In the journal I get: pan_unix (sudo:autth) couldnt open /etc/securety: no such a file o directory. .: EXT4-fs error (device sda1): ext4_lookup:1707 inode #4982778: comm bitcoind: iget: checksum invalid May 28, 2021 at 19:40
  • That ext4 error sounds bad. Do a fsck on /dev/sda1.
    – HuHa
    May 28, 2021 at 19:51

1 Answer 1

1

From your comments it appears that your ext4 filesystem on /dev/sda1 has errors, so the first thing is to do a filesystem check.

Since this is probably your root filesystem, it might be a good idea to do this while it is not active, so I suggest you use a live filesystem (Ubuntu on a USB stick, i.e. any not-too-old Ubuntu installation image written to a USB stick) to do that:

Boot the live filesystem, open a shell window and first find out what device your normal disk is; the lsblk command will be useful:

sh@balrog:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931,5G  0 disk 
├─sda1   8:1    0  97,7G  0 part /win/boot
└─sda2   8:2    0 833,9G  0 part /win/app
sdb      8:16   0 931,5G  0 disk 
├─sdb1   8:17   0     2G  0 part 
├─sdb2   8:18   0    30G  0 part /hd-root-18-04
├─sdb3   8:19   0    30G  0 part /hd-root-14-04
├─sdb4   8:20   0     1K  0 part 
└─sdb5   8:21   0 869,5G  0 part /work
sdc      8:32   0 232,9G  0 disk 
├─sdc1   8:33   0     2G  0 part [SWAP]
├─sdc2   8:34   0    30G  0 part /
├─sdc3   8:35   0    30G  0 part /ssd-root-20-04
└─sdc4   8:36   0 170,9G  0 part /ssd-work
sr0     11:0    1  1024M  0 rom  

It is possible that the USB stick you just booted from is now /dev/sda; in that case, your normal disk will be /dev/sdb. Check the blkid output and compare the partition sizes to what you'd expect. Then start a (forced) filesystem check:

sudo fsck -f /dev/sdb1

(or fsck -f /dev/sda1, depending on which disk is which)

If it reports errors and asks if it should fix them, answer y for "yes". If it reports so many errors that it becomes tedious to answer them, terminate it with Ctrl+C and restart it with the -y parameter added:

sudo fsck -f -y /dev/sdb1

(or -fy for short)

When this is done, shut down the live system; or you can do it a bit more brutally with

sync
sudo reboot

sync writes all pending disk buffers.

If this problem reappears, check with the smartmontools if your disk starts getting hardware problems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .