Merge branch 'vendor/GREP'
[dragonfly.git] / share / initrd / rc.lvm2
1 #!/bin/sh
2
3 if [ ! -x /sbin/lvm ]; then
4         return 1;
5 fi
6
7 echo "Configuring LVM volumes"
8
9 if [ ! -d /tmp/lvm2 ]; then
10         mkdir -p /tmp/lvm2
11 fi
12
13 export LVM_SYSTEM_DIR=/tmp/lvm2
14
15 # Scan for volume groups
16 /sbin/lvm vgscan --mknodes --ignorelockingfailure &> /dev/null
17
18 # Change volume availability to yes
19 /sbin/lvm vgchange --ignorelockingfailure -a y > /dev/null
20
21 # Get a list of volumes and display it
22 LV_LIST=$( /sbin/lvm vgdisplay -C -o vg_name --noheadings 2> /dev/null )
23 echo " Activated Volume Groups: $LV_LIST"