Operating System - HP-UX
1753506 Members
5179 Online
108794 Solutions
New Discussion юеВ

Re: VM - Raw disk Migration

 
SOLVED
Go to solution
marvin51796
Regular Advisor

VM - Raw disk Migration

All

   I have just been given an HP-UX 11iv3 server with two VM's on RAW  partitions. I need to know if i can migrate the VM''s that are on these partitions to a new SAN? and how? i have migrated the two other servers that were setup as LUN's but i have no idea how to do RAW partitions.

any direcitons or help would be greatly appreciated.

thank

8 REPLIES 8
Dave Olker
HPE Pro

Re: VM - Raw disk Migration

Can you provide more details on what you mean by "RAW partitions"?  Are these whole disks or whole LUNs?  Are these RAW partitions on local storage?  Is it only the boot volumes for the VMs you're concerned about?

 

If what you have today are VMs booting from a whole disk on local storage and you want to migrate the boot disks to a SAN, my suggestion would be to use DRD.  I would present the new SAN LUN to the VM (either directly using NPIV or indirectly via presenting the LUN to the VSP and assigning the disk to the VM) and then use DRD to clone the boot disk to the new SAN lun.  Once the clone is done you should be able to do a setboot to change your VM boot device and boot the VM on the new SAN-based storage.

 

Regards,

 

Dave

I work for HPE

[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
marvin51796
Regular Advisor

Re: VM - Raw disk Migration

when i saw RAW i mean they are LUN's from a SAN that are not part of a volume group and are not logical volumes. I need to migrate everything that is on this LUN from one SAN to another SAN.

Each LUN is setup as a VM, 75G each, so VM 1 is a 75G lun VM 2 is another 75G LUN. they are not mounted anywhere, not part of a logical volume,

this is all i see.

 

64000/0xfa00/0x9     /dev/disk/disk5   HPVM    -         4       0.00    DGC     CX4-480WDR5
64000/0xfa00/0xa     /dev/disk/disk6   HPVM    -         4       0.00    DGC     CX4-480WDR5

 

here is what hpvmstatus tells me.

khepx007:/opt/hpvm/bin# ./hpvmstatus -P khepx020
[Virtual Machine Details]
Virtual Machine Name VM #  OS Type State
==================== ===== ======= ========
khepx020                 2 HPUX    On (OS)

[Authorized Administrators]
Oper Groups             :
Admin Groups            :
Oper Users              :
Admin Users             :

[Virtual CPU Details]
#vCPUs Entitlement Maximum
====== =========== =======
     2       10.0%  100.0%

[Memory Details]
Total    Reserved
Memory   Memory
=======  ========
4096 MB     64 MB

[Storage Interface Details]
Guest                                 Physical
Device  Adaptor    Bus Dev Ftn Tgt Lun Storage   Device
======= ========== === === === === === ========= =========================
disk    avio_stor    0   0   0   1   0 disk      /dev/rdisk/disk5

[Network Interface Details]
Interface Adaptor    Name/Num   PortNum Bus Dev Ftn Mac Address
========= ========== ========== ======= === === === =================
vswitch   avio_lan   VLAN104    1         0   1   0 1e-fb-3e-61-cf-2f

[Misc Interface Details]
Guest                                 Physical
Device  Adaptor    Bus Dev Ftn Tgt Lun Storage   Device
======= ========== === === === === === ========= =========================
serial  com1                           tty       console

Dave Olker
HPE Pro

Re: VM - Raw disk Migration

Fine, so present the new SAN's LUN to the VSP, assign it to this VM exactly as the current one is, boot the VM and use DRD inside the VM to copy the contents of the old boot disk to the new boot disk. Use setboot to change the boot path, reboot the VM on the new SAN LUN and then you should be able to safely remove the old disk from the VM and subsequently from the VSP.

Dave
I work for HPE

[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
marvin51796
Regular Advisor

Re: VM - Raw disk Migration

I will start reading up on waht all of that means, but what about this?


      Change the virtual disk with hardware address 0,0,4 to a different
      physical device, /dev/rdisk/disk1:

           # hpvmmodify -P myguest2x -m disk:scsi::0,0,4:disk:/dev/rdsk/c2t2d1

Dave Olker
HPE Pro

Re: VM - Raw disk Migration

I don't understand the point of doing that. Why would you want to change the device from AVIO to VIO and from agile device naming to legacy device naming? What purpose would that serve?
I work for HPE

[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
marvin51796
Regular Advisor

Re: VM - Raw disk Migration

that was just an example in the man pages, could I do


      :

           # hpvmmodify -P myguest2x -m disk:/dev/disk/disk15 :disk:/dev/disk/disk13


 

Dave Olker
HPE Pro
Solution

Re: VM - Raw disk Migration

My suggestion is you present the new boot LUN from the new SAN to the VM Host (VSP).  As an example, let's say this disk is identified as /dev/disk/disk6.  You would then modify the existing guest to use this new LUN *in addition to* the existing disk from the old SAN:

 

VM HOST> hpvmmodify -P khepx020 -a disk:avio_stor::disk:/dev/rdisk/disk6

 

After making this change the hpvmstatus output for this VM should show both disks:

 

[Storage Interface Details]
Guest                                 Physical
Device  Adaptor    Bus Dev Ftn Tgt Lun Storage   Device
======= ========== === === === === === ========= =========================
disk    avio_stor    0   0   0   1   0 disk      /dev/rdisk/disk5

disk    avio_stor    0   0   0   1   0 disk      /dev/rdisk/disk6

 

You then log into the VM as a root user and do an ioscan to see how the VM guest sees this new disk.  It will also assign it an agile device file.  For this example, let's say the old SAN LUN was identified inside the VM as /dev/rdisk/disk1 and the new LUN is seen inside the guest as /dev/rdisk/disk2.  You would then use DRD to clone the contents of /dev/rdisk/disk1 (old LUN) to the new LUN:

 

Inside VM> /opt/drd/bin/drd clone -p -t /dev/disk/disk2 -x overwrite=true -x verbosity=3

 

The -p option is a "preview" option so you can see if the command will complete without error.  Once you are ready to perform the clone operation, issue the above command without the -p option.  This will take the contents of the old SAN boot disk and copy it to the new SAN boot disk.

 

Once complete you can use setboot to point to the newly created boot disk on the new storage:

 

Inside VM> setboot -p /dev/disk/disk2

 

That sets the primary boot path to the newly cloned disk.  Reboot the VM and ensure that it booted on the new LUN and comes up without error.  When you're sure you don't need the old LUN anymore you can use rmsf to remove the agile device files associated with the disk:

 

Inside VM> rmsf -H <hardware path of the old SAN boot disk>

 

Then you can log back into the VM host and remove the old SAN boot disk from the VM guests' configuration:

 

VM HOST> hpvmmodify -P khepx020 -d disk:avio_stor::disk:/dev/rdisk/disk5

 

You can then do whatever you like with the old SAN LUN because the VM guest is no longer referencing it.

 

Regards,

 

Dave

 

I work for HPE

[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
marvin51796
Regular Advisor

Re: VM - Raw disk Migration

Thank you so much this is exactly what i needed, I will be doing this today, i got about half of it done when i saw your post..Thanks again, i can now finish my SAN migration....