diff options
author | Kim Hagen <kim.sidney@gmail.com> | 2019-06-12 12:37:24 +0200 |
---|---|---|
committer | Kim Hagen <kim.sidney@gmail.com> | 2019-06-12 12:44:54 +0200 |
commit | 52856255026d37001e9a4b7749110a0e49ef2c5d (patch) | |
tree | 2581eae53fa76f7de0d15bb1c83f73d4373e6430 | |
parent | 290fc6e53317a26e57a8b91cde808af39e531cea (diff) | |
download | vyatta-cfg-system-52856255026d37001e9a4b7749110a0e49ef2c5d.tar.gz vyatta-cfg-system-52856255026d37001e9a4b7749110a0e49ef2c5d.zip |
Force create raid without answering the question if you want to create it.
Update initramfs to include raidconfig avoiding md127 being created on reboot.
-rwxr-xr-x | scripts/install/install-get-partition | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index b3f2741e..9f6473e1 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -302,12 +302,16 @@ check_for_new_raid () { echo "Creating RAID-1 group on partitions: /dev/${drive1}${data_dev} /dev/${drive2}${data_dev}" raid_dev=md0 - mdadm --create /dev/$raid_dev --level=1 --raid-disks=2 --metadata=0.90 \ + yes|mdadm --create /dev/$raid_dev --level=1 --raid-disks=2 --metadata=0.90 \ /dev/${drive1}${data_dev} /dev/${drive2}${data_dev} if [ $? = 0 -a -e /dev/$raid_dev ]; then echo "RAID-1 group created successfully:" cat /proc/mdstat | grep --after-context 2 ^$raid_dev | sed -e 's/^/\t/' + if [ -e /usr/sbin/update-initramfs.orig.initramfs-tools ] + echo "Updating initramfs to include the raid config:" + /usr/sbin/update-initramfs.orig.initramfs-tools -u + fi else echo "Unable to create RAID-1 group!" return |