You are not logged in.
Pages: 1
Is it possible to configure JFS to force check after 30 mounts like ext3.
Offline
No comments means not possible?
Offline
Maybe setting up a cron job to run fsck.jfs monthly will do the trick.
Offline
No, it isn't. And a cronjob doesn't work if it's the rootfs; it has to stay mounted.
1000
Offline
Why do you want to force a check? If your hardware is allright this should not be needed.
Offline
I've had 'jfs_fsck -v -f' find errors that the simple journal replay on boot didn't fix, so the idea is alright. Usually I boot with a livecd once a month and check all disks (smartctl) and filesystems (*fsck).
1000
Offline
Forced scan adds extra data safety.
Offline
I fsck every mount..because i have a separate JFS primary partition which doesn't mount w/o a check. For my root & other partitions, if im right every 30 mounts they DO get checked.
I need real, proper pen and paper for this.
Offline
So you are using jfs for root, how did you get this forced fsck.
Offline
Try to put this in /etc/rc.local.shutdown:
#!/bin/bash
touch /forcefsck
1000
Offline
Try to put this in /etc/rc.local.shutdown:
#!/bin/bash touch /forcefsck
What does this do?
Offline
Use Google? See /etc/rc.sysinit?
1000
Offline
I found it, it performs a forced check on next boot, but i need it after 30 mounts.
Offline
What about making some sort of counter? Maybe you can use this suggestion, however you probably want to edit it for your own commands/paths/etc.
#!/bin/bash
ab=`cat /counter.txt`
if [ "$ab" -lt "30" ]
then
echo `echo $ab+1 | bc` > /counter.txt
fi
if [ "$ab" -eq "30" ]
then
# do some check command here or touch /forcefsck perhaps?
echo 1 > /counter.txt
fi
Maybe you can have it executing at boot or something, use your imagination
Offline
How about i place this command in the /etc/rc.local.shutdown. Will that work.
#!/bin/bash
ab=`cat /counter.txt`
if [ "$ab" -lt "30" ]
then
echo `echo $ab+1 | bc` > /counter.txt
fi
if [ "$ab" -eq "30" ]
then
touch /forcefsck
echo 1 > /counter.txt
fi
Offline
I'm pretty sure it would, however I haven't tested it.
Remember to do an echo 1 > /counter.txt before you use the script though so it has a number to start from.
Last edited by Loke (2007-11-17 22:25:01)
Offline
This script after rebooting is erasing the file counter.txt of all entries.
Last edited by jaideep_jdof (2007-11-19 20:00:11)
Offline
This script after rebooting is erasing the file counter.txt of all entries.
Hmm I don't see why it is doing that, maybe someone else knows?
But anyways my bash-skill isn't the best, so it might be that, but the idea itself should be good enough.
Offline
Pages: 1