Disks and Xen v2v Migrating
31.5.2012
Netorek uutena IBM-partnerina tarjoaa IBM Storwize -ratkaisua tiedonhallintaan
23.11.2012
Disks and Xen v2v Migrating
31.5.2012
Netorek uutena IBM-partnerina tarjoaa IBM Storwize -ratkaisua tiedonhallintaan
23.11.2012
Show all

Disks and HP CCISS p2v Migrating

Migrating example for HP DL380 G4 and RHEL3 which had directly cciss partitions in /etc/fstab.

Transferring the disk content to hypervisor machine. Made already proper size LV.

# dd if=/dev/cciss/c0d0 bs=1024k | ssh HYPERVISOR dd of=/dev/vg_data/lv_rhel3_disk1 bs=1024k

To change some configuration files within root file system we need to mount it first to hypervisor machine.

Setting the disk content as loop device source:

# losetup -f /dev/vg_data/lv_rhel3_disk1

Checking loop device:

# losetup -a /dev/loop0: [0005]:596796 (/dev/mapper/vg_data-lv_rhel3_disk1)

Verifying partitions:

# fdisk -l /dev/loop0

Disk /dev/loop0: 78.4 GB, 78383153152 bytes
255 heads, 63 sectors/track, 9529 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/loop0p1 * 1 13 104391 83 Linux
/dev/loop0p2 14 4074 32619982+ 83 Linux
/dev/loop0p3 4075 4596 4192965 83 Linux
/dev/loop0p4 4597 8854 34202385 f W95 Ext'd (LBA)
/dev/loop0p5 4597 8854 34202353+ 83 Linux

Mapping those partitions to /dev/mapper:

# kpartx -av /dev/loop0
add map loop0p1 (253:14): 0 208782 linear /dev/loop0 63
add map loop0p2 (253:15): 0 65239965 linear /dev/loop0 208845
add map loop0p3 (253:16): 0 8385930 linear /dev/loop0 65448810
add map loop0p4 (253:17): 0 2 linear /dev/loop0 73834740
add map loop0p5 (253:18): 0 68404707 linear /dev/loop0 73834803

Mounting the root file system to hypervisor machine:

# mount /dev/mapper/loop0p2 /mnt

Editing /etc/fstab:

# cd /mnt/etc
# cp fstab fstab.ORIGINAL

Editing /etc/fstab from cciss to hd*.

Also edited and made ready for virtual machine network configuration files /etc/modules.conf and /etc/sysconfig/network-scripts/ifcfg-eth*.

Garbage collection:

# umount /mnt
# kpartx -dv /dev/loop0
del devmap : loop0p5
del devmap : loop0p4
del devmap : loop0p3
del devmap : loop0p2
del devmap : loop0p1
# losetup -d /dev/loop0
# losetup -a
#