Is there a safe way to fix ext3 filesystems without unmounting the fs?
Jick Nan
liked this
e2fsck -n claims there are errors but I can't tell if those are artifacts of checking a live fs.
- Sanjeev Singh
Eek. Um, make a snapshot of the raw disk, and then fix the result, and then mount it and cut over?
- ⓞnor
Is there a way to flush whats in memory to disk and then fix it?
- Parry Pon
Argh. Turns out to be impossible to even determine if your disk is corrupt while in use. I always thought raw disk database partitions were for performance but this seems like an even more compelling reason. Can't wait for ZFS (never needs fscking) to migrate out onto more OSes.
- Sanjeev Singh
+1 for ZFS.
- Derek Collison
Slippy, RAID doesn't protect you from filesystem corruption due to software bugs. What's worse is you cannot even tell for sure that your ext3 filesystem is completely clean in a running system, RAID or no.
- Sanjeev Singh
Can a database do a complete integrity scan online? I've never met one that could, but I've never been a DBA. Anyway, why do you expect ext3 to be more corruption-prone than ZFS?
- ⓞnor
I'm never been a DBA either, but it seems like structure validation and table rebuilds can be done online http://www.oracle-base.com/article.... As for ZFS vs ext3, copy-on-write is transactional, log + mutate-in-place isn't. For example, if you kernel panic in the middle of an ext3 I/O operation, you may need to fsck.
- Sanjeev Singh
Dan, I was mistaken about ext3 above. ext3 does cleanup via fsck on a reboot, but this seems to be mostly for compatibility with ext2. Still, ZFS lets you check consistency on a live running system via the scrub command, which is very nice for long-running systems. With ext3 you can only run fsck -n, and it will report false alarms on an active system, meaning there is no way you can be sure you are good without unmounting!
- Sanjeev Singh