Operating System - HP-UX
1827289 Members
3315 Online
109717 Solutions
New Discussion

LVM lun migration to other server

 
Dhananjaya Amarakoon
Regular Advisor

LVM lun migration to other server

Hi Friends

 

I have two rp4440 server which is running HP-UX v1.  For one server several lunsLUNs has been presented from SAN. All LUNs are setup using LVM and use LVM PV links feature for failover.
I have requirement to present all this luns to other server and create mount point without losing data.
Could you please guide me what is the step need to follow in server end?

Best Regards


Dhananjaya

2 REPLIES 2
Modris Bremze
Esteemed Contributor

Re: LVM lun migration to other server

1. Create a map-file of the VG for import

vgexport -p -s -v -m /tmp/vgname.map vgname

 2. Umount and export the VG from the host it is no longer needed

umount /vgmount
vgchange -a n vgname
vgexport vgname

3. ioscan for presented LUNs on the new host. Check if all disks and paths are available

ioscan -fnC disk

4. Install device files for the new disks

insf -C disk

5. Find out minor numbers in use on the new host

ll /dev/*/group

6. Create directory and group file for the VG on the new host

mkdir /dev/vgname
mknod /dev/vgname/group c 64 0xnn0000

where nn is a number not yet used by any other VG on that system (e.g. 05; see 5.)

 

7. Copy the .map file made in step 1 from the old host to the new.

 

8. Import the VG

vgimport -v -s -m /tmp/vgname.map vgname

9. Check

strings /etc/lvmtab

10. Backup configuration

vgchange -a y vgname
vgcfgbackup vgname

11. Create mount point

mkdir /vgmount

12. Edit /etc/fstab (copy from the old host if possible)

13. Mount.

14. Check if mounted.

 

If something goes wrong, as long as you have the .map file and the LUNs are still presented, you should always be able import the VG back on the original host.

You may also want to clean up the device files with rmsf on the old host, if the LUNs will be un-presented from it, so the ioscan doesn't show a bunch of NO_HW disk devices.

Dhananjaya Amarakoon
Regular Advisor

Re: LVM lun migration to other server

Thanks Modris...
Will updates ones operation has done.