lkml.org 
[lkml]   [1996]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectProblems umounting root fs
Whenever I do a proper shutdown on my system (using the attached
rc.0/rc.6 script) there is always one inode that ends up with zero
dtime. I know this since (now that I have discovered the problem) I
have set up my rc.S to force an fsck on the fs every reboot. I am
posting this problem here since the script properly syncs and umounts
the fs, and thus I suspect that this is a kernel-level problem. Has
anyone else seen this problem? Am I just doing something uninformed (as
opposed to stupid :) )?

Thanks.

B
--
---------------------------------------------------------------------------
Brian R. Doherty | "You know, I bet a funny thing about driving a
6320 S. Main St. | car off a cliff is, while you're in midair,
you
Houston, TX 77006 | still hit those brakes! Hey, better try the
doherty@rice.edu | emergency brake!" -- Jack
Handey
#! /bin/sh
#
# rc.6 This file is executed by init when it goes into runlevel
# 0 (halt) or runlevel 6 (reboot). It kills all processes,
# unmounts file systems and then either halts or reboots.
#
# Version: @(#)/etc/rc.d/rc.6 1.50 1994-01-15
#
# Author: Miquel van Smoorenburg <miquels@drinkel.nl.mugnet.org>
# Modified by: Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
#

# Set the path.
PATH=/sbin:/etc:/bin:/usr/bin

# # Set linefeed mode to avoid staircase effect.
# stty onlcr

echo "Running shutdown script $0:"

# Find out how we were called.
case "$0" in
*0)
message="The system is halted."
command="halt"
;;
*6)
message="Rebooting."
command=reboot
;;
*)
echo "$0: call me as \"rc.0\" or \"rc.6\" please!"
exit 1
;;
esac

# Kill all processes.
# INIT is supposed to handle this entirely now, but this didn't always
# work correctly without this second pass at killing off the processes.
# Since INIT already notified the user that processes were being killed,
# we'll avoid echoing this info this time around.
if [ "$1" != "fast" ]; then # shutdown did not already kill all processes
# echo
# echo "Sending all processes the TERM signal."
killall5 -15
# echo -n "Waiting for processes to terminate"
# for loop in 0 1 2 3 4 5 6 7 ; do
sleep 1
# echo -n "."
# done
# echo
# echo "Sending all processes the KILL signal."
killall5 -9
fi

# Try to turn off quota and accounting.
if [ -x /usr/sbin/quotaoff ]
then
echo "Turning off quota."
/usr/sbin/quotaoff -a
fi
if [ -x /sbin/accton ]
then
echo "Turning off accounting."
/sbin/accton
fi

# Before unmounting file systems write a reboot or halt record to wtmp.
$command -w

# Save localtime
[ -e /usr/lib/zoneinfo/localtime ] && cp /usr/lib/zoneinfo/localtime /etc

# Asynchronously unmount any remote filesystems:
echo "Unmounting remote filesystems."
umount -a -tnfs &
sleep 1

# Turn off swap, then unmount local file systems.
echo "Turning off swap."
swapoff -a
echo "Unmounting local file systems."
sync
umount -a -tnonfs
# Don't remount UMSDOS root volumes:
if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
mount -n -o remount,ro /
fi

# See if this is a powerfail situation.
if [ -f /etc/power_is_failing ]; then
echo "Turning off UPS, bye."
/usr/sbin/powerd -q
exit 1
fi

# Now halt or reboot.
echo "$message"
sleep 1
[ ! -f /etc/fastboot ] && echo "On the next boot fsck will be FORCED."
$command -f

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.042 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site