On 12/09/2014 at 10:09 AM, Chris Bannister wrote: > On Tue, Dec 09, 2014 at 09:48:58AM +0100, Frédéric Marchal wrote: > >> Now, is it possible to run fsck during shutdown? Users have been >> asking for this for at least 10 years. Is it now acceptable, >> possible, tolerated? > > That sounds like a recipe for disaster. Do you mean *before* > shutdown?
Obviously, "during shutdown" means "during the shutdown process", i.e., during the sequence of shutting-down-the-system steps which takes place in response to a "shutdown" command. That sequence already does several things prior to actually shutting down the system; perhaps most obviously, it tells various "services" to stop cleanly, kills other processes, and unmounts filesystems. There seems as if there should be no conceptual reason why it shouldn't be possible to add an additional "run a fsck" step into that sequence, probably after the unmount and before the final shutdown itself. ...except that fsck of root during the boot process is possible only because root hasn't been mounted yet, because we're still in the initramfs and haven't pivoted into the real root yet. So making that possible during shutdown would probably require setting up another ramdisk during the shutdown process (which sounds like a bad idea), pivoting into it, unmounting the original root, and then triggering the fsck... All in all, while it *might* be possible, I don't think it sounds like that would be worth the trouble. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
signature.asc
Description: OpenPGP digital signature