Date: Sun, 15 Nov 2009 14:58:02 +0300 From: Alex Keda <admin@lissyara.su> To: current@freebsd.org Subject: Additional features for /etc/rc.d/fsck Message-ID: <4AFFECCA.5010706@lissyara.su>
index | next in thread | raw e-mail
[-- Attachment #1 --]
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.
[-- Attachment #2 --]
--- /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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AFFECCA.5010706>
