0

I have a filesystem on a LVM device which suffered a disk failure. Some data was lost (since one of the 4 disks which had data is gone). I am trying to mount this filesystem so as to recover as much data as possible (see other question). I am running fsck on it, and it reports many lines like this:

Inode 40226639 block 3801089 conflicts with critical metadata, skipping block checks.
Inode 40226639 block 3801090 conflicts with critical metadata, skipping block checks.
Inode 40226639 block 3833856 conflicts with critical metadata, skipping block checks.
Inode 40226639 block 3833857 conflicts with critical metadata, skipping block checks.
Inode 40226639 block 3833858 conflicts with critical metadata, skipping block checks.
Inode 40226639 block 3866624 conflicts with critical metadata, skipping block checks.

And then does some work with "fixing" some filesystem stuff. But then fsck stops. If I run it again, I can see lots of similar errors, and some from hihgh inode/block numbers, and then it does a little bit more. So fsck is changing something. I have it run in a loop and it is (slowly) getting through the disk. From the fsck progress bar, I can see that it is progressing through the disk.

Inode 53049266 has INLINE_DATA_FL flag but extended attribute not found.  Truncate? yes

Inode 53049266 is in use, but has dtime set.  Fix? yes

Inode 53049266 has imagic flag set.  Clear? yes

Inode 53049266 has a extra size (25474) which is invalid
Fix? yes

e2fsck: aborted

/dev/myvolgroup/mylv: ***** FILE SYSTEM WAS MODIFIED *****

But at every run it has to process the same start until it gets to "new" stuff. How can I make fsck not die so that it will continue rather than repeating work? Or, if theses inodes/blocks are broken, can I somehow "clear"/"reset"/"delete" them so that it will not print these error messages (and hopefully run quicker)?

The command I'm running is this:

e2fsck -f -y -C0 /dev/myvolgroup/mylv

The filesystem was about 5TB in size, and had a ext4 filesystem. Linux kernel 4.9 on Debian stretch 9.11. I know I have lost some data, but I'd like to get as much as possible from this disk. The data is replaceable, but not easily. I don't have a backup. The machine as 3.8GB of RAM and 650 GB of swap. While running there is very little free memory, but swap is hardly used. Is that a problem?


Update as per a suggested solution, I tried with -p and got this output, so I don't think that's the solution

# e2fsck -p /dev/videos_volgroup/videos_lvm |& sed "s|/dev/videos_volgroup/videos_lvm|/dev/myvolgroup/mylv|g"
/dev/myvolgroup/mylv contains a file system with errors, check forced.
/dev/myvolgroup/mylv: Resize inode not valid.  

/dev/myvolgroup/mylv: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options)

Update #1 I've given up and accepted that the data is lost.

Amandasaurus
  • 30,211
  • 62
  • 184
  • 246
  • Does sending the HDD to do a hard recover from the platten is an option ? I ask as more you put pressure on the disk, more it could fail. Some shop can do an estimate before trying anything – yagmoth555 Dec 02 '19 at 17:50
  • @yagmoth555-GoFundMeMonica I don't care that much – Amandasaurus Dec 03 '19 at 13:52

1 Answers1

0

Use -p.
From manpage:

Automatically repair ("preen") the file system. This option will cause e2fsck to automatically fix any filesystem problems that can be safely fixed without human intervention. If e2fsck discovers a problem which may require the system administrator to take additional corrective action, e2fsck will print a description of the problem and then exit with the value 4 logically or'ed into the exit code. (See the EXIT CODE section.)

Alberto Pau
  • 159
  • 5
  • Thanks, I tried that and didn't get anywhere, it just told me to run it again. I've updated the question with those results – Amandasaurus Dec 02 '19 at 17:43