ALT Linux kernel packages development
 help / color / mirror / Atom feed
* [d-kernel] Возвращаясь к RAID
@ 2005-02-11 20:56 Шадринов Д. Д.
  2005-02-12 10:57 ` Vitaly Lipatov
  0 siblings, 1 reply; 2+ messages in thread
From: Шадринов Д. Д. @ 2005-02-11 20:56 UTC (permalink / raw)
  To: devel-kernel

Раз уж при выключении размонтировать корень невозможно, а корень расположен
на RAID, может быть не стоит выводить сообщение FAILED, а использовать
 проверку оставшихся подмонтированных файловых систем и отрубать только
 те RAID'ы которые не используются? Например так:

--- /etc/init.d/halt    2004-03-04 17:28:34 +0300
+++ /mnt/root/etc/init.d/halt   2005-02-11 21:07:22 +0300
@@ -102,6 +102,12 @@
        "Unmounting filesystem" \
        "Unmounting filesystem (retry)"

+[ -f /proc/bus/usb/devices ] && umount -n /proc/bus/usb >/dev/null 2>&1
+
+# Remount read-only anything that's left mounted.
+action "Remounting remaining filesystems (if any) read-only:" umount -anrf
+action "Remounting root filesystem read-only:" mount -n -o remount,ro /
+
 # Turn off raid.
 RAIDSTOP=/sbin/raidstop
 if [ -x "$RAIDSTOP" -a -f /etc/raidtab ]; then
@@ -110,20 +116,22 @@
        # the case. So we look only for the active raid devices
        if [ -f /proc/mdstat ] ; then
                mddevs=$(grep ^md /proc/mdstat | awk '{ print $1 }')
+               mntdevs=$(mount | awk '{ print $1 }')
                for mddev in $mddevs ; do
+                       for mntdev in $mntdevs ; do
+                               if [ "/dev/$mddev" = "$mntdev" ] ; then
+                                       action "Skipping mounted RAID $mddev"
+                                       continue 2
+                               fi
+                       done;
+
                        action "Turning off RAID for $mddev:" "$RAIDSTOP" 
"/dev/$mddev"
                done
-               unset mddev mddevs
+               unset mddev mddevs mntdev mntdevs
        fi
        #action "Turning off RAID:" /sbin/raidstop -a
 fi

-[ -f /proc/bus/usb/devices ] && umount -n /proc/bus/usb >/dev/null 2>&1
-
-# Remount read-only anything that's left mounted.
-action "Remounting remaining filesystems (if any) read-only:" umount -anrf
-action "Remounting root filesystem read-only:" mount -n -o remount,ro /
-
 action "Unmounting proc filesystem:" umount -n /proc

 # See if this is a powerfail situation.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [d-kernel] Возвращаясь к RAID
  2005-02-11 20:56 [d-kernel] Возвращаясь к RAID Шадринов Д. Д.
@ 2005-02-12 10:57 ` Vitaly Lipatov
  0 siblings, 0 replies; 2+ messages in thread
From: Vitaly Lipatov @ 2005-02-12 10:57 UTC (permalink / raw)
  To: ALT Linux kernel packages development

On Friday 11 February 2005 23:56, Шадринов Д. Д. wrote:
> Раз уж при выключении размонтировать корень невозможно, а
> корень расположен на RAID, может быть не стоит выводить
> сообщение FAILED, а использовать проверку оставшихся
Возможно стоит вашим предложением дополнить
https://bugzilla.altlinux.org/show_bug.cgi?id=6068
чтобы оно не осталось забытым?

-- 
Lav
Виталий Липатов
Санкт-Петербург
GNU! ALT Linux Team! LaTeX! LyX!


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-12 10:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-11 20:56 [d-kernel] Возвращаясь к RAID Шадринов Д. Д.
2005-02-12 10:57 ` Vitaly Lipatov

ALT Linux kernel packages development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
		devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
	public-inbox-index devel-kernel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git