From 5e82d195aaafd94a58f59c3800560a5fadc64345 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Mon, 22 Dec 2008 10:03:09 -0300 Subject: [PATCH] rc.sysinit: implemented mdadm and lvm2 handling --- initramfs/etc_rc.d_rc.sysinit.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/initramfs/etc_rc.d_rc.sysinit.sh b/initramfs/etc_rc.d_rc.sysinit.sh index b3948a0..1c48e16 100644 --- a/initramfs/etc_rc.d_rc.sysinit.sh +++ b/initramfs/etc_rc.d_rc.sysinit.sh @@ -100,3 +100,27 @@ for x in $(unet pending); do check unet $x up status done + +if [ "$use_mdadm" = "yes" ]; then + title "Detecting RAID volumes" + check mdadm -Esv > /etc/mdadm.conf + status +fi + +if [ -s /etc/mdadm.conf ]; then + title "Starting RAID volumes" + check mdadm -As + status +fi + +if [ "$use_lvm" = "yes" ]; then + title "Detecting LVM volumes" + check vgscan + status +fi + +if [ -n "$(ls -1 /etc/lvm/archive/*.vg 2> /dev/null)" ]; then + title "Starting LVM volumes" + check vgchange -ay + status +fi