[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RH problem
>>>>> Will == Will Newton <will [at] south-of-heaven.demon.co.uk> writes:
Will> My system is RH 5 upgraded heavily running the initscripts
Will> from 6.1 and the latest dev. kernel (2.3.35).
This doesn't say anything to me; did it start with the dev kernel,
does it happen with stable kernels? (I have not yet built a 2.3
kernel, shame on me....)
Will> When I get to shutdown I get Unmounting file systems
Will> followed by device /usr is busy unmount failed (or
Will> similar).
How many times? The Unmounting file systems should be output
_three_ times according to the script below.
Will> Then the shutdown stops with my /usr partition still
Will> mounted. Not good.
You're sure it's still mounted? Eg, when you startup again it always
fscks?
Will> # Unmount file systems, killing processes if we have to.
Will> sig=
Will> retry=3
Will> remaining=`awk '!/(^#|proc|^none|^/dev/root| / )/ {print $2}'
/proc/mounts`
Will> while [ -n $remaining -a $retry -gt 0 ]
Will> do
Will> runcmd Unmounting file systems umount -a -f
Will> sleep 2
Will> remaining=`awk '!/(^#|proc|^none|^/dev/root| / )/ {print
$2}' /proc/mounts`
Will> [ -z $remaining ] break
Will> /sbin/fuser -k -m $sig $remaining >/dev/null
Remove this '>/dev/null' and see what fuser says about what is using
the remaining file systems. Maybe add -a -v options, too, while
you're at it. John's right, you need to be sure that's where fuser
lives, but I think you'd see a command not found error if it's not
there.
Will> sleep 5
Will> retry=$(($retry-1))
Will> sig=-9
Will> done
Will> I'm not really a shell guru so I don't know exactly what's
Will> the problem (awk scares me).
Nothing really guru-vy happening here. The bash documentation really
sucks though; if you want to learn shell programming the zsh docs
might be better. A sysadmin buddy of mine says zsh is the Shell of
the Gods ;-)
Almost all awk and sed found in shell scripts are used to handle the
fact that the shell doesn't do regexps well or very generally.
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
/- /System.old /apps /bin /boot /dev /etc /home /lib /lost+found /misc /mnt /net /proc /root /sbin /share /tmp /usr /var What's the big deal about the millenium? ..............................
..... There are still 362 shopping days left until the millenial epoch! */
Start your own FREE mailing list at
© 2000 Microsoft Corporation. All Rights Reserved