On Thursday 30 September 2004 02:30 am, Hylton Conacher (ZR1HPC) wrote:
Hi,
Being of previous Windows mindset, I am paranoid about data loss due to corrupt file systems. To ease my mind and make sure I am doing nearly everything I can to prevent data loss, I would like to check the linux ext3 fs at boot for bad blocks as the fsck check does not do this. Granted the fs system is self healing, with the journal, but the fs cannot normally check for bad blocks, which can result in data loss and which I assume is from the slow degradation of the HDD.
Reading through the man page I see that e2fsck would do want I want and I am wondering which file I need to edit to have e2fsck run on a regular(every few days) or each time the machine is rebooted.
I would assume that I would need a script, with the relevant e2fsck commands in it, that is called by the cron daemon but I need this script to run before the devices are mounted ie at a similar time to when the normal fsck runs, if it has to.
Further thought says that I should just enter the name of the script I create into the boot process so that it is run at the same time or instead of the usual fsck command, however I do not know which file to add it into. Should I add an entry into my /etc/init.d/boot.local? I would assume that I cannot just put in the script name and path to the script which could be sitting in my home directory as the /home hasn't been mounted yet, right?
Guidance fellow SuSians? ==========
Sure, quit thinking like a Windows user! Running an unnecessary check frequently could possibly be more harmful than good, plus you just don't need to do it! Turn on Smart disk in your bios, as this will test the disk on startup and let Linux take care of the rest for you. The file system is better, the OS is better and will keep you better apprised of what's happening with the hardware. Lee -- --- KMail v1.7 --- SuSE Linux Pro v9.1 --- Registered Linux User #225206 Those Who Dance Are Considered Insane, by Those Who Cannot Hear the Music!