Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-08-2006, 05:15 AM
|
#1
|
Senior Member
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519
Rep:
|
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.
|
|
|
05-08-2006, 05:51 AM
|
#2
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
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.
|
|
|
05-08-2006, 12:15 PM
|
#3
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
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 12:17 PM.
|
|
|
05-08-2006, 12:28 PM
|
#4
|
Member
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536
Rep:
|
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 12:29 PM.
|
|
|
05-08-2006, 12:33 PM
|
#5
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
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
|
|
|
05-08-2006, 01:17 PM
|
#6
|
Member
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536
Rep:
|
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.
|
|
|
05-08-2006, 02:18 PM
|
#7
|
Member
Registered: Jul 2005
Location: Tempe, AZ
Distribution: Slackware
Posts: 66
Rep:
|
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 03:08 PM.
|
|
|
05-08-2006, 03:03 PM
|
#8
|
Senior Member
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519
Original Poster
Rep:
|
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.
|
|
|
05-08-2006, 03:19 PM
|
#9
|
Member
Registered: Jul 2005
Location: Tempe, AZ
Distribution: Slackware
Posts: 66
Rep:
|
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
|
|
|
05-08-2006, 05:51 PM
|
#10
|
Member
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 919
|
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.
|
|
|
05-09-2006, 04:40 PM
|
#11
|
Senior Member
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519
Original Poster
Rep:
|
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.
|
|
|
05-09-2006, 07:47 PM
|
#12
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
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.
|
|
|
05-14-2006, 01:43 AM
|
#13
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928
|
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/
|
|
|
All times are GMT -5. The time now is 10:20 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|