Making system "bad shutdown" ready
Is there a way to make ext3 as reliable as ntfs in terms of bad shutdowns? I'll be using a system as a router and don't have enough UPS capacity to put another machine on battery backup (and no "buy another one" is not the answer, I've spent enough money already), so if there's a power outage or what not, it will just shut off. Ext3 is very vulnerble to corruption if a system is badly shut down. I know, since I had to do it once, and my whole filesystem was gone.
So any way to make it more reliable, any mount settings or what not? Performance is not a huge issue on this server, so perhaps something that makes it so EOF markers are always there, and they are only removed for each access then put back, unlike the normal way where they are removed for the whole session, so bad shut downs means they are not put back so it messes up. (at least that's how my programming teacher describes it, I'm not sure if that's how it really works) |
I don't know much about this, but you might want to look at using data-journaling, rather than the default meta-data journaling. Meta-journaling only uses the journal to write the file metadata, helping to ensure that the FS's structure remains valid, but makes no attempt to journal the file's data. Data-journaling journals all writes to the disk. Bear in mind that data-journaling can slow down writes by up to a half (no effect on seeks though), but if that is not a problem then it should be a good bet.
Hope that helps |
Hmm sounds like what I need. How do I go about doing that, and is it possible to do it on a partition to partition basis?
Ex: I want to do that for my OS partition, but for the logs partition I'd want to keep it normal as it would probably be a huge performance hit, this will be a firewall box so every packet will involve a disk write, pretty much. And if I get a power outage loosing all the logs would not be as bad as loosing the OS,since it takes a while to rebuild, while logs would only be looked at once in a while anyway. |
The journaling options are set on a per-filesystem basis. IIRC then you just specify the journal mode when mounting by simply using '-o data=mode' as a mount option. Mode can be writeback, ordered, or journal. Writeback just does meta-data journaling.
In ordered mode: Quote:
Quote:
Code:
mount -t ext3 /dev/hdx /mnt/hdx -o data=journal Good luck && Have fun :) |
i use reiserfs and alot of the time it shutdown unexpectedly bec. of the electricity
and it never failed ( touch wood :D ) |
"Reiser4"
http://www.ubuntuforums.org/showthread.php?t=27673 "Reiser4." http://www.namesys.com/v4/v4.html I used Reiser3 , (I think) on my Debian system ; it manages to get shut off about every couple of weeks either from thunderstorms or by my kids. I have been running it since November 2004 with no problems. |
Cool thanks, I'll give that a shot and see what I get. I'll pull the power on it a few times to test out the best config. :D
|
All times are GMT -5. The time now is 09:11 AM. |