You are not logged in.

#1 2007-11-08 19:11:55

jaideep_jdof
Member
From: Delhi, India
Registered: 2006-06-05
Posts: 311

JFS forced check

Is it possible to configure JFS to force check after 30 mounts like ext3.

Offline

#2 2007-11-13 18:52:45

jaideep_jdof
Member
From: Delhi, India
Registered: 2006-06-05
Posts: 311

Re: JFS forced check

No comments means not possible?

Offline

#3 2007-11-14 00:56:46

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: JFS forced check

Maybe setting up a cron job to run fsck.jfs monthly will do the trick.

Offline

#4 2007-11-14 07:29:24

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: JFS forced check

No, it isn't. And a cronjob doesn't work if it's the rootfs; it has to stay mounted.


1000

Offline

#5 2007-11-14 11:36:29

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: JFS forced check

Why do you want to force a check? If your hardware is allright this should not be needed.

Offline

#6 2007-11-14 11:48:24

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: JFS forced check

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

#7 2007-11-15 07:53:02

jaideep_jdof
Member
From: Delhi, India
Registered: 2006-06-05
Posts: 311

Re: JFS forced check

Forced scan adds extra data safety.

Offline

#8 2007-11-15 10:27:56

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: JFS forced check

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

#9 2007-11-16 19:07:33

jaideep_jdof
Member
From: Delhi, India
Registered: 2006-06-05
Posts: 311

Re: JFS forced check

So you are using jfs for root, how did you get this forced fsck.

Offline

#10 2007-11-16 19:56:31

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: JFS forced check

Try to put this in /etc/rc.local.shutdown:

#!/bin/bash
touch /forcefsck

1000

Offline

#11 2007-11-16 19:59:25

jaideep_jdof
Member
From: Delhi, India
Registered: 2006-06-05
Posts: 311

Re: JFS forced check

byte wrote:

Try to put this in /etc/rc.local.shutdown:

#!/bin/bash
touch /forcefsck

What does this do?

Offline

#12 2007-11-16 20:26:09

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: JFS forced check

Use Google? See /etc/rc.sysinit?


1000

Offline

#13 2007-11-17 10:30:20

jaideep_jdof
Member
From: Delhi, India
Registered: 2006-06-05
Posts: 311

Re: JFS forced check

I found it, it performs a forced check on next boot, but i need it after 30 mounts.

Offline

#14 2007-11-17 13:15:16

Loke
Member
From: Denmark
Registered: 2005-10-21
Posts: 139

Re: JFS forced check

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 lol

Offline

#15 2007-11-17 13:27:44

jaideep_jdof
Member
From: Delhi, India
Registered: 2006-06-05
Posts: 311

Re: JFS forced check

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

#16 2007-11-17 22:23:55

Loke
Member
From: Denmark
Registered: 2005-10-21
Posts: 139

Re: JFS forced check

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

#17 2007-11-19 18:43:40

jaideep_jdof
Member
From: Delhi, India
Registered: 2006-06-05
Posts: 311

Re: JFS forced check

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

#18 2007-11-21 19:15:12

Loke
Member
From: Denmark
Registered: 2005-10-21
Posts: 139

Re: JFS forced check

jaideep_jdof wrote:

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

Board footer

Powered by FluxBB