1

Our operations team was trying to shrink an LVM logical volume, and forgot to shrink the partition sitting on top of it first. They got a bunch of errors, and made the mistake of running e2fsck right away to try and fix the disk. Needless to say, the box was not happy.

As of this morning I hopped on the box and was able to salvage it by restoring the LV to 100% of the disk. I ran e2fsck and it passed without an issue. I rebooted, and it booted straight into the OS. My concern now is any damage that may have been done by fsck. Is there any way to verify the filesystem's integrity and stability?

Matthew
  • 2,666
  • 8
  • 32
  • 50

1 Answers1

4

The only way to KNOW, as in be 100% certain, is to verify the files against a previous backup or any alternate versions.

Other options may increase your confidence in the integrity of your data but there's really only one way to be certain.

Chopper3
  • 100,240
  • 9
  • 106
  • 238
  • Darn, that's kind of what I figured. In that case this box isn't in production yet and is a stability risk - I'll nuke it and start over. Thanks! – Matthew Jul 25 '12 at 14:19
  • What's on the partition? root or /data? You could run a 'debsums' on debian based installations to check packages checksums, for example if that partition is holding installed .deb packages. – ce4 Jul 25 '12 at 14:35
  • FYI the "normal" (which is default) LVM allocation policy should use contiguous extents if they are available and reproduce the extent map you had previously. So, in theory its OK. Frankly I would just start again though if you have the opportunity. There is just no point taking that kind of risk. – Matthew Ife Jul 25 '12 at 14:42
  • 2
    Chopper3 beat me to the answer. I was going to say the same thing. In this particular scenario I would feel reasonably comfortable about using the recovered system, but if, as you state, nuking is an option I most certainly would do that. Better some time spend re-installing now than trying to hunt down obscure issues later when the thing is in production. – Tonny Jul 25 '12 at 14:43