- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: remove vg
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
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
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
тАО01-24-2007 03:11 AM
тАО01-24-2007 03:11 AM
remove vg
Thanks
brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2007 03:14 AM
тАО01-24-2007 03:14 AM
Re: remove vg
using SAM :
delete the vg (vgtemp)
extend vg tsp by adding the now free disks
The warning that the disks have an existing filessytem can be ignored.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2007 03:16 AM
тАО01-24-2007 03:16 AM
Re: remove vg
# vgchange -an /dev/vgtemp
# vgexport /dev/vgtemp
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2007 03:16 AM
тАО01-24-2007 03:16 AM
Re: remove vg
if you have no need to save any data in this volume group then just remove the volume group.
first remove any disk devices from the group if there are more than 1:
vgreduce /dev/vgtemp /dev/dsk/cxtxdx /dev/dsk/cytydy
Then remove the volume group:
vgremove /dev/vgmisc
If you wish to keep the structure so you can import with new name or to another server then:
vgchange -a n /dev/vgtemp
vgexport -m /tmp/vgmisc.map /dev/vgtemp
you can then use the map file to import with new name or to another server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2007 03:29 AM
тАО01-24-2007 03:29 AM
Re: remove vg
Brian,
You have a couple of potential issues:
1. the default number of disks in a vg is 16. If you used this the default when you vcreated vg(tsp), then the additional disks you are adding to the vg will only will only work if the toal number of disks in the vg is 16 or less
2. Hopefully the disk are the same size (or smaller than the disks currently in vg(tsp). If not, there is the possibility that the vg might not be able to fully utilize the space on the disks, due PE size and max PE's set during vg creation........
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2007 03:45 AM
тАО01-24-2007 03:45 AM
Re: remove vg
brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2007 08:54 PM
тАО01-24-2007 08:54 PM
Re: remove vg
You also need to use pvcreate command with -f option on each freed disk before to do a vgxtend on another vg.
Roland
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2007 09:21 PM
тАО01-24-2007 09:21 PM
Re: remove vg
Here's what I usually do when I don't need to care for any data left on the disks
(let's assume we've got a current backup)
# vgdisplay -v vgXX|awk '/LV Name/{print$NF}'|xargs -n1 lvremove -f
Logical volume "/dev/vgXX/lvol1" has been successfully removed.
Volume Group configuration for /dev/vgXX has been saved in /etc/lvmconf/vgXX.conf
Logical volume "/dev/vgXX/lvol2" has been successfully removed.
Volume Group configuration for /dev/vgXX has been saved in /etc/lvmconf/vgXX.conf
Logical volume "/dev/vgXX/lvol3" has been successfully removed.
Volume Group configuration for /dev/vgXX has been saved in /etc/lvmconf/vgXX.conf
Logical volume "/dev/vgXX/lvol4" has been successfully removed.
Volume Group configuration for /dev/vgXX has been saved in /etc/lvmconf/vgXX.conf
# vgdisplay -v vgXX|awk '/PV Name/{print$NF}'|sed -n 2,\$p|while read pv;do vgreduce vgXX $pv && pvremove /dev/rdsk/${pv##*/};done
Volume group "vgXX" has been successfully reduced.
Volume Group configuration for /dev/vgXX has been saved in /etc/lvmconf/vgXX.conf
The physical volume associated with "/dev/rdsk/c2t0d0" has been removed.
# vgdisplay -v vgXX|awk '/PV Name/{print$NF}'
/dev/dsk/c1t0d0
# vgremove vgXX
Volume group "vgXX" has been successfully removed.
# pvremove /dev/rdsk/c1t0d0
The physical volume associated with "/dev/rdsk/c1t0d0" has been removed.
# rm -rf /dev/vgXX
Now there should be no doubt about any stale associations of PV memberships thanks to the explicit pvremove.
Thus I can newly create the used PVs without requiring the -f switch and an uneasy fealing of inadvertent data corruption due to a typo.
# pvcreate /dev/rdsk/c1t0d0
Physical volume "/dev/rdsk/c1t0d0" has been successfully created.
# echo $?
0
Admittedly, a bit more circuitous than a mere vgexport...