fsck is a pretty annoying little thing. I just had it suck some of my precious bodily fluids this morning when flipping my box on.
But it could be made a lot less so by having it do its thing at shutdown rather than at startup. Now, I've heard that you cannot do this because you need to run it on read-only disks to prevent data loss or something similar so it can only be run at startup.
But, what about if we modify the shutdown process to actually do a restart for us, run fsck and then shutdown. At the next actual startup it should work normally again. I guess this would be quite possible to implement but should be rigorously debugged so we don't end up in a never-ending loop.
OK, so where's the fault in my reasoning?
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
fsck at shutdown, with a twist
- Rolling Stone
- Posts: 366
- Joined: 2009-02-15 18:55
- Location: Turku, Finland
Re: fsck at shutdown, with a twist
Use JFS and enjoy.Rolling Stone wrote:where's the fault in my reasoning?
Re: fsck at shutdown, with a twist
If you use ext4 the filesystem checking is in seconds, not minutes, even on filesystems of 100s of GB. Checking the filesystems when they were ext3 (before I converted them) would take many times longer. This is an ext4 filesystem with extents enabled. It's almost completely full and contains mostly very large files, up to DVD9 size.Rolling Stone wrote:fsck is a pretty annoying little thing. I just had it suck some of my precious bodily fluids this morning when flipping my box on.
Code: Select all
/dev/sdc6 425G 408G 18G 96% /home/julian/Video
Code: Select all
# umount Video
Code: Select all
time e2fsck -f /dev/sdc6
e2fsck 1.41.9 (22-Aug-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Video: 13317/28286976 files (1.6% non-contiguous), 108598488/113117673 blocks
real 0m47.953s
user 0m15.000s
sys 0m0.372s
Wisdom from my inbox: "do not mock at your pottenocy"
Re: fsck at shutdown, with a twist
There is no fault in your reasoning -- you're just a couple of years too late. I've been using AutoFsck since before my OS went from brown to blue and it's very useful. There's nothing worse than starting up your laptop in front a client and being faced with an embarrassing wait for fsck.Rolling Stone wrote:OK, so where's the fault in my reasoning?
- Rolling Stone
- Posts: 366
- Joined: 2009-02-15 18:55
- Location: Turku, Finland
Re: fsck at shutdown, with a twist
Thanks for the replies. Can you convert a FS full of data? Which one should I pick?
Dual booting is of no concern to me but what about kernel upgrades, and what might myriad of obvious problems mean?AutoFsck - Technical Review wrote: AutoFsck actually doesn't check the filesystems on shutdown; it reboots your computer and then performs the check on startup, before shutting down your computer again.
There are a myriad of obvious problems with this approach; the major two being dual boot scenarios and kernel upgrades.
Re: fsck at shutdown, with a twist
You'll have to ask the author of the review about the problems.Rolling Stone wrote:Dual booting is of no concern to me but what about kernel upgrades, and what might myriad of obvious problems mean?
I use autofsck on two machines:
- Desktop, single boot to Squeeze -- partial reboot to read-only, fsck and then shutdown;
- Laptop, dual-boot Squeeze and Windows -- fsck after remounting read-only, during shutdown.
(Aside)
Having now read the linked review to the end, it seems somewhat disingenuous. I have no idea who the author is, but posting to the ubuntu-devel list and with an e-mail address at canonical.com, I presume he is close to Ubuntu. His comments demonstrate a failure to read the autofsck wiki page as well as somewhat missing the point.
Autofsck was a private effort. It works, even if it isn't pretty, and adequately addresses a perceived shortcoming that no-one at Ubuntu (or anywhere else, it seems) was interested in. It may not be absolutely robust and it may have unforeseen effects if things don't go right. If he doesn't like it, he could always invent a better mousetrap. There is still, more than two years on, no alternative official arrangement, autofsck remains a private effort and the timing of the standard file-system check remains an embarrassment.
Nick.
Re: fsck at shutdown, with a twist
ext3 to ext4: Ext4 Howto - Ext4Rolling Stone wrote:Thanks for the replies. Can you convert a FS full of data? Which one should I pick?
- Rolling Stone
- Posts: 366
- Joined: 2009-02-15 18:55
- Location: Turku, Finland