Additional features for /etc/rc.d/fsck
Alex Keda
admin at lissyara.su
Sun Nov 15 11:58:06 UTC 2009
hi!
I have many servers with using gjournal.
Sometimes, after unexpected reboot, booting OK, but, filesystem have
error. If I run fsck -y manually - all OK.
But, for some servers I do not have physical access, and check '/' and
some another filesystems - impossible.
I modify /etc/rc.d/fsck, and add 2 new options to rc.conf
HP$ grep fsck /etc/rc.conf
force_fsck="YES"
force_fsck_list="/"
HP$
It's required background_fsck="NO" in rc.conf
May be include it in source three? Very useful.
-------------- next part --------------
--- /root/fsck 2009-11-15 14:13:25.000000000 +0300
+++ /etc/rc.d/fsck 2009-11-15 14:42:32.000000000 +0300
@@ -27,7 +27,16 @@
if checkyesno background_fsck; then
fsck -F -p
else
- fsck -p
+ if checkyesno force_fsck; then
+ echo "Force fsck enabled"
+ for filesystem in ${force_fsck_list}
+ do
+ echo "Force check $filesystem"
+ fsck -y $filesystem
+ done
+ else
+ fsck -p
+ fi
fi
case $? in
More information about the freebsd-current
mailing list