Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / gpl2 / lvm2 / dist / scripts / vg_convert
blob6559941810b704edc872a83238c47d82a6307f67
1 #!/bin/sh -x
3 # Original script used to convert a VG from LVM1 to LVM2 metadata format.
4 # Superceded by 'vgconvert', but left here to show how to do it step-by-step.
6 # Takes vgname as parameter. No error checking. Uses temp file 'lvmbackup'.
8 echo "Please use the 'vgconvert' tool instead"
9 exit 1
11 ./vgcfgbackup $1 || exit 1
12 ./vgcfgbackup --file lvmbackup $1 || exit 1
14 CMDS=`./pvscan -u | sed -ne "s/.*PV \(.*\) with UUID \(.*\) VG $1 .*/.\/pvcreate -ff -y -M lvm2 --restorefile lvmbackup -u \2 \1 ; /p"`
16 sh -x -c "$CMDS" || exit 1
18 ./vgcfgrestore --file lvmbackup -M lvm2 $1 || exit 1