fsck on mounted system?

Liam Proven lproven at gmail.com
Fri Sep 7 15:24:08 UTC 2012


On 7 September 2012 16:17, Avi Greenbury <lists at avi.co> wrote:
> Liam Proven wrote:
>> On 7 September 2012 14:30, Dave Howorth <dhoworth at mrc-lmb.cam.ac.uk>
>> wrote:
>> > Liam Proven wrote:
>> >> On 7 September 2012 11:26, oxy <oxyopes at googlemail.com> wrote:
>> >>>> sudo touch /forcefsck
>> >>>>
>> >>>> and then the filesystem should be checked at the next reboot.
>> >>>
>> >>> is there a way to force fsck on shutdown?
>> >>
>> >> No, not AFAIK, because the system would have to drop from a
>> >> multituser runlevel down to single-user in order that the
>> >> filesystems could be remounted read-only.
>> >
>> > That could be done of course,
>>
>> Yes, you are quite right. Non-trivial, though, and liable to cause
>> questions to be asked of a user who will not be able to answer them.
>
> This is hardly different to a boot-time check, though.

Not massively, no, but hey, someone asked.

> Perhaps it could
> do a check-without-repair, then prompt with questions on next boot?

It could, but what's the point?

>> > but at shutdown, the system is also in its
>> > 'most likely to be corrupt' state. Not the ideal time to run some
>> > self-checking code.
>>
>> Not 100% convinced of that, but OTOH, what we have works, so by the
>> KISS principle I am inclined to leave it well alone.
>
> I don't think it does. I've never booted up a computer intending to not
> use it until it's had time to fsck its disks.

I am afraid I can't follow this sentence. Too many nested negatives.

> I don't recall the last
> time any of my workstations got to the natural end of an automatic fsck

I generally let them do it unless I'm in a hurry. Occasionally, if I
have had an abend, I schedule one myself with the forcefsck file - one
on / and one on /home.

> and I'd be surprised if I wasn't in at least a substantial minority.

I fear you are probably right.

I was amazed to discover, a few years ago, how many Windows techies
don't know how to do a CHKDSK and who *never* routinely do one. I
think it's a brilliant idea that Linux schedules one periodically.

-- 
Liam Proven • Profile: http://lproven.livejournal.com/profile
Email: lproven at cix.co.uk • GMail/G+/Twitter/Flickr/Facebook: lproven
MSN: lproven at hotmail.com • Skype/AIM/Yahoo/LinkedIn: liamproven
Tel: +44 20-8685-0498 • Cell: +44 7939-087884




More information about the ubuntu-users mailing list