Bug 7681 - halt script fails to stop mdX devices
Summary: halt script fails to stop mdX devices
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 6.1
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
: 7719 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-12-08 14:50 UTC by Christian Hechelmann
Modified: 2014-03-17 02:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-12-08 16:29:35 UTC
Embargoed:


Attachments (Terms of Use)

Description Christian Hechelmann 1999-12-08 14:50:50 UTC
The /etc/rc.d/init.d/halt fails to stop any md? devices, because of
unmounting /proc too early.

Furthermore only ext2 partitions are remounted ro during the last phase
of the shutdown, leaving any other filesystems mounted rw.

Patch follows:

--- /etc/rc.d/init.d/halt	Wed Dec  8 15:49:54 1999
+++ /etc/rc.d/init.d/halt.raid	Wed Dec  8 15:50:39 1999
@@ -83,7 +83,7 @@
 	retry=$(($retry-1))
 	sig=-9
 done
-runcmd "Unmounting proc file system" umount /proc
+
 mount -n -o remount,ro /

 # turn off raid
@@ -101,9 +101,11 @@
     #runcmd "Turning off RAID" /sbin/raidstop -a
 fi

+runcmd "Unmounting proc file system" umount /proc
+
 # Remount read only anything that's left mounted.
 #echo "Remounting remaining filesystems (if any) readonly"
-mount | awk '/ext2/ { print $3 }' | while read line; do
+mount -t noproc,devpts,nfs | awk '{ print $3 }' | while read line; do
     mount -n -o ro,remount $line
 done

Comment 1 Bill Nottingham 1999-12-08 16:29:59 UTC
Um, anthying else should already have been unmounted earlier.

The /proc unmounted has moved in CVS; will be fixed in
initscripts-4.72 when it is released.

Comment 2 Christian Hechelmann 1999-12-08 19:48:59 UTC
Sure, but if we are trying to remount the remaining fs' ro, we'd try this for
all the fs and not only ext2.

And if it happens, that a fs cannot be unmounted (in use), it might be possible
to remount it ro, so we can get around a (possibly lengthy) fsck run on
reboot...

Comment 3 Bill Nottingham 1999-12-13 16:13:59 UTC
*** Bug 7719 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.