- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Changing the pv's in a 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
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
09-11-2007 05:07 AM
09-11-2007 05:07 AM
I need to remove the 6 pv's (luns) in the vg and replace them with 6 other pv's.
To make this fun I can't bring the cluster or package (application) down while doing this.
There are 3 lv's in the vg.
I can move the data in the lv's, and then temporarily, delete the lv's. Once the 3 lv's are gone, I want to add the 6 new pv's and then remove the 6 old pv's. Once I've got that done I want to recreate the lv's with the same names that service guard expects.
Of course I'll vgexport/vgimport to resynchronize the nodes.
However I seem to recall that you can never remove the 1st pv in a vg. True?
Alternatively since service guard is not monitoring the volume group, perhaps I should just move all the data, blow away the vg and then quickly rebuild it with the new pv's. As long as the names are all the same, and the cluster lock disk isn't in that volume group I should be ok.
Any suggestions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 05:26 AM
09-11-2007 05:26 AM
Re: Changing the pv's in a vg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 06:10 AM
09-11-2007 06:10 AM
Re: Changing the pv's in a vg
If you have enough down time, dd is also a good option to move your LVs to the new PVs.
here is an example:
# pvcreate < your disk)
# vgextend .....
# lvcreate
# lvextend ...
# newfs -F vxfs /dev/vgXY/rlvolXY #
# umount /XYZ( the existing FS)
# dd if=/dev/vgXX/Old_lv of=/dev/vgXY/new_lv bs=512k &
# mount /dev/vgXXX/newlv /FS
# fsadm â F vxfs â o largefiles /newFS
Remember to do what ever you have to do to make thiese disk cluster aware !!
Rgds / James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 06:21 AM
09-11-2007 06:21 AM
SolutionI've done this many times. Wroks like a champ and provides 100% uptime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 06:24 AM
09-11-2007 06:24 AM
Re: Changing the pv's in a vg
"pvremove the old devices out of the VG"
should read
"vgreduce the old devices out of the VG"
I can't believe we still cannot edit posts here!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 06:27 AM
09-11-2007 06:27 AM
Re: Changing the pv's in a vg
Sounds like the best way.
Two follow up questions.
1.) Man page has this comment:
pvmove cannot be performed if the volume group is activated in shared
mode.
I assume I can just issue a vgchange -c n /dev/vg02. Yes?
2.) Can I remove the first pv used in the vg?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 06:35 AM
09-11-2007 06:35 AM
Re: Changing the pv's in a vg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 06:36 AM
09-11-2007 06:36 AM
Re: Changing the pv's in a vg
pvmove cannot be performed if the volume group is activated in shared
mode.
I assume I can just issue a vgchange -c n /dev/vg02. Yes?
Most likely, your VG is in exclusive mode (use vgdisplay to confirm). If in shared mode, as per the man page, you cannot do this procedure. If the VG is in exclusive mode, the vgchange command you listed is unnecessary.
2.) Can I remove the first pv used in the vg?
Yes. I have done this in the past w/o issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 06:41 AM
09-11-2007 06:41 AM
Re: Changing the pv's in a vg
"pvmove is not an atomic operation, and moves data extent by extent. If pvmove is abnormally terminated by a system crash or kill -9, the volume group can be left in an inconsistent configuration showing an additional pseudo mirror copy for the extents being moved. You can remove the extra mirror copy using the lvreduce command with the â m option on each of the affected logical volumes; there is no need to specify a disk."
Therefore, your VG/data will not be corrupted.
I don't think stiped LV's matter although I am not 100% sure. Since al you are doing is moving phisical extents from one device to another, IMHO it should not matter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 06:51 AM
09-11-2007 06:51 AM
Re: Changing the pv's in a vg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 07:07 AM
09-11-2007 07:07 AM
Re: Changing the pv's in a vg
Tom you were correct I was confusing exclusive with shared mode.
I don't think the lv's are striped, but they do extend onto multiple pv's.
How do I confirm they aren't striped?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 07:09 AM
09-11-2007 07:09 AM
Re: Changing the pv's in a vg
Stripes 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 07:12 AM
09-11-2007 07:12 AM
Re: Changing the pv's in a vg
...no striping if the "Stripes" and "Stripe Size" parameters show zero.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 06:39 PM
09-11-2007 06:39 PM
Re: Changing the pv's in a vg
I mis one step, Please check if you cluster lock disk in one of the disks that you replease, if this is the case you have to reaplay the cluster whit new cluster lock disks, This setting wil not go over with mirroring