Re: Pb: umount / is busy
On Wed, 7 Apr 1999, Patrick Bertholon wrote:
> From: Patrick Bertholon <Patrick.Bertholon@Supelec.fr>
> Subject: Pb: umount / is busy
> X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5 i586)
>
>
> Hello,
>
> On my Debian 2.0, after I have upgraded to a 2.2 kernel, when I
> reboot or halt my computer, I have sometimes the message: umount : / is
> busy. That causes the system to check the disk on the next restart.
> I'd like to know why I have (sometimes) umount: /is busy, and how to
> correct it .
Really, this is problem which occur on many Linux variants. For some
reason some process doesn't die when it is time to umount filesystem
Best solution I've seen was on Redhat 4.2 /etc/init.d/halt script
# Turn off swap, then unmount file systems.
echo "Turning off swap"
swapoff -a
echo "Unmounting file systems"
umount -a
mount -n -o remount,ro /
echo "Remounting remaining filesystems (if any) readonly"
mount | awk '/ext2/ { print $3 }' | while read line; do
mount -n -o ro,remount $line
done
Only problem with this solution is that it assumes that awk
which is /usr/bin/awk on Debian is available after umount -a
(on Redhat awk is in /bin).
It can be easily fixed with
following command instead of loop above
mount |grep ext2| while read a b c junk; do
mount -n -o ro,remount $c
done
>
> Any help would be appreciated,
>
> Patrick Bertholon
>
>
> --
> To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
--------------------------------------------------
Victor Wagner vitus@ice.ru
Programmer Office:7-(095)-964-0380
Institute for Commerce Home: 7-(095)-135-46-61
Engineering http://www.ice.ru/~vitus
Reply to: