LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-08-2006, 04:15 AM   #1
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Rep: Reputation: 63
High Percentage Of Non-Contiguous Files - need some clarification


Hi all,

I know this is addressed in many threads, and man pages...and google. But I'm still confused.

I have a very old pc that I'm basically using with slack for file storage, photos, old emails, etc. I just turn that computer on, backup to it and shut it down. It's only 400 mhz. Many of the items on that pc are on other computers, so I'm not to worried about data loss so long as those pc's don't go "kaputz".

There are 4 drives in the old pc, and they're all over 60 gig. As I'm new to Linux I played it safe and just formatted all of the drives with ext2 when loading up that pc.

Well I froze up the pc somehow tonight. When the pc rebooted and it ran a disk check, I had some drives with 1.1% non-contigous and other drives/partitions as high as 30% non-contiguous files.

The 30% non-contiguous drive concerns me obviously. I'm thinking that I need to go with a journalized file system for that drive, but not really sure if I should bother for the drives that are let's say under 10%

-What is the cross-over point where you say go journalized?
-Or is any percentage of non-contigous a reason to go journalized?
-Lastly do you think the data is corrupted and I should restore those drives from CD or the other pc's, or chances are the data is ok?
-Since this pc was loaded for ext2 I venture to guess I have to make sure that in my kernel config I have the journalized file system built in right?

Thanks in advance.
 
Old 05-08-2006, 04:51 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
I'm no expert here, but from everything I've read and experienced, there's no reason not to go with a journaled file system these days. They're much more robust overall and almost everyone uses them now. The amount of defragmentation isn't important here, just the fact that it can be a problem is enough justification in my mind.

Since ext3 is basically ext2 with a journaling system layered on, it's probably the best way for you to go. You can even continue to access it as ext2 if you really need to. Reiserfs would probably be your second choice. It seems to have better performance, especially if you have a lot of small files, but it may be more than you need for your system. But in any case I suggest you switch over.

As for your last two questions, I doubt there's any corruption to your data. Defragmentation doesn't mean loss of data, after all. But if you don't trust it and have backups, then by all means use them.

And yes, you will need the file system support in your kernel, especially for the drive you'll be booting the system from. I'm pretty sure that most stock kernels already have ext3 and reiserfs built in.
 
Old 05-08-2006, 11:15 AM   #3
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
Just be sure it's included <Y> in your config, not module (Unless you like the 'mkitinrd' kludge of a workaround)
Quote:
Originally Posted by David the H.
And yes, you will need the file system support in your kernel, especially for the drive you'll be booting the system from. I'm pretty sure that most stock kernels already have ext3 and reiserfs built in.
In Slackware, ext3 is included, but Reiserfs is not.

Last edited by cwwilson721; 05-08-2006 at 11:17 AM.
 
Old 05-08-2006, 11:28 AM   #4
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Quote:
Originally Posted by cwwilson721
In Slackware, ext3 is included, but Reiserfs is not.
Huh?

Code:
cat /etc/slackware-version
Slackware 10.2.0

cat /proc/filesystems
nodev   rootfs
nodev   bdev
nodev   proc
nodev   sockfs
nodev   tmpfs
nodev   shm
nodev   pipefs
        ext3
        ext2
nodev   ramfs
        umsdos
        msdos
        vfat
        iso9660
nodev   nfs
        reiserfs
nodev   devpts
nodev   usbdevfs
nodev   usbfs

Last edited by ioerror; 05-08-2006 at 11:29 AM.
 
Old 05-08-2006, 11:33 AM   #5
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
Clarification: Included in the kernel config by default, not as a module.

The stock 2.4 and 2.6 kernel from Slackware does not have reiserfs builtin, but maybe as a module (I always recompile, so I don't recall exactly).

If you search the forum, it is rife with "I just recompoiled, and Kernel Panic"...99% of the time it is because they have a reiserfs fs, and don't include (<Y> as compared to <M>) the filesystem
 
Old 05-08-2006, 12:17 PM   #6
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Quote:
Originally Posted by cwwilson721
The stock 2.4 and 2.6 kernel from Slackware does not have reiserfs builtin, but maybe as a module (I always recompile, so I don't recall exactly).
I don't know about 2.6, but the stock 2.4 kernel (which is what I'm using) has reiserfs builtin:

Code:
$ mount -o loop slackware-10.2-install-d1.iso /mnt
$ grep -i reiser /mnt/kernels/bare.i/config
CONFIG_REISERFS_FS=y
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
Quote:
Originally Posted by cwwilson721
If you search the forum, it is rife with "I just recompoiled, and Kernel Panic"...99% of the time it is because they have a reiserfs fs, and don't include (<Y> as compared to <M>) the filesystem
Indeed.
 
Old 05-08-2006, 01:18 PM   #7
shotwellj
Member
 
Registered: Jul 2005
Location: Tempe, AZ
Distribution: Slackware
Posts: 66

Rep: Reputation: 15
Quote:
Originally Posted by ioerror
I don't know about 2.6, but the stock 2.4 kernel (which is what I'm using) has reiserfs builtin:
Yeah, it is just the 2.6 kernel from /testing that doesn't have reiserfs compiled in.

As for the original post, my understanding is that the non-contiguous files will just slow down disk operations when you read/write on the fragmented files. Ext2 has fragmentation problems when there is not enough contiguous space for your files and also with files that are constantly appended to, (/var/spool/*, /var/log*). So, to answer your question, a high percentage of non-contiguous files does not indicate file corruption. External file fragmentation is unavoidable with an ext2 partition over time if it sees a lot of action. Actually, external file fragmentation is a problem with any filesystem over time.

Restoring things from a cd backup would probably lower the percentage. There is also an old defrag program for ext2 that is not very robust.

Finally, there is no reason to not use a journaled file system. Your data will be much safer. I do not think, however, that journaled file systems prevent external fragmentation.

Jacob

Last edited by shotwellj; 05-08-2006 at 02:08 PM.
 
Old 05-08-2006, 02:03 PM   #8
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Original Poster
Rep: Reputation: 63
Thank you gentlemen, truly.

Oh one quicky question before I reformat/restore those drives.

Once I am done, does Linux have a set amount of free space per drive it like to see.

For example, on almost any windows drive, you get an warning error if you exceed more than 90% full. Since they are only backup drives I'd like to fill them up as much as possible and not lose any space.

Is the 10% free rule still in effect for these Linux journalized disk structures?

Thanks again.
 
Old 05-08-2006, 02:19 PM   #9
shotwellj
Member
 
Registered: Jul 2005
Location: Tempe, AZ
Distribution: Slackware
Posts: 66

Rep: Reputation: 15
Quote:
Originally Posted by Old_Fogie
Thank you gentlemen, truly.

Oh one quicky question before I reformat/restore those drives.

Once I am done, does Linux have a set amount of free space per drive it like to see.

For example, on almost any windows drive, you get an warning error if you exceed more than 90% full. Since they are only backup drives I'd like to fill them up as much as possible and not lose any space.

Is the 10% free rule still in effect for these Linux journalized disk structures?

Thanks again.
There is nothing inherit to the journalized file systems which would require a certain amount of free space. You obviously shouldn't fill up the same partition that contains something like /var.

I do not think there is anything about the MS file systems which require some amount of freespace. The OS most certainly requires some free space, which is probably why you get the w10% arning. You can turn that warning off in the registry if it annoys you.


Jacob
 
Old 05-08-2006, 04:51 PM   #10
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 907

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Root is reserved 5% of the partition by default (at least on ext2 and ext3). I think is in case someone tries attacking by filling up the hard drive, root still has enough room to do damage control.
 
Old 05-09-2006, 03:40 PM   #11
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Original Poster
Rep: Reputation: 63
Just an update. Thank you guys AGAIN for the help.

I recompiled the kernel as I had taken it out on my custom kernel. Good thing.

And I learned something nice about linux. The partition making, resizing is built in. WOW.

In windows I would have turned to my trusted partition magic, a third party and expensive program to do this for me. Since my version of Partition magic doesn't do Reiser, I was lost - at first...then I found the make reiser in /sbin.

Wow it was blazing fast and worked really well.

I have noticed a huge pickup in performance moving files to and from it locally on the pc to those partitions and reading from it on the network. Writing to it from the network is about the same, as it is a very old pc so it's understandable.

I'm moving all my data back over there now.

One question, in my fstab i used the last columns as "0 0" this is what's posted on the Reiser home page. But here in the forums I see people, including Shilo using "1 2".

Second question is just wondering, will Slackware 11 have the new Reiser version in it, I think it is version 4. The reiser homepage touts it as the next best thing to sliced bread. Are any of you guys using it? Liking it?

Oh and what ticks me off about windows that I learned from this. I can read from that old linux box over the network faster than I can read files from my fast computer when it's booted up in windows xp. WTH. It must be that patch MS issued to stop number of threads outbound due to trojans. ArGH. But this old pc that should be dead, that has less cpu's than an IPAQ moves files over the network than windows. LOL. Woot for linux.
 
Old 05-09-2006, 06:47 PM   #12
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
Quote:
Originally Posted by Old_Fogie
Oh and what ticks me off about windows that I learned from this. I can read from that old linux box over the network faster than I can read files from my fast computer when it's booted up in windows xp. WTH. It must be that patch MS issued to stop number of threads outbound due to trojans. ArGH. But this old pc that should be dead, that has less cpu's than an IPAQ moves files over the network than windows. LOL. Woot for linux.
That is one of the main reasons I love GNU/Linux. You can take an old POS, and make it be a fire breathing, rip-snorting powerhouse. Well, not quite, but it can/will work.
 
Old 05-14-2006, 12:43 AM   #13
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I found a set of programs which will give information about fragmentation or even defrag an ext2 file system.

frag is a really simple CLI program. e2dump gives a nice ncurses picture of your file system.
e2defrag uses CLI or ncurses to show info or to defrag your *unmounted* drive.
A statically compiled version is included for use on a rescue floppy(needs no ncurses)

You can get the Slackware-type package here:
http://distro.ibiblio.org/pub/linux/...0.1-i486-1.tgz

Or compile it yourself from source:
http://distro.ibiblio.org/pub/linux/...fragutils-0.1/
 
  


Reply



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
Using windows high speed to download linux update files? dadof5 Linux - General 3 01-30-2006 04:35 PM
Non contiguous files johndoe0028 Linux - Newbie 5 09-29-2005 08:22 AM
High CPU usuage when downloading files aerogate Mandriva 1 06-15-2005 04:38 AM
mpg321 won't play high quality ogg vorbis files VorlonInfoTech Linux - Software 1 01-10-2004 09:23 AM
non-contiguous erhanaydinoglu Linux - Newbie 2 07-28-2003 05:57 AM

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

All times are GMT -5. The time now is 08:23 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