Operating System - HP-UX
1832645 Members
2983 Online
110043 Solutions
New Discussion

Removed PE before removing VG

 
CJENSEN_1
Regular Advisor

Removed PE before removing VG

Did a whoopsie. Now I'm trying to remove the VG and Logical volumes and I am getting: vgcfgbackup: invalid lvmrec on physical volume /dev/rdsk/c4t1d3. What's the workaround?
7 REPLIES 7
John McWilliams_1
Frequent Advisor

Re: Removed PE before removing VG

Try using rmsf. I have done the same thing many time but found this command the other day
CJENSEN_1
Regular Advisor

Re: Removed PE before removing VG

in my subject, i meant PV (Physical Volume). I removed these prior to removing the logical volumes and volume groups.
Patrick Wallek
Honored Contributor

Re: Removed PE before removing VG

Use vgexport to wipe out the VG.
CJENSEN_1
Regular Advisor

Re: Removed PE before removing VG

when I try the vgexport command (vgexport -m vg16.mapfile /dev/vg16), unix indicates the vg is still active.
CJENSEN_1
Regular Advisor

Re: Removed PE before removing VG

I think I'm almost there:
1) mv lvmtab lvmtab.old
2) vgscan -an
3) vgdisplay -v no longer lists my defunct vg
4) I still have files in /dev/vg16 (where vg16 was the vg I want to remove). What is the proper procedure to remove the /dev/vg16 directory? (rmsf did not work).
Sandman!
Honored Contributor

Re: Removed PE before removing VG

rmsf removes only the device special files. Either rmdir or "rm -r dir_name" will work for removing the /dev/vg16 dir.
CJENSEN_1
Regular Advisor

Re: Removed PE before removing VG

Thanks everyone. Yes - I did not want to do the rmdir right away, thinking the rmsf would have encompassed that (was not sure). I have now removed those directories.