[plug] What does public opion feel about Riser FS?

Bernard Blackham bernard at blackham.com.au
Wed May 21 22:15:30 WST 2003


On Wed, May 21, 2003 at 09:58:22PM +0800, William Kenworthy wrote:
> ext3 on a laptop (so I can go ext2 for powersaving), but not impressed
> with it much - still wants to fsck at 20 mounts etc so I'll have to tune
> it sometime when I get around to it.

Random note: fsck'ing is *GOOD*. You always want to fsck regularly
- even with journalling filesystems. A journal might save you from
an inconsistent state when you pull the plug, but it won't save you
from random hardware corruptions that do occur occasionally. So it's
better you catch these before the filesystem does assume it's
consistent and starts propagating problems further.

Anyway, so I cobbled together a script that I run on boot (works
with ext2/3 only):

/etc/init.d/mount-count
---
#!/bin/sh

mountinfo=`tune2fs -l /dev/hda3 |grep "[Mm]ount count"`
mounts=`echo $mountinfo|cut -f2 -d:|awk '{print $1}'`
maxmounts=`echo $mountinfo|cut -f3 -d:|awk '{print $1}'`

echo Number of mounts till next fsck: $(($maxmounts-$mounts)) > /tmp/mount.status
---

and then in my .zshrc, "cat /tmp/mount.status"

So when I log in, I get a friendly "Number of mounts till next fsck: 28"
If I see this is getting "dangerously" low, then I'll let it fsck
overnight so that I'm not stuck somewhere in the middle of the day
doing a fsck.

Perhaps this'll help somebody else too! (Yes it's a shocking script,
but it works(tm). You'll probably want to change the hda3 to suit
your computer, or extend it to handle multiple partitions even...)

Regards,

Bernard.

-- 
 Bernard Blackham 
 bernard at blackham dot com dot au



More information about the plug mailing list