- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: decomissioning a volume group
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
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
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
тАО02-11-2009 07:45 AM
тАО02-11-2009 07:45 AM
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 07:54 AM
тАО02-11-2009 07:54 AM
Re: decomissioning a volume group
the -s option adds one entry called the VGID to the map file.
So that just as you will be vgimport -ing that VG using this Map File and -s option, the LVM will search all the possible disks in the system . will match that with the VGID in tha map file and shall import those PVs that match the VGID as mentioned in the map file.
alternatively you can also use vgexport with -f
so u can do a Preview export first and then the real vgexport
do like this for say VG /dev/vgXX
#vgexport -p -v -s -m /tmp/vgXX.map /dev/vgXX
#vgexport -p -v -m /tmp/vgXX.map.alt -f /tmp/vgXX.pvlist /dev/vgXX
preserve all these files that is /tmp/vgXX.map ,/tmp/vgXX.map.alt and /tmp/vgXX.pvlist
do the real vgexport.
regards
sujit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 08:00 AM
тАО02-11-2009 08:00 AM
Re: decomissioning a volume group
please visit the man pages of the commands vgimport and vgexport for that
#man vgimport
#man vgexport
at later time say when you wish to import these VGs, like say that disks of the vgXX that you had exported had not created a new VG using pvcreate etc, then you can fully reimport them as folllws.
#mkdir /dev/vgXX
#mknod /dev/vgXX/group c 64 0xYY0000
make sure that thsii minor no 0xYY0000 is unique in the system.
#vgimport -v -s -m /tmp/vgXX.map /dev/vgXX
or
#vgimport -v -m /tmp/vgXX.map/alt -f /tmp/vgXX.pvlist
mark that these files had got created at the timeof the vgexport as done in my earlier post, /tmp/vgXX.map, /tmp/vgXX.map.alt and /tmp/vgXX.pvlist
Also note that the -s and -f option of the vgexport command are mutually exclusive.
regards
sujit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 08:04 AM
тАО02-11-2009 08:04 AM
Re: decomissioning a volume group
If you want to decommission a volume group follow the steps.
1. Stop the app's / process using the filesystems.
2.Unmount all the lv's
3. Deactivate the vg -> vgchange
4. export the vg -> vgexport
Now the VG has gone. You can use those disks on any other server. But remember that the data and lvm structure is still there on the disks. You can import in any other server if you wise. when you run pvcreate with -f option the lvm headers will be overwritter.
You can also run pvremove command to remove the lvm structures once you exported.
Hope this helps.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 08:21 AM
тАО02-11-2009 08:21 AM
Re: decomissioning a volume group
please have a look at the following thread and assign the points.
You have a huge responses made to your questions as unassigned for points.
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
assigning points always helps you get better responses.
Regards
sujit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 10:35 AM
тАО02-11-2009 10:35 AM
Re: decomissioning a volume group
Yes you have to .. via pvcreate -f
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 10:38 AM
тАО02-11-2009 10:38 AM
Re: decomissioning a volume group
The disk will still have the data and the LVM
If you like to use it, you could do that.
If you like to use for some other vg's you need to reintilize each disk with pvcreate -f and use it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2009 02:21 AM
тАО02-12-2009 02:21 AM
SolutionThe "right" way to decommission a volume group goes like this:
- remove all logical volumes with "lvremove -f"
- remove every disk (except the last) with vgreduce
- vgremove the volume group
- rm -r /dev/
- pvremove every disk
Why to do it like this?
You remove any information that could confuse you or the OS in the future.
In SAN environments with lots of shared disks it's very important to not catch the wrong disk. If you're used to use "pvcreate -f" every time this will go wrong some time. But if you clean the disks after usage there is no "-f" necessary.
Beside that you prevent "funny" situations:
- a XP LUN (56GB) was assigned, and not properly cleaned up
- the same Cu:Ldev is assigned with different size (say 14GB) to another host.
- "pvcreate" (without -f) does not work because there is already a VGID on the disk
- not doing anything, the disks is 14GB in size, the PV is 56GB, is added with 56GB to the volume group and you get write errors if you try to use these 56GB.
So in short:
- remove every possible information from the disks when decommissioning volume groups
- do not rely on present information on the disk (but don't use "pvcreate -f" without thinking)
My 2 cents,
Armin
PS: Assign points if you find answers useful!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2009 02:48 AM
тАО02-12-2009 02:48 AM
Re: decomissioning a volume group
I think you got the answer for your question.
No wonder..
I am having 255 disks(max pv) in volume group and i am doing vgexport/vgimport as daily operation.