10 echo "your disk seems to be part of a lvm volume group"
11 echo "we will try to recreate it"
13 num=`grep /dev working/scripts/create-vg |wc -w`
20 for n in `seq 3 2 $num`;do
21 lvdisk=`grep /dev working/scripts/create-vg |cut -d"/" -f$n`
22 ifraid=`echo $lvdisk|cut -c 1-2`
25 if [ "$ifraid" = "md" ];then
29 grep $lvdisk working/scripts/recreate_raid_arrays>checkraidtemp
31 . ./restore2/raid_check_ifdev
40 fdisk -l |grep $lvdisk >/dev/null
44 . ./restore2/full_disk
50 name=`ls /dev/mapper/* |grep -v control`
51 if [ ! $name = "" ];then
54 . working/scripts/create-pv
55 . working/scripts/create-vg
56 . working/scripts/create-lv
57 exe=`ls working/scripts/format.*|grep -v sd|grep -v hd`
58 ######## have to try with many lvm
59 ########## maybe it formats them all
60 ########### which could make damage
63 fields=`echo $new|wc -w`
64 while [ $fields -ne 0 ];do
65 echo $new |awk "{print \$ $fields}"|grep /dev>/dev/null 2>&1
67 a=`echo $new |awk "{print \$ $fields}"|grep /dev`
73 fields=$(( fields - 1))