1832694 Members
2777 Online
110043 Solutions
New Discussion

deleted vg

 
SOLVED
Go to solution
Mazen Al-Jarrah
Advisor

deleted vg

Hello everone,

I've deleted a vg by mistake using sam, is there any way to get it back...?

also I can't delete a "lv" I'm getting the message
lvremove: Couldn't delete logical volume "/dev/vg01/lvol_itmscdb": x x
xx lvx The supplied lv number refers to a non-existent logical volume.

thanking you in advance for your cooperation and help
6 REPLIES 6
Rajeev  Shukla
Honored Contributor
Solution

Re: deleted vg

The only way you can restore the deleted VG is if you have not done anything else on the disk and you have either the vgmap file or vgcfgbackup file. Check in /etc/lvmconf directory for the file.

I am sure the LV name you are using to delete is wrong, do a vgdisplay -v /dev/vg01 and see if you have the LV with the name, which you are trying to delete.

Mazen Al-Jarrah
Advisor

Re: deleted vg

I didn't do anything on the vg still all the files are there in /etc.

regading the name I'm using sam to delete it so the name could not be wrong
Rajeev  Shukla
Honored Contributor

Re: deleted vg

Ok if you have the volume group config file for this vg (should be same name) in /etc/lvmconf and you also know the disk which where there in the VG, then have a look at man pages of vgcfgrestore and do a vgcfgrestore on all the disks involved in that VG.

Do a lvdisplay -v /dev/vg01/lvol1_itmscdb
and vgdisplay -v /dev/vg01
what do u see? does the name match?
Mazen Al-Jarrah
Advisor

Re: deleted vg

thanks for the reply

I managed to restore the vg but I can't delete the lv.
using lvdisplay I can see a long list like the followings
00489 /dev/dsk/c0t8d0 00489 current
00490 /dev/dsk/c0t8d0 00490 current
00491 /dev/dsk/c0t8d0 00491 current
00492 /dev/dsk/c0t8d0 00492 current
00493 /dev/dsk/c0t8d0 00493 current
00494 /dev/dsk/c0t8d0 00494 current

G. Vrijhoeven
Honored Contributor

Re: deleted vg

Hi,

You should be able to reduce the lvol.

Make sure it is not still mounted. ( bdf /mount/cat /etc/mnttab )
if do umount the lvol using the umount command.
lvrecude the lvol ( lvreduce -f /dev/vg01/lvol.... )

Gideon
Rajeev  Shukla
Honored Contributor

Re: deleted vg

How are you trying to delete the LVs, by SAM or lvremove,
use lvremove -f /dev/vg01/...(lvol) to remove the LV and let us know what error you get.