﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
413	analyze-my-lvm leaves out the pvcreate's when mondarchive has the -E option	Michael Shapiro	Bruno Cornec	"mindi-2.0.7.2-1.rhel5[[BR]]

mondo-2.2.9.2-1.rhel5


Ran mondoarchive as follows:



mondoarchive -N -O -9 -p mondo-mrou43 -n mrou10:/nwinstall -d mondo/mrou43 -s 650m -E ""/dev/sdb /dev/sdc""



The lvm.res file does not have the pvcreate line(s) causing the restore to fail:


{{{
/usr/sbin/lvmdiskscan
/sbin/lvm
i=2
LVM version >= 2.0 found.
Just before you extrapolate mountlist to include RAID partitions,
extrapolate it to include the following LVM drives and partitions:-
>>>>> /dev/sda2 
To get started, type:-
(insmod dm-mod)
(insmod dm_mod)
# lvm vgchange -an
# lvm vgscan
 
Finally, create the LV's (logical volumes).
Not including LV lvol1 as VG vgtest was excluded
# lvm lvcreate -L 13219m -r auto -n LogVol00 VolGroup00
# lvm lvcreate -L 2017m -r auto -n LogVol01 VolGroup00
 
# lvm vgscan
Now you may format the LV's:-
(mkfs -t foo /dev/vgtest/lvol1 or something like that)
(mkfs -t foo /dev/VolGroup00/LogVol00 or something like that)
(mkfs -t foo /dev/VolGroup00/LogVol01 or something like that)
 
Finally, to shut down and delete the volumes, do this:-
(lvm lvremove -f /dev/vgtest/lvol1)
(lvm lvremove -f /dev/VolGroup00/LogVol00)
(lvm lvremove -f /dev/VolGroup00/LogVol01)
(lvm vgchange -a n vgtest)
(lvm vgchange -a n VolGroup00)
(lvm vgremove vgtest)
(lvm vgremove VolGroup00)
(rmmod dm-mod & rmmod dm_mod & )

}}}

If I remove the -E option, the lvm.res file is correct:


mondoarchive -N -O -9 -p mondo-mrou43 -n mrou10:/nwinstall -d mondo/mrou43 -s 650m

{{{
/usr/sbin/lvmdiskscan
/sbin/lvm
i=2
LVM version >= 2.0 found.
Just before you extrapolate mountlist to include RAID partitions,
extrapolate it to include the following LVM drives and partitions:-
>>>>> /dev/sdb1 /dev/sda2 
To get started, type:-
(insmod dm-mod)
(insmod dm_mod)
# lvm vgchange -an
# echo y | lvm pvcreate -ff /dev/sdb1
# echo y | lvm pvcreate -ff /dev/sda2
# lvm vgscan
 
Create and activate the VG's (volume groups).
# lvm vgcreate vgtest -l 0 -p 0 -s 4m /dev/sdb1
# lvm vgchange -a y vgtest
# lvm vgcreate VolGroup00 -l 0 -p 0 -s 32m /dev/sda2
# lvm vgchange -a y VolGroup00
 
Finally, create the LV's (logical volumes).
# lvm lvcreate -L 52m -r auto -n lvol1 vgtest
# lvm lvcreate -L 13219m -r auto -n LogVol00 VolGroup00
# lvm lvcreate -L 2017m -r auto -n LogVol01 VolGroup00
 
# lvm vgscan
Now you may format the LV's:-
(mkfs -t foo /dev/vgtest/lvol1 or something like that)
(mkfs -t foo /dev/VolGroup00/LogVol00 or something like that)
(mkfs -t foo /dev/VolGroup00/LogVol01 or something like that)
 
Finally, to shut down and delete the volumes, do this:-
(lvm lvremove -f /dev/vgtest/lvol1)
(lvm lvremove -f /dev/VolGroup00/LogVol00)
(lvm lvremove -f /dev/VolGroup00/LogVol01)
(lvm vgchange -a n vgtest)
(lvm vgchange -a n VolGroup00)
(lvm vgremove vgtest)
(lvm vgremove VolGroup00)
(rmmod dm-mod & rmmod dm_mod & )
}}}

I was able to fix the problem by adding a line to the !ListAllPhysicalVolumes function (see comment ##### ADDED THIS LINE #####):



{{{
        for d in `cat $MINDI_TMP/pv.tmp`; do
                # Skip devices excluded, coming from mondoarchive
                skip=0
                ##### ADDED THIS LINE #####
                l=""""
                ##### END ADDED THIS LINE #####
                l=""$l `mindi --readalllink $d`""
                l=""$l `GiveMapperOfdm $d`""
                list_of_devices=""`echo $l | sort -u`""
                if [ ""$MINDI_EXCLUDE_DEVS"" ] ; then
                        for ed in $MINDI_EXCLUDE_DEVS ; do 
                                if  [ ""`echo "" $list_of_devices "" | grep "" $ed""`"" != """" ]; then 
                                        skip=1   
                                        continue 
                                fi       
                        done     
                fi
                if [ $skip -eq 1 ]; then  
                        continue 
                fi       
                echo $d >> $MINDI_TMP/pv.tmp2
        done
}}}
"	defect	closed	normal	2.2.9.3	mindi	2.2.9.2	major	fixed		
