- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to clone LVM settings /configurations to a bra...
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
12-05-2006 11:55 PM
12-05-2006 11:55 PM
So how to ”record” the old settings (with all lvols include) and then ”play” it back on the new disk?
I'd try with vgcfgbackup/vgcfgrestore but no success… many tries and many errors, just like:
vgcfgrestore: Volume group "/dev/vg22" does not exist in the "/etc/lvmtab" file.
(vgcfgrestore -f /vg22-test /dev/rdsk/c3t2d0) ; vg22-test is from ” vgcfgbackup -f vg22-test vg22”
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c3t2d0": Cross-device link
(vgchange -a y /dev/vg22)
vgexport,vgimport,vgscan can not do it. Do you have an idea or a procedure how I can do it?
Many thanks
Tuan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2006 12:10 AM
12-06-2006 12:10 AM
Re: How to clone LVM settings /configurations to a brand new disk?
You could try to 'vgcreate' a new volume group on the new SAN and *then* overlay it with a 'vgcfgrestore' using the appropriate file from a 'vgcfgbackup' of the *old* volume group. You may have to 'vgextend' additional volumes into the new volume group at the onset too. In this fashion, the 'etc/lvmtab' will have entitites when the 'vgcfgrestore' is done.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2006 12:17 AM
12-06-2006 12:17 AM
Re: How to clone LVM settings /configurations to a brand new disk?
1- configure eva8000;
create virtual disk,disk group,present vdisks to the host with LUN id.(be carefull that your new vdisks size is equal or larger than old ones.)
2-do pvcreate at new server
3-at old server;
take a vg map with vgcreate with -p option. like;
#vgcreate -s -v -p -m /dev/vgabc /tmp/vgabc.map
4-before importing do following;
#cd /dev
#mkdir vgabc
#mknod /dev/vgabc/group c 64 0x010000
0x010000 is just an example.
you can see minor numbers with
#ll /dev/vg*/group
command.
you should choose an unused minor number.But if it is possible use old server's volume group's minor numbers.
5-And then import your vgmaps to the new server with vgexport command.
it will create lvols'
regards,
mustafa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2006 12:18 AM
12-06-2006 12:18 AM
Re: How to clone LVM settings /configurations to a brand new disk?
That was what I thought in the beginning (pvcreate, mknod, vgcreate). Yes the vgcfgrestore went perfectly through, but when I did a vgchange I got "Cross-device link"
Thanks,
Tuan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2006 01:08 AM
12-06-2006 01:08 AM
Re: How to clone LVM settings /configurations to a brand new disk?
Many thanks, it was the one I tried yesterday. Now I did it again to give you the
reason.
To simulate/test it I use the one and only disk c3t2d0 on the same server.
*old conf: vg22 with lvol221 & lvol222. vg22 is only a volume I create for this test.
##I export as you suggest (yes I can save many "remove" steps by not using -p in vgexport)
vgchange -a n /dev/vg22
vgexport -v -p -m /dev/vg22 /tmp/vg22.map
vgchange -a y /dev/vg22
lvremove /dev/vg22/lvol221
lvremove /dev/vg22/lvol222
vgremove /dev/vg22
pvremove /dev/rdsk/c3t2d0
##to simulate a new disk, override all LVM data (if there is any)
newfs -F vxfs -o largefiles /dev/rdsk/c3t2d0
##now I import back to the "new disk"
mars1_root # vgimport -v -m /tmp/vg22.map /dev/vg22 /dev/dsk/c3t2d0
Beginning the import process on Volume Group "/dev/vg22".
Physical Volume "/dev/dsk/c3t2d0" contains no LVM information
##what about a pvcreat...maybe it helps...
pvcreate -f /dev/rdsk/c3t2d0
mars1_root # vgimport -v -m /tmp/vg22.map /dev/vg22 /dev/dsk/c3t2d0
Beginning the import process on Volume Group "/dev/vg22".
Physical Volume "/dev/dsk/c3t2d0" is not part of a Volume Group
##what about a vgcreat... at this point already too many works...
mars1_root # vgimport -v -m /tmp/vg22.map /dev/vg22 /dev/dsk/c3t2d0
Beginning the import process on Volume Group "/dev/vg22".
vgimport: Volume group "/dev/vg22" already exists in the "/etc/lvmtab" file.
...still not help
I think vgexport/vgimport is only for when transfering a LVM disk from one system to another,
meaning all the PVRA, VGRA must be "intact" on that disk device. In this case we are talking
about a brand new disk.
So is it possible to playback the LVM settinngs on a BRAND NEW disk?
Thanks
Tuan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2006 01:22 AM
12-06-2006 01:22 AM
SolutionThe manual way is the only way I know of (vgcreate, lvcreate, newfs).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2006 09:04 PM
12-06-2006 09:04 PM
Re: How to clone LVM settings /configurations to a brand new disk?
A shame it is not possible, the first time I saw "vgexport/vgimport" and "vgcfgbackup/vgrestore" I think they are my rescue for just kind of task.
Unfortunately the name did not reflected the way an administrator (just like me) though it is. Let hope HP will do some improve for "vgcfgbackup/vgrestore" (including the man pages) or implicit write it (that clone is not possible) on the man page.
Personally, I prefer they give the commands another name :-)
Thanks
BR Tuan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2006 11:27 PM
12-06-2006 11:27 PM
Re: How to clone LVM settings /configurations to a brand new disk?
...More testing (with both vgexport/import and vgcfgbackup/vgcfgrestore involded).
...I am success to clone a new disk...but ONLY for getting the volumes (vg) informations, not any lvols informations. So the vg22.conf (vgcfgrestore uses it) is the header for a LVM disk and vgimport for updating the /etc/lvmtab and ??
..Now I know what HP means, "vg"cfgbackup means that the command ONLY takes a backup of the volume informations, nothing else. I wonder if HP makes a "lvcfgbackup/lvcfgrestore", then we can clone the "lv" settings on a new disk too :-) (..just kidding, of course I wish a more simple methode).
For those who interest for the test, please download the attached file.
BR
Tuan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2006 11:55 PM
12-06-2006 11:55 PM
Re: How to clone LVM settings /configurations to a brand new disk?
vgcfgrestore is used typically to recover volume group and lvol information onto a replacement for a failed disk. It won't copy any data - vgsync does that. However vgcfgrestore also expects your new luns to have all the other LUNS/disks in place as well.
vgexport/vgimport are nothing to do with what you are trying to achieve - these commands read the LVM data from the disks themselves. Because your new disks are blank of course you will not read anything.
What you really need to do is this:
Create your luns on the EVA8000 the same size as your old ones.
Unplug one piece of fibre from the EVA5000 (I assume you have 2 paths) and plug it into the EVA8000. If you have a SAN switch, then add the EVA8000 into the same zone as the 5000/server.
So your old server sees both sets of LUNs on both EVAs.
Then you simply use Mirrordisk/UX to lvextend each logical volume onto the EVA8000's luns.
pvcreate the luns on the EVA8000.
vgextend the volume group to the new luns.
lvextend -m 1 each logical volume to the new EVA8000 luns.
Hope that you don't reach maxpv per vg!
Otherwise, use some SAN volume copy software or a completely different method such as file copy or database backup/restore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2006 12:00 AM
12-07-2006 12:00 AM
Re: How to clone LVM settings /configurations to a brand new disk?
Once you have mirrored your storage, you can eventually drop the original EVA5000 luns from your volume group; then unzone or unplug the old server.
If you are migrating to a new server, then once you have mirrored the data over to the EVA8000, you then use vgexport/vgimport to read the LVM data off the EVA8000's disks into the lvmtab on the new server.
Its not beginner's stuff but it can be done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2006 01:08 AM
12-07-2006 01:08 AM
Re: How to clone LVM settings /configurations to a brand new disk?
>>Whats the point of trying to create logical volume information without the volume contents?
I am only interest in the lvols because we have a "lot" of them and I dont like do it manually. When getting the metadata (LVM settings) we will use our backup (or maybe rsync from an another server running on eva5000 with the OLD LUNs) to restore the datas.
On rx4640 (Itanium) you can probably see LUN's on both eva5000 and 8000 with active-active mode, but on rp3410 (PA) it is out of question, Securepath 3.0f SP2 does not support active-passiv on those server. (our conf are running with active-passiv on eva5000 at the moment on both of the mention models). Until now I am not able to test it (coexist between eva5M og 8M) with rx4640 because waiting of the SW. On rp3410 I have plan to use pvlinks instead of SP.
>>vgcfgrestore is used typically to recover volume group and lvol information onto a replacement for a failed disk
I am trying to simulate a corrupt lvol221, but are not able to recover it from my LVM backup myvg22.conf, can you show me how.
>>vgexport/vgimport are nothing to do with what you are trying to achieve
As I wrote in my test and the other thread, it is only for "putty'ing" the VG in lvmtab.
Thanks for the mirror tips; no problem with maxpv, we had readadjust it for a while ago:-)
Again, I am not "so" interesting in the data, I am only interest in howto reuse the metadata of LVM..but now I know I must recreate them manually (or with a script).
Thanks,
Tuan