- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: mirroring LV from multiple PVs to multiple PVs...
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
тАО01-05-2006 05:52 AM
тАО01-05-2006 05:52 AM
I have an existing virtual array (in a HP 5470) which is to be replaced by a second virtual array (now physically installed). The way we intend to move the data from the existing array to the new array is to mirror the existing LVs to PVs on the new array. However, I am confused about how to accomplish this.
Here's the problem:
For example, LV "lvrams'" PVs on the existing array:
# lvdisplay -v /dev/vgrams/lvrams | grep "/dev/dsk" | head
/dev/dsk/c4t1d2 2559 2559
/dev/dsk/c4t1d3 2559 2559
/dev/dsk/c4t1d4 2559 2559
/dev/dsk/c4t1d5 2559 2559
/dev/dsk/c4t1d6 2559 2559
/dev/dsk/c4t1d7 2205 2205
So we would mirror lvrams onto the new array's corresponding PVs, let's say, for
example, that they are c7t1d2-c7t1d7. So the mirror commands would be:
lvextend -m 1 /dev/vgrams/lvrams /dev/dsk/c7t1d2
lvextend -m 1 /dev/vgrams/lvrams /dev/dsk/c7t1d3
lvextend -m 1 /dev/vgrams/lvrams /dev/dsk/c7t1d4
lvextend -m 1 /dev/vgrams/lvrams /dev/dsk/c7t1d5
lvextend -m 1 /dev/vgrams/lvrams /dev/dsk/c7t1d6
lvextend -m 1 /dev/vgrams/lvrams /dev/dsk/c7t1d7
But is LVM going to understand this? Or will LVM fail after the first command due
to insufficient space? (attempting to mirror the entire LV on the first PV).
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2006 06:00 AM
тАО01-05-2006 06:00 AM
SolutionWe mirror the logical volume itself. Simply pvcreate the new disks and vgextend them into the volume group. After that, just create the mirror:
lvextend -m 1 /dev/vgrams/lvrams
lvm will auto-select the disks based on their order in the lvmtab and availability. Likewise, you can specify which disks you'd like to mirror TO with lvextend:
lvextend -m 1 /dev/vgrams/lvrams /dev/dsk/c7t1d2 /dev/dsk/c7t1d3 ...
Regards,
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2006 06:06 AM
тАО01-05-2006 06:06 AM
Re: mirroring LV from multiple PVs to multiple PVs (?)
You should specify all the target physical devices in one 'lvextend -m 1' operation; e.g.:
# lvextend -m 1 /dev/vgrams/lvrams /dev/dsk/c7t1d2 /dev/dsk/c7t1d3 ...
See the manpages for 'lvextend' and thos for 'lvmpvg(4)'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2006 06:07 AM
тАО01-05-2006 06:07 AM
Re: mirroring LV from multiple PVs to multiple PVs (?)
lvextend -m 1 /dev/vgrams/lvrams /dev/dsk/c7t1d2 /dev/dsk/c7t1d3 /dev/dsk/c7t1d4 /dev/dsk/c7t1d5 /dev/dsk/c7t1d6 /dev/dsk/c7t1d7
That should work assuming the new devices are the same size as the old ones and are already in the volume group.
Alternately, you could add one device at a time into the volume group and use pvmove to move the data off the old device and onto the new one, then vgreduce the old device out. This is useful if you cannot add more the one or two new devices into the existing volume group due to Max PV constraints.
Good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2006 06:09 AM
тАО01-05-2006 06:09 AM
Re: mirroring LV from multiple PVs to multiple PVs (?)
To create a PVG edit the /etc/lvmpvg file and add the following:
VG /dev/vgrams
PVG lvrams1
/dev/dsk/c4t1d2
/dev/dsk/c4t1d3
/dev/dsk/c4t1d4
/dev/dsk/c4t1d5
/dev/dsk/c4t1d6
/dev/dsk/c4t1d7
PVG lvrams2
/dev/dsk/c7t1d2
/dev/dsk/c7t1d3
/dev/dsk/c7t1d4
/dev/dsk/c7t1d5
/dev/dsk/c7t1d6
/dev/dsk/c7t1d7
Save the file and exit vi.
Now when you mirror you can mirror strictly between PVGs. First you will have to set the PVG-strict allocation policy for the mirrors.
# lvchange -s g /dev/vgrams/lvrams
Now you can mirror, and not worry about specifying specific disk devices.
# lvextend -m 1 /dev/vgrams/lvrams
For more information on PVGs, have a look at the lvmpvg man page and also the lvcreate man page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2006 08:52 AM
тАО01-05-2006 08:52 AM