Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 7681 - halt script fails to stop mdX devices
Summary: halt script fails to stop mdX devices
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
: 7719 (view as bug list)
Depends On:
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:
Last Closed: 1999-12-08 16:29:35 UTC

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/	Wed Dec  8 15:50:39 1999
@@ -83,7 +83,7 @@
-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

+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

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

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.