Lines 637-653
startVolumes() {
Link Here
|
637 |
|
637 |
|
638 |
if [ "${USE_LVM_NORMAL}" = '1' ] |
638 |
if [ "${USE_LVM_NORMAL}" = '1' ] |
639 |
then |
639 |
then |
640 |
if [ -e '/bin/vgscan' -a -e '/bin/vgchange' ] |
640 |
if [ -e '/bin/lvm' ] |
641 |
then |
641 |
then |
642 |
for dev in ${RAID_DEVICES} |
642 |
for dev in ${RAID_DEVICES} |
643 |
do |
643 |
do |
644 |
setup_md_device "${dev}" |
644 |
setup_md_device "${dev}" |
645 |
done |
645 |
done |
646 |
|
646 |
|
647 |
good_msg "Scanning for Volume Groups" |
647 |
# This is needed for /bin/lvm to accept the following logic |
648 |
/bin/vgscan --ignorelockingfailure --mknodes 2>/dev/null |
648 |
lvm_commands="#! /bin/lvm" |
649 |
good_msg "Activating Volume Groups" |
649 |
# If there is a cahe, update it. Unbreak at least dmcrypt |
650 |
/bin/vgchange -ay --sysinit 2>/dev/null |
650 |
[ -d /etc/lvm/cache ] && lvm_commands="$lvm_commands \nvgscan --mknodes --ignorelockingfailure" |
|
|
651 |
# To activate volumegroups on all devices in the cache |
652 |
lvm_commands="$lvm_commands \nvgchange -ay --sysinit" |
653 |
# And finally execute it all (/proc/... needed if lvm is compiled without readline) |
654 |
good_msg "Scanning for and activating Volume Groups" |
655 |
echo -e "$lvm_commands" | /bin/lvm /proc/self/fd/0 2> /dev/null |
651 |
|
656 |
|
652 |
# Disable EVMS since lvm is activated and they dont work together. |
657 |
# Disable EVMS since lvm is activated and they dont work together. |
653 |
if [ "${USE_EVMS_NORMAL}" = '1' ] |
658 |
if [ "${USE_EVMS_NORMAL}" = '1' ] |