There seems to be a fundamental misconception here that running fsck "cleans up" or "clears" the filesystem. In general, this is not true. Fsck detects filesystem corruptions, and if it finds them, it fixes them. If it does not find any problems it's not going to "clean up" the filesystem in any way. (The same is true of the windows chkdsk command, BTW.) Unlike Windows' filesystems, ext3 is designed to recover from power failures, so it is rare that filesystem corruptions occur in the first place. The most common reason is hardware failures (i.e., bad memory, an unreliable cable, a disk failure, etc.)
The following script (e2croncheck) can be used if your filesystem was installed on an LVM system. It relies on taking an LVM snapshot, doing a read-only check on the snapshot, and if it passes, we reset the last mount count and last checked time in the original filesystem. If errors are detected, then e-mail is sent to the system administrator, so he/she can schedule manual downtime to manually correct any filesystem errors. On a system with reliable hardware, you should almost never to do this. Note that the shell script needs to be customized with the LVM volume group name, and logical volume name, as well as the e-mail to send reports. Essentially, though, the big misconception which I would appreciate help in addressing is to stamp out the myth that it makes any sense to run fsck right after you finish installing the system. Or that people should run fsck manually. *If* you know what you are doing, and you unmount the filesystem first --- and in the case of the root filesystem, that means going to single-user mode first --- you can run fsck manually. But you have to know what you are doing! Ubuntu does its best to hide this from users, which is fine, since for most users they don't need to know how to do this sort of thing. But that means unless you understand proper Unix system administration, you shouldn't go tampering with things that you don't have the technical know-how to do safely. This includes using this shell script; if you don't know what "LVM", "volume group", and "logical volume" means, then you probably don't know enough to use this shell script safely. And I do **not** want to be held liable for mistakes caused by users' inexperience. So this is advanced system administration stuff here. (Well, not that advanced for Unix folks, but for people who are Windows refugees, this is pretty advanced. :-) ** Attachment added: "A shell script for doing on-line filesystem checking (if you have LVM)" http://launchpadlibrarian.net/16741591/e2croncheck -- fsck destroy the system https://bugs.launchpad.net/bugs/254390 You received this bug notification because you are a member of Ubuntu Bugs, which is a direct subscriber. -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
