-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2006-01-06 at 15:33 +0200, Hylton Conacher (ZR1HPC) wrote:
Anyone?
It isn't easy... it is too vague, and the feeling is that you are too "paranoid" ;-)
I have had a couple of fsck failures on booting my machine and whilst this is not many, I would like to prevent data loss as much as possible until I can implement a thorough backup solution.
No, that's not the correct way to look at it. Sooner or later, you will have data loss, no matter what you do: so you must have a backup.
I therefore want to test the harddrives for impending failure and also check the filesystem a disk that is OK as without an error free fs the disk is mostly useless as the fs allows data to be written to and stored on the disk. Should an fsck error occur on boot in future I plan to run # e2fsck -pcv -C fd /dev/hd<faulty partition number> as opposed to # plain # fsck /dev/hd<faulty partition number>
If you want to do such a thing, the place are the scripts /etc/init.d/boot.rootfsck and /etc/init.d/boot.localfs - but those scripts already do analyze the filesystems in case of problems when booting (and after every system crash or power failure); I'd be very careful about modifying them. But this is Linux, not windows: it is very difficult to develop filesystem errors; most are caused by system crashes or power failures. The system will not corrupt your fs while running, even during months.
I am aware of the SMARTCTL(courtesy of Carlos), and TUNE2FS programs to complete the above task but do not know how to implement them so that these programs are run at various intervals when the machine is powered on. I have run #smartctl -a on both the hard drives and saw that SMARTCTL was enabled on both.
My personal feeling is that TUNE2FS is adequate for my system but I set the fsck parameters a long time ago on all of my partitions with the tune2fsck command and now would like to change the settings.
With tunefs you can adjust how often is fsck run on each partition at boot up. Smartctl does a very different check, it doesn't know anything about the filesystem.
I would like to run a fsck at varying times on the different partitions so that, while the disk might fail, the fs on it would be correct.
That would be of very little use. If the disk fails, a) you will probably not be able to read it. b) the fs would probably get corrupted in the process of failing.
Looking at the tune2fsck man page I have decided given the advice that, I should stick to the latter of either mount_count or time dependency checking.
So I figured I needed the following:
#tune2fs -c0 -id<days between checks> /dev/hdd<partition number>
This would disable to mount_count checking and run a check on ? no of days on the given device. However no matter how I have tried to amend it to work each time I run the command it just gives me the syntax help(Which really isn't any help).
Why on earth do you want to disable either mount count or time dependency count? Why not both? The settings that SuSE does by default are very sensible, I would not alter them so much. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDwur6tTMYHG2NR9URAmt3AJ9U4n3dQjG80edU2dITI41qIEeSowCfY27g 0YlHiF8KinHf5Gj1Xziw9KA= =kVjh -----END PGP SIGNATURE-----