You are not logged in.

#1 2009-03-02 13:22:29

skwo
Member
Registered: 2008-11-13
Posts: 133

What is the purpose of boot disks check?

Hi there, I noticed (a lot time ago, was lazy to write about it tongue ) that every 30 mounts disks being checked. I know that I can change the number of mounts, and also disable that checks. I just wonder is it a statistical check to only provide information about the partitions or it also fix things?
And another question: Are the following results ok? 0.8% non-contiguous for root partition, and 2.3% for home partiton?

Thanks.


ArchLinux x86_64 on Dell Latitude E5410

Offline

#2 2009-03-02 22:49:11

blackhole
Member
From: Karlsruhe, Germany
Registered: 2008-12-14
Posts: 148
Website

Re: What is the purpose of boot disks check?

Good question. I was wondering about the same thing. Could you tell me how to increase the number of mounts before the disk is checked? How can I turn it off?

Well, let's hope that one of those smart Linux people answer your question in detail. big_smile


Coming closer and closer to the ultimate goal: replacing boring old Windows XP desktop with shiny new Arch KDE 4 desktop. ^^
Already registered? Your vote counts!

Offline

#3 2009-03-02 23:12:54

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: What is the purpose of boot disks check?

There are two checks, one for how many times you mount it, and one for how long it's been since it was last checked. For ext2/3/4 FS, you can modify them using tune2fs, -c and -i flags. (Make sure you unmount first. Maybe use a Live CD.)

These checks are mostly a holdover from pre-journaling days, as far as I know. I tend to turn them off (tune2fs -c 0 -i 0).

Offline

#4 2009-03-03 00:12:11

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: What is the purpose of boot disks check?

Or to ensure that everything is as it should be. Hardware is known to misbehave sometimes and it might damage parts of the filesystem .... bad ram is always the example I see.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2009-03-03 01:10:26

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: What is the purpose of boot disks check?

man tune2fs for more info on changing number-of-times-mounted and amount-of-time-passed before the filesystem is checked (hint: tune2fs -c NUMTIMESMOUNTED -i NUMDAYSPASSEDd /dev/foo # note the 'd' after NUMDAYSPASSED... and this is only for ext* FSen). I usually set it to tune2fs -c 60 -i 180d.

And OP, those are pretty good values for non-contiguous. That's fragmentation smile As you can see, Linux filesystems give fragmentation a swift kick in the behind for the most part big_smile

Last edited by Ranguvar (2009-03-03 01:11:23)

Offline

#6 2009-03-03 09:10:08

blackhole
Member
From: Karlsruhe, Germany
Registered: 2008-12-14
Posts: 148
Website

Re: What is the purpose of boot disks check?

Ranguvar wrote:

And OP, those are pretty good values for non-contiguous. That's fragmentation smile As you can see, Linux filesystems give fragmentation a swift kick in the behind for the most part big_smile

What do you mean? Does the check actually do a defrag? How do I do a defrag in Linux anyway? Do I have to do that frequently like under Windows?


Coming closer and closer to the ultimate goal: replacing boring old Windows XP desktop with shiny new Arch KDE 4 desktop. ^^
Already registered? Your vote counts!

Offline

#7 2009-03-03 14:12:31

randomguy
Member
Registered: 2007-06-19
Posts: 101

Re: What is the purpose of boot disks check?

Does the check actually do a defrag?

No, it does not.

How do I do a defrag in Linux anyway?

That depends on which filesystem you have. Ext3 has no online defragermentation utility. There is one coming for ext4. I don't know about other filesystems. There are also some hackish scripts (basically copying files back and forth)but most of the only work on unmounted filesystems, too. Some of them make use of e2defrag, which can defrag ext2 and convert the ext3 partitions to ext2 for defragmentation and then convert them back.

Do I have to do that frequently like under Windows?

No, for the linux I/O scheduler does a much better to prevent fragmentation compared to windows. Of course fragmentation still occurs.

Having the common partition layout (seperate /, /boot and /home) helps quite alot already.

Last edited by randomguy (2009-03-03 14:17:35)

Offline

#8 2009-03-03 16:24:07

skwo
Member
Registered: 2008-11-13
Posts: 133

Re: What is the purpose of boot disks check?

Thanks for the answers!


ArchLinux x86_64 on Dell Latitude E5410

Offline

Board footer

Powered by FluxBB