Operating System - HP-UX
1837913 Members
6364 Online
110124 Solutions
New Discussion

Error in removing volume group.

 
Debbie Downing_2
Regular Advisor

Error in removing volume group.

Hi

I accidently removed a volume group directory and group file without first doing a vgremove /dev/vg05. Now I cant do anything with this disk because the /etc/lvmtab is saying it is still recorded there.

How can I remove this disk in the lvmtab cleanly so that I can reuse it elsewhere.

Kind Regards


Debbie
2 REPLIES 2
Peter Godron
Honored Contributor

Re: Error in removing volume group.

Debbie,
have you looked at:
"man vgexport"
"man vgscan"

Read all the info first, before attempting corrective action.
nishith
Frequent Advisor

Re: Error in removing volume group.

Hello Debbie!

You can recover from this sitution by the below steps:

1) First you rename your existing /etc/lvmtab file to old file

# mv /etc/lvmtab /etc/lvmtab.old

2) Next we will recreate the /etc/lvmtab by vgscan -a command

#vgscan -a
This command will recreate the /etc/lvmtab by scanning all disks in your system for LVM VG's & match with group device files in /dev directory.

3) THe VG's whose group file was deleted will not be included in NEW /etc/lvmtab file.
For this you will get a message like below
"Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c......
/dev/dsk/c......"

4) you can import the VG as below

# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgimport /dev/vg01 /dev/dsk/c...... /dev/dsk/c......


I hope this should solve your problem.

Thanks n Regards,
Nishith.