- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Removing a VG with missing LV
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2007 07:33 AM
06-29-2007 07:33 AM
Removing a VG with missing LV
While testing our storage product on HP-UX, sometimes volumes/vluns are removed without first running lvremove/vgreduce/vgremove. A subsequent test tries to clean up, create and export volumes/vluns and then run pvcreate/vgcreate/vgextend/lvcreate again using the same or similar vg_names. The problem is vgremove fails because the VG is still associated with an LV. The LV no longer exists so cannot be removed first.
vgexport fails saying the VG is still active. vgscan shows no active LVs but reports 1 LV for the VG. pvdisplay shows this:
--- Physical volumes ---
PV Name /dev/dsk/c8t0d1
PV Name /dev/dsk/c10t0d1 Alternate Link
PV Name /dev/dsk/c4t0d1 Alternate Link
PV Name /dev/dsk/c6t0d1 Alternate Link
VG Name /dev/dlh01
PV Status unavailable
Allocatable yes
VGDA 2
Cur LV 0
PE Size (Mbytes) 16
Total PE 639
Free PE 0
Allocated PE 639
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On
--- Physical extents ---
PE Status LV LE
00000 current ??? 00000
00001 current ??? 00001
00002 current ??? 00002
00003 current ??? 00003
00004 current ??? 00004
.
.
.
Is there a way to clean this up without having to reboot?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2007 07:38 AM
06-29-2007 07:38 AM
Re: Removing a VG with missing LV
# cp /etc/lvmtab /etc/lvmtab.old
# vgscan -av
Once the situtaion is corrected you can remove the LV and VG.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2007 07:42 AM
06-29-2007 07:42 AM
Re: Removing a VG with missing LV
# vgchange -a n /dev/dlh01
Then you should be able to vgexport it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2007 08:26 AM
06-29-2007 08:26 AM
Re: Removing a VG with missing LV
I had tried vgscan -av but that didn't help.
vgchange looks like a step in the right direction, though now after over 10 minutes vgexport seems to be hung.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2007 08:34 AM
06-29-2007 08:34 AM
Re: Removing a VG with missing LV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2007 08:38 AM
06-29-2007 08:38 AM
Re: Removing a VG with missing LV
# mv /etc/lvmtab /etc/lvmtab.OLD
# vgscan -av
If that doesn't help, you could try vgreduce with -f option to remove the missing PVs. It will not work if that is the only in PV in the VG. It might probably fail if there are any LVs in the missing PV.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2007 08:58 AM
06-29-2007 08:58 AM
Re: Removing a VG with missing LV
I have tried removing /etc/lvmtab and rebuilding using vgscan -av, but only the old PV and VG devices come back, not the LVs. I tried running pvremove and rmsf against the /dev/dsk and /dev/rdsk nodes, but vgcreate still fails, and vgscan recreates them. It seems to remember everything (from kernel space?) except the LVs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2007 04:39 AM
07-02-2007 04:39 AM
Re: Removing a VG with missing LV
Sorry Patrick, I owe you three more points -- guess I assigned them too soon. Thanks everyone for being so helpful!