Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forcefully deleteing vg group on AIX?

Status
Not open for further replies.

aixquest

Technical User
Jan 15, 2001
53
US
Is there a command that will forcefully delete vg group on AIX 5.3? Vg group is created on a test system, so data doesn't need to preserve.

I tried to use "exportvg vgname," it says "Unable to export volume group xxxxx" When use "lsvg" command, the volume group is listed.

Thanks,
 
The basics:

Are there any mounted filesystems, or otherwise open LVs on the VG? exportvg and its related kin don't automatically unmount & delete filesystems, or deal with open LVs.

The other technical option would be to perform a reducevg on each PV in the VG, once the last PV is removed, the VG definition will vanish, but that too requires that you make sure the relevant PVs do not have any used PPs, open or not.
 
Use lsvg -l vgname to check contents of Volume Group

Then remove locical volumes and filesystems as necessary.

When these are all removed you can exportvg to get rid of the volume group
 
I tried to use "lsvg -l vgname" and it complained that "Volume group must be varied on; use varyonvg command."

Then, I issued "varyonvg vgname," it returned "varyonvg: LVM system call returned an unknown error code (3).

To answer Chapter11's question, there is no filesystem mounted for the VG or Logical volumes relavant to the volume group. I think the ODM thinks the VG definition exists, but somehow it has corrupted and can't return anything. Is there a command to find out PV in the VG? If lsvg is the only command to use, then it will complain VG needs to varyon first before I can retrieve anything.
 
lspv should list all disks and volume group they belong to

If there are no filesystems or logical volumes within the volume group ther reducevg for each disk within volume group should get rid of it
 
Thanks everybody, I will give it a try.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top