Bug 7681 - halt script fails to stop mdX devices
halt script fails to stop mdX devices
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
6.1
All Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
:
: 7719 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-12-08 09:50 EST by Christian Hechelmann
Modified: 2014-03-16 22:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-12-08 11:29:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Christian Hechelmann 1999-12-08 09:50:50 EST
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 11:29:59 EST
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 14:48:59 EST
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 11:13:59 EST
*** 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.