sbin/newfs_hammer2: Remove redundant \n in err/errx
[dragonfly.git] / initrd / etc / rc.lvm2
blob57bf2ecedfb78cfadba90f18be44d438961950e2
1 #!/bin/sh
3 if [ ! -x /sbin/lvm ]; then
4 echo "ERROR: /sbin/lvm not exists or executable"
5 return 1
6 fi
8 echo "Configuring LVM volumes ..."
10 export LVM_SYSTEM_DIR=/var/tmp/lvm2
11 [ -d "$LVM_SYSTEM_DIR" ] || mkdir $LVM_SYSTEM_DIR
13 # Scan for volume groups
14 /sbin/lvm vgscan --mknodes --ignorelockingfailure &> /dev/null
16 # Change volume availability to yes
17 /sbin/lvm vgchange --ignorelockingfailure -a y > /dev/null
19 # Get a list of volumes and display it
20 LV_LIST=$( /sbin/lvm vgdisplay -C -o vg_name --noheadings 2> /dev/null )
21 echo " Activated Volume Groups: $LV_LIST"