diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2008-11-19 10:16:22 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2008-11-19 10:16:22 -0800 |
commit | a91be4ee51527f2ed975a36d433101ec720437a4 (patch) | |
tree | d7802ef8a4b124a0fb6cfbd8aee01e58149b350a /scripts/install-system | |
parent | dc24799bd733e6d32170a611b88968ba685504b7 (diff) | |
download | vyatta-cfg-quagga-a91be4ee51527f2ed975a36d433101ec720437a4.tar.gz vyatta-cfg-quagga-a91be4ee51527f2ed975a36d433101ec720437a4.zip |
Bugfix 3738: Improve safety in installing onto RAID sets.
Issue a warning if installing onto a RAID set that is degraded, but
not in active rebuild. Don't let the user install onto a RAID set
that is in the process of rebuild because it is unsafe.
Diffstat (limited to 'scripts/install-system')
-rwxr-xr-x | scripts/install-system | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/install-system b/scripts/install-system index b941d9b6..f2ee5b09 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -288,6 +288,33 @@ check_for_old_raid () { echo "Using RAID partition $INSTALL_DRIVE" + raid_degraded=`cat /sys/block/$INSTALL_DRIVE/md/degraded` + raid_sync_action=`cat /sys/block/$INSTALL_DRIVE/md/sync_action` + + if [ "$raid_degraded" = "1" ]; then + echo + if [ "$raid_sync_action" = "recover" ]; then + echo "Error: This RAID set is degraded and is in the process of" + echo "rebuilding. It is not safe to install onto it while the" + echo "rebuild is in progress. Please wait for the rebuild to" + echo "complete and then re-start the installation. You may" + echo "monitor the progress of the RAID rebuild with the" + echo "command:" + echo + echo " show raid $INSTALL_DRIVE" + echo + exit 1 + fi + echo "Warning: This RAID set is degraded, but is not in the" + echo "process of rebuilding. It is safe to perform the installation" + echo "onto a degraded RAID set that is not in the process of" + echo "rebuilding. You may stop the installation now and rebuild the" + echo "RAID set, or continue installing onto it. If you continue" + echo "installing, do not attempt to rebuild the RAID set until the" + echo "installation has completed and you have rebooted the system." + echo + fi + warn_of_dire_consequences ROOT_PARTITION=$INSTALL_DRIVE |