Operating System - HP-UX
1833845 Members
2057 Online
110063 Solutions
New Discussion

I want to delete non active volume group

 
SOLVED
Go to solution
cbozlagan
Regular Advisor

I want to delete non active volume group

vgremove doesn't work if vg is not active.

That vg has lv inside

Thanks
9 REPLIES 9
Redhat
Trusted Contributor

Re: I want to delete non active volume group

simply run vgexport
Patrick Wallek
Honored Contributor
Solution

Re: I want to delete non active volume group

Actually the VG must be inactive for vgremove to work.

The real reason vgremove isn't working is because the VG still has an LV in it. What you must do if you want to go that route is:

# vgchange -a y /dev/vg??
# lvremove /dev/vg??/lvol?
# vgchange -a n /dev/vg??
# vgremove /dev/vg??

But, if you want the real easy way, and are absolutely sure nothing is in use, then use vgexport as said above.

# vgexport /dev/vg??
will get rid of everything, including all /dev/vg??/* files.
cbozlagan
Regular Advisor

Re: I want to delete non active volume group

I executed vgscan -pv but it gave me some
'Unable to match' warning.
You can see messages below.
How can I correct these problems?

Thanks



# vgscan -pv

vgscan: The physical volume "/dev/dsk/c0t6d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c3t6d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c13t2d0" is already recorded in the "/etc/lvmtab" file.
Couldn't stat physical volume "/dev/dsk/c1t2d0":
Invalid argument


/dev/vg00
/dev/dsk/c0t6d0
/dev/dsk/c3t6d0
/dev/dsk/c13t2d0


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/c13t0d0
/dev/dsk/c13t0d6

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/c13t0d1
/dev/dsk/c13t0d2
/dev/dsk/c13t0d3
/dev/dsk/c13t0d4
/dev/dsk/c13t0d7
/dev/dsk/c13t1d0
/dev/dsk/c13t1d1
/dev/dsk/c13t1d2
/dev/dsk/c13t1d3
/dev/dsk/c13t1d4
/dev/dsk/c13t1d5
/dev/dsk/c13t1d6

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/c13t0d5

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/c13t1d7
Patrick Wallek
Honored Contributor

Re: I want to delete non active volume group

So why are you running vgscan? What exactly are you trying to do?
Redhat
Trusted Contributor

Re: I want to delete non active volume group

Pls send the "output" file after executing the following command

script /tmp/output
strings /etc/lvmtab
vgdisplay -v
ioscan -fnC disk
then press cntl+d

cbozlagan
Regular Advisor

Re: I want to delete non active volume group

Hi Manojit Das,

I attached output file
cbozlagan
Regular Advisor

Re: I want to delete non active volume group

Hi patrick,

SAP NetWeaver installation document asks me to execute vgscan command.

Thanks.
Orhan Biyiklioglu
Respected Contributor

Re: I want to delete non active volume group

It seems that you have already exported four different volume groups.

vgexport command removes the vg info from the /etc/lvmtab file, deletes the associated device files including the vg_name directory but keeps that info untouched on the physical volume (on the disk)

So if you want you can recreate (undelete) the same vgs using vgimport or clean the vg info from the disk using pvcreate -f commandon each disk.

If you are sure you do not need the data on the unmatched disks and plan to use them in a new volume group just take the second option.

hth.

Orhan

Redhat
Trusted Contributor

Re: I want to delete non active volume group

Pls send the strings /etc/lvmtab output.

vgdisplay -v output showing only vg00 !!

chech the output of #ll /dev/vg*/group

Pls give us more feedback regarding what you are actually want to do?