User: Password:
|
|
Subscribe / Log in / New account

The Next3 filesystem

The Next3 filesystem

Posted Jun 9, 2010 2:01 UTC (Wed) by dgm (subscriber, #49227)
In reply to: The Next3 filesystem by anton
Parent article: The Next3 filesystem

I don't know if it's true or not, so condider the following as a bit of FUD in it's literal meaning.

I have read horror histories about I/O controllers and discs messing commands queues when a power failure occurs. This is something that cannot be fixed in any sane way by the OS, the only protecction is a good recent backup. Wouldn't it be that the best solution for your case too?.


(Log in to post comments)

The Next3 filesystem

Posted Jun 9, 2010 8:32 UTC (Wed) by anton (subscriber, #25547) [Link]

I have done experiments on what disks do on power failure, but barriers or turning off disk write cacheing should help against these reorderings. I have also seen disks that destroy old data and the low-level formatting on power failure. And there are other modes in which you can lose data, so having a good backup is a good idea in any case.

Sure, if we are ready to restore our data from backup every time there is a power failure or OS crash, we can use file systems like tmpfs and ext4 for these data. But many of us want to avoid that hassle in the common case when the disk behaves properly, and we need a file system for that case that behaves properly, too. And just like IBM (now Hitachi) and Maxtor (now Seagate) drives are on my don't-buy list after the problems mentioned above, ext4 is on my don't-use list.

The Next3 filesystem

Posted Jun 10, 2010 0:36 UTC (Thu) by cmccabe (guest, #60281) [Link]

> Sure, if we are ready to restore our data from backup every time there is
> a power failure or OS crash, we can use file systems like tmpfs and ext4
> for these data.

This is a trollish statement. I have lost power and had OS crashes many times with ext4 and never had to restore from backups.

> But many of us want to avoid that hassle in the common
> case when the disk behaves properly, and we need a file system for that
> case that behaves properly, too. And just like IBM (now Hitachi) and
> Maxtor (now Seagate) drives are on my don't-buy list after the problems
> mentioned above, ext4 is on my don't-use list.

Even if you had a filesystem that met all of your requirements (and it's unclear if any real filesystem actually does), no consumer-grade hardware guarantees sane behavior in the event of power loss. Some hard disks are better than others, but a lot have serious problems. Some lie about when data has been flushed to disk. Others corrupt data randomly when power is lost.

Even if you buy only certain brands of drives, manufacturers re-brand hard drives all the time. It's hard to know what you're actually buying.

So *if* your hard drive doesn't ruin power-loss for you anyway, *and* your application is written sloppily enough that it doesn't fsync, *and* this application is critical to your system, then ext3 *might* be more reliable, maybe. Is it possible that you're overreacting?

The Next3 filesystem

Posted Jun 14, 2010 14:01 UTC (Mon) by Cato (subscriber, #7643) [Link]

You are lucky - the user of one Linux PC that I manage had an unfortunate habit of nudging the reset button when sitting down ... This is rather a pathological case but it resulted in serious data loss on two separate filesystems on different physical disks (one PATA and one SATA), despite no actual power loss. I was using an ext3 plus LVM setup and I'm convinced that the use of hard disk write caching was the problem.

http://lwn.net/Articles/343425/ has more details. Haven't had any more problems since stopping use of write caching and making some other changes such as ext3 data=journal. I also stopped using LVM but I don't think that's a factor - on other PCs I now just use data=journal and turn off hard disk write caching, and still use LVM.

The Next3 filesystem

Posted Jun 15, 2010 10:07 UTC (Tue) by etienne (guest, #25256) [Link]

That is strange: the reset button is not (and has never) been connected to the hard disk, i.e. the hard disk is only aware of the reset button been pressed when the BIOS re-initialises the ATA/SATA interface (so a long time after). There isn't any "reset wire" on ATA or SATA connector.
Historically, that has lead to strange bugs - like LILO was able to start after running Windows 3.1 but not from a cold boot (or the opposite), because the hard disk was reconfigured with a different number of heads and sector per track (BIOS only times, no LBA).
For all what I can see, it is exactly the same nowadays.
The reason has always been to give time to the hard disk to finish and write back its cache.

The Next3 filesystem

Posted Jun 15, 2010 20:33 UTC (Tue) by Cato (subscriber, #7643) [Link]

My mistake - it was actually the power button not reset that was pressed repeatedly. So there was power loss which is probably what caused the problem due to hard disk write caching.

The Next3 filesystem

Posted Jun 23, 2010 1:41 UTC (Wed) by cmccabe (guest, #60281) [Link]

Up until Linux 2.6.31, write barriers were always disabled while using LVM. So it's unlikely that journaling would have been very effective at preventing data loss in a system using something like ext3 + LVM + Linux 2.6.28.

Personally, I use rsync for monthly backup, every month, and hope for the best. And when you see that first I/O error come out of /dev/sda... throw that thing in the trash. I've never seen a disk "get better" after starting to give I/O timeouts and errors.

C.

The Next3 filesystem

Posted Jun 23, 2010 1:49 UTC (Wed) by cmccabe (guest, #60281) [Link]

Just to clarify. I've never had to restore my data from backup drives. I have had hard disks go "funny" on me. This happened on two disks. Files started becoming unreadable some of the time (but not all) and I/O timeouts started happening. In both cases, I copied over my data from the affected disk to a new disk.

I haven't ever lost data as a result of a power outage, partly because I'm a compulsive user of the save button / command. I also didn't get bitten by the ext4 rename bug / controversy because I was using ext3 at the time. I don't have a UPS at home or work.

The Next3 filesystem

Posted Jun 23, 2010 12:16 UTC (Wed) by Cato (subscriber, #7643) [Link]

Since I turn off disk write caching that bypasses the problem of write barriers being disabled in such kernels. For backups, I use DAR (like tar but with granular checksums for easier recovery from corruption) and rsnapshot, which is rsync-based, but a true backup system as it saves multiple versions and runs very fast, like rsync - works very well as long as you don't have very large files that change frequently.

The Next3 filesystem

Posted Jun 23, 2010 13:30 UTC (Wed) by nix (subscriber, #2304) [Link]

DAR (like tar but with granular checksums for easier recovery from corruption)
Actually par2 provides that feature. What dar gives you is multi-storage-medium support via running arbitrary scripts to change medium. tar has nothing like it.
works very well as long as you don't have very large files that change frequently
Like, uh, VM images? I hear they're quite common these days.

(If you've got a lot of those, try rdiff-backup. It's slower than rsnapshot, but when a file changes it stores rdiff-format compressed deltas from the new file to the old one, rather than resaving the entire old file all over again.)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds