LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-31-2012, 12:36 AM   #1
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 201Reputation: 201Reputation: 201
Clean install coming up and I'm wondering about file systems


With 14.0 coming and a new machine about to go online I'm looking at doing at least 2 and possibly 3 (my laptop is still 13.0) clean installs. I currently use ext3 on all my machines because it seems I've had fewer problems with data corruption on ext3 files when I've lost power or had to do a hard reboot as opposed to ext4 which are the only 2 fs's I've ever used.

Does this fit with what others have seen in the real world? Are there any file systems that anyone has had better luck with? My primary concern is data integrity rather than performance.
 
Old 08-31-2012, 01:00 AM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Well I'm not sure but personally I'd rather choose ext4 and tweak it with options instead. It's just a matter of choice on my side though.
 
Old 08-31-2012, 01:03 AM   #3
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Original Poster
Rep: Reputation: 201Reputation: 201Reputation: 201
What kinds of tweaks? I've never considered tweaking the file system. Can you point me to links?
 
Old 08-31-2012, 01:22 AM   #4
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Every detail is mentioned here: kernel.org/doc/Documentation/filesystems/ext4.txt
Ext4 as how I see it without respect to the distro is actually meant to be tweaked as compared to Ext3. I mean, it's better if users would examine first the features that are to be used on a filesystem before implementing it.

There should be lots of discussions about what options are best used for Ext4 around the web. Me, I found the options that I had to use in order to make the filesystem have less access to the disk. It was important when I built my system.

Last edited by konsolebox; 08-31-2012 at 01:24 AM.
 
2 members found this post helpful.
Old 08-31-2012, 02:23 AM   #5
fgcl2k
Member
 
Registered: Jan 2011
Distribution: Slackware 14.0
Posts: 102

Rep: Reputation: 25
Quote:
Originally Posted by konsolebox View Post
Me, I found the options that I had to use in order to make the filesystem have less access to the disk. It was important when I built my system.
Looks like a good setup for a laptop. What options are you using?
 
Old 08-31-2012, 02:48 AM   #6
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by fgcl2k View Post
Looks like a good setup for a laptop. What options are you using?
My setup is pretty dangerous when system hangs or when power is lost. I took the risk anyway since I think I could handle it.

Here are my options:
Code:
noatime,data=writeback,nobarrier,commit=100,nouser_xattr,noacl

Last edited by konsolebox; 08-31-2012 at 03:03 AM. Reason: Looks like it was a different user.
 
Old 08-31-2012, 03:19 AM   #7
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.1, Slackware 14.1
Posts: 519

Rep: Reputation: 137Reputation: 137
For a laptop, I wouldn't go more that "commit=10" the rest are safe enough imho.
 
Old 08-31-2012, 06:34 AM   #8
e5150
Member
 
Registered: Oct 2005
Location: Sweden
Distribution: Slackware
Posts: 73

Rep: Reputation: 41
IIRC the common data loss issues with ext4 was "fixed" in linux 2.6.30, to the point of ext4 having similar data protection levels as ext3, (see ext4/auto_da_alloc in manpage for mount).

Other than that I concur with konsolebox on tweaking ext4 for your own needs. For my partitions with important data (mostly lots of "small" files) I mount with: journal_checksum,nodelalloc,data=ordered,commit=5. While storage/backup partitions which rarely writes mostly "large" files I use journal_checksum,delalloc,data=writeback,commit=300 (and other non-ext4-specific options, such as noatime, noexec and nodev, where applicable).
On filesystems where files are rarely larger than a few MB I haven't found delayed allocation to be of any measurable benefit, filefrag reports similar levels of fragmentation, and I can at least not feel any difference in latency. This might be due to the disks internal write caches of about 64 MB, and that I have write cache enabled for all my disks (hdparm -W /dev/sdX). However, I don't know if delayed allocation is beneficial for data safety or not.
 
3 members found this post helpful.
Old 08-31-2012, 09:48 AM   #9
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Original Poster
Rep: Reputation: 201Reputation: 201Reputation: 201
As usually happens when a little knowledge is gained the question changes. It probably makes more sense to look at the options on a case by case basis based on what each of the partitions is actually doing and the data that is present. I used to just mount certain partitions ro and remount them when I needed to write to them, but that became so cumbersome at times that I abandoned it and moved everything to ext3.

Thanks for the replies. I'm now in a much better position to start.
 
Old 09-01-2012, 06:21 AM   #10
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I have used JFS for many years and have never had data loss. I was thinking to move to btrfs, but their fsck utility is not finished, and I consider it too dangerous to use without it.
 
Old 09-01-2012, 07:05 AM   #11
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 342

Rep: Reputation: 55
ext4 all the way. however, it is a mystery to me why options like writeback and nobarrier are even available. A filesystem's top priority has got to be data consistency ON DISK at any point in time. anything else is just madness.
 
Old 09-01-2012, 09:03 AM   #12
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
@Martinus2u: Well we know that some systems are stable enough and has enough power backups. Considering those for performance is still a wise decision for designing a filesystem.
 
Old 09-01-2012, 10:17 AM   #13
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 342

Rep: Reputation: 55
Quote:
Originally Posted by konsolebox View Post
@Martinus2u: Well we know that some systems are stable enough and has enough power backups. Considering those for performance is still a wise decision for designing a filesystem.
those are very limited hardware scenarios - and even there the performance benefit is limited to very specialized application scenarios.

This has nothing to do with the average desktop PC or the average server. But you can already tell from the first half of this thread how the wrong message is seeping through to the users/admins of those.
 
Old 09-01-2012, 10:21 AM   #14
storkus
Member
 
Registered: Jun 2008
Posts: 309

Rep: Reputation: 45
I forget where I read it (Phoronix?), but btrfs just had a regression in 3.2 or 3.4, and ext4 is still faster than it. Eventually that will change, of course, but for now, I'll be re-installing on my laptop's SSD ext4 with options similar to what e5150 said.

One thing I suggest that I learned when I put in the SSD and installed 13.37 on it is that, ideally, you should MANUALLY format the drive from the command line with a manually formed string of options: that way, you can set everything that needs to be set during format and it gets written only once (obviously important for SSD's).

Speaking of SSD's, you can use similar options with the swap partition. Despite what some people have said, I highly recommend a swap partition on an SSD, not only to free memory in case of leaks and such, but also so you can hibernate (which is VERY fast on an SSD, though still not as fast as sleeping, of course).

One final thing is that I also use that wild "commit=300"--or even more--since most of the time plenty of memory is available, and it IS a laptop; this also eliminates churning the SSD during heavy rewrites like compiling.

Oh, and for ext3 vs ext4, I don't think there's really any reason to use ext3 any more at this point. Meanwhile, I've never used most of those other filesystems, so I can't comment. (I HAVE used murd...er, reiserfs before, but that's long ago...)

Last edited by storkus; 09-01-2012 at 10:25 AM.
 
1 members found this post helpful.
Old 09-01-2012, 01:32 PM   #15
gezley
Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware64, NetBSD
Posts: 490

Rep: Reputation: 207Reputation: 207Reputation: 207
Quote:
Originally Posted by damgar View Post
With 14.0 coming and a new machine about to go online I'm looking at doing at least 2 and possibly 3 (my laptop is still 13.0) clean installs. I currently use ext3 on all my machines because it seems I've had fewer problems with data corruption on ext3 files when I've lost power or had to do a hard reboot as opposed to ext4 which are the only 2 fs's I've ever used.

Does this fit with what others have seen in the real world? Are there any file systems that anyone has had better luck with? My primary concern is data integrity rather than performance.
XFS deserves consideration as well, for many reasons: it has a long history, stretching back to 1993 in IRIX and 2001 in Linux; it has native filesystem backup and restore utilities; it scales well; and more. A lot of improvements were merged into the kernel sometime around the 3.xx release, and now performance in my experience is at least on a par with the ext* filesystems. It's worth remembering as well that Ted T'so has admitted ext4 is only a stopgap on the way to btrfs. (It's scarcely believable that 20 years later we're still waiting for what could be called a definitive, longterm filesystem in Linux.)

I have used XFS for years and never had a problem with data integrity, and it has coped very well after unexpected power interruptions.

This article together with the comments section is well worth reading.
 
2 members found this post helpful.
  


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
LXer: Kernel Log: Coming in 2.6.39 (Part 2) Storage and file systems LXer Syndicated Linux News 0 04-27-2011 06:30 AM
LXer: Kernel Log: Coming in 2.6.38 (Part 2) File systems LXer Syndicated Linux News 0 02-18-2011 04:30 PM
LXer: Kernel Log: Coming in 2.6.37 (Part 2) - File systems LXer Syndicated Linux News 0 12-09-2010 03:10 PM
LXer: Kernel Log: Coming in 2.6.34 (Part 2) - File Systems LXer Syndicated Linux News 0 04-23-2010 04:21 PM
LXer: Kernel Log: What's coming in 2.6.30 - File systems: New and revamped file syste LXer Syndicated Linux News 0 04-27-2009 11:02 PM


All times are GMT -5. The time now is 10:51 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration