1752291 Members
4717 Online
108786 Solutions
New Discussion юеВ

FSCK time

 
skt_skt
Honored Contributor

FSCK time

I want to know how long does the fsck takes?(it depends on the size of the FS and number of files)

The precise question is if i am doing an fsck each month or after 6 months(180 days ;default fsck duration)how long the sysmtem takes to finish that..is it better to opt for 30 days interms of saving time?

I dont prefer my system to take more than 4 hours (an example)just for doing fsck? I would rather prefer the system doing fsck if i reboot in between the last six months . Could it lesser the time for fsck if performed after six months.

fsck runs sequentially after a reboot and can be run on concorrently on multple FS if perfomred from single user mode manually. is that right?

7 REPLIES 7
J Peak
Frequent Advisor

Re: FSCK time

As far as I am aware, the amount of time that passes between FSCK's does not affect the length of time it takes for the FSCK to finish. ( someone please correct me if I'm wrong ) To the best of my knowledge, only the size of the filesystems and amount of data affects the time to FSCK a drive.

FSCK can be run in a parallel mode. However, if you run it against filesystems on the same disk you can create thrashing and drastically increase the time to FSCK. Check this link for some generic information about FSCK'ing in parallel mode. http://osr600doc.sco.com/en/FS_admin/_Generic_fsck_and_Its_Options.html

I hope this helps.
Ivan Ferreira
Honored Contributor

Re: FSCK time

>>> The precise question is if i am doing an fsck each month or after 6 months

My question is, why you run fsck? Are you using ext2? Would be great if you change to ext3 and disable the check with tune2fs.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Stuart Browne
Honored Contributor

Re: FSCK time

If you can take a filesystem offline periodically, doing the quick-test is enough to keep the forced check at bay. A quick check (like it does at bootup) only takes 1-2 minutes at most (tested on 4x1TB SATA software raid5) on an ext3.

That being said, if there are any problems, you are looking at hours.

Now, all this being said, unless your machine is forcibly rebooting without syncing harddrives reguarly, you aren't really going to have any issues with your filesystems.

All of my production machines are too mission critical to take a filesystem offline. Doing a quick online test always passes, but isn't terribly thorough.

If you want to stop the long-bootup times after a failure, then do as Ivan says, disable the forced check period.

If you want to avoid big issues, make sure your systems are stable, have proper power supplies, and are shut down cleanly when they were going to be offline.
One long-haired git at your service...
skt_skt
Honored Contributor

Re: FSCK time

My intention is to avoid the long boot up delays..

Most of the systems have ext3 . But there are a few which uses both ext2 & ext3.

did u mean when using ext3(journaled filesystems) there is no need of running fsck? journaled filesystems can take care of itself?

Stuart Browne
Honored Contributor

Re: FSCK time

No, but the journaling makes standard checks much quicker.

If the filesystem has gone-to-hell, then nothing you do will fix that.

How often are you getting 'long boot up times' ? Seriously, how often are you rebooting these machines?
One long-haired git at your service...
Ivan Ferreira
Honored Contributor

Re: FSCK time

The true is that with ext3, you don't need fsck unless a serious problem occurred. With journal, after a crash, transactions will be check in the journal, as a database does. After a crash, fsck on a ext3 system only check the journal, you can force a full fsck, but is not required.

Full fsck should be run after an I/O error, read only file system problems, ans so on...
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
skt_skt
Honored Contributor

Re: FSCK time

closing..