0

On my Debian Squeeze server, a filesystem crashed badly. I ran fsck.ext4 on it and it corrected many things. Now everything seems to be fine. Additionally, ran an rsync from a recent backup to the failed filesystem.

My question: Now that rsync has run, can I safely assume that the file contents on my server are identical to those in the backup? Or would it be advisable to just recreate the filesystem and re-copy all data from the backup? I'd rather not do this, due to the high traffic (it's a large filesystem ...)

Any help is greatly appreciated =)

EDIT: I'm not exactly sure how the ext4 got corrupted. It's on top of LVM on a Debian box, and I used it as a / filesystem for a paravirtualized xen domU. Somehow, at some point, I wanted to reboot the domU, and it didn't mount the filesystem. After that, I was not able to run fsck on the (offline) filesystem, I got an "filesystem is in use" kind of error. However, I didn'T see it in the output of the mount command, and lsof didn't return anything related to the device. Very strange thing indeed.

andreas-h
  • 1,054
  • 1
  • 16
  • 27

2 Answers2

1

Yeah, an rsync from a clean, trusted, known-good source is fine if you're sure that the underlying filesystem is healthy. I'd be much more curious about what caused so much filesystem corruption; disk array, no battery-backed write cache, etc.

ewwhite
  • 194,921
  • 91
  • 434
  • 799
1

I wouldn't give a 100% guarantee, but the chances that things are still wrong are next to zero.

At least:If your ext4 ran with journalling ON (which is the default) and if there isn't an underlying disk-problem that caused new issues during the rsync.

For safety sake I would manually run an additional fsck on the (offline) filesystem, just to make sure it is still consistent. If it is I would consider it OK.

Just for curiosity: How did you manage to corrupt ext4 ? That is usually pretty hard to do.

Tonny
  • 6,252
  • 1
  • 17
  • 31