LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-30-2005, 09:23 PM   #1
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,315

Rep: Reputation: 54
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)
 
Old 07-31-2005, 04:00 AM   #2
infinity42
Member
 
Registered: Apr 2005
Location: England
Distribution: Gentoo
Posts: 142

Rep: Reputation: 16
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
 
Old 07-31-2005, 10:06 AM   #3
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,315

Original Poster
Rep: Reputation: 54
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.
 
Old 07-31-2005, 10:46 AM   #4
infinity42
Member
 
Registered: Apr 2005
Location: England
Distribution: Gentoo
Posts: 142

Rep: Reputation: 16
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:
In data=ordered mode, ext3 only officially journals metadata, but it logically groups metadata and data blocks into a single unit called a transaction. When it's time to write the new metadata out to disk, the associated data blocks are written first. data=ordered mode effectively solves the corruption problem found in data=writeback mode and most other journaled filesystems, and it does so without requiring full data journaling. In general, data=ordered ext3 filesystems perform slightly slower than data=writeback filesystems, but significantly faster than their full data journaling counterparts.
In journal mode all data writes are journaled:
Quote:
data=journal mode provides full data and metadata journaling. All new data is written to the journal first, and then to its final location. In the event of a crash, the journal can be replayed, bringing both data and metadata into a consistent state.
So to mount an ext3 partition with full journaling something like this should work:
Code:
mount -t ext3 /dev/hdx /mnt/hdx -o data=journal
So I think you can just stick the journaling options you want onto the mount param's in your fstab.

Good luck && Have fun
 
Old 07-31-2005, 10:56 AM   #5
heema
Senior Member
 
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 47
i use reiserfs and alot of the time it shutdown unexpectedly bec. of the electricity

and it never failed ( touch wood )
 
Old 07-31-2005, 11:00 AM   #6
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,850
Blog Entries: 28

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
"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.

Last edited by craigevil; 07-31-2005 at 11:11 AM.
 
Old 07-31-2005, 01:13 PM   #7
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,315

Original Poster
Rep: Reputation: 54
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"bad interpreter : no such file or directory" when configure "flex" acer_peri Linux - Software 10 11-10-2010 02:19 AM
About SElinux: enter "setenforce 0",system complains bad command aladin Linux - Software 3 08-21-2005 09:16 PM
No "system" button on login screen so as to shutdown farpoint Debian 2 11-26-2004 07:36 PM
Multiple "device not ready" messages in System Log quasy Linux - Hardware 0 04-27-2004 06:58 AM
Removing "shutdown" and "reboot" in logout window nearfar Red Hat 1 10-07-2003 12:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration