0

[update] i have copied the two primary partitions using gparted. now i am stuck trying to copy a single volume because it is made of two physical volumes each on separate disk...ideas?

/sda5, /sdb1 = vg0

need sdc1 = need same info from vg0 on old disk

[/update]

I have a VM I need to put on a physical machine. I have two virtual disks though and the second of the two virtual disks is used to expand one of the filesystem partitions (not sure which one). The method of cloning each of the virtual disks (or both using the disk - image option) is too cumbersome.

So now, I've added a third virtual disk. I would like to use something like DD to copy over the file partitions over to the third virtual disk (which is now called /dev/sdc).

/dev/sda=34 gb /dev/sdb=81 gb /dev/sdc (new) = 160gb.

This is a Suse 11 box. df -h yields:

enter image description here

pvdisplay shows:

enter image description here

vgdisplay shows:

enter image description here

What would be the general steps to do this? Thanks. Once I have a single bootable third virtual disk, then, I can clone the single disk to my physical server.

2legit2quit
  • 171
  • 1
  • 2
  • 10

1 Answers1

1

If you would like to keep existing partition/disk layout, I would start by creating three partitions on the new disk. One for /, one for /boot (of atleast same size as the ones today. You can see start/end blocks with fdisk -l).

I would pvcreate the third partition (sdc3) and vgextend vg0 volume group with it. Then I would pvmove the allocated extents from sda5 and sdb1 onto sdc3, and finally remove the now unallocated pvs from the vg.

The two other disks (mounted on / and /boot) I'd handle them with dd or somesuch. Usually the /boot partition can otherwise usually be recreated by formatting the designated partition, installing the kernel and finally on the disks boot sector the bootloader. The times whenIi did similar operations it was from the rescue/installer image.

Petter H
  • 3,443
  • 1
  • 16
  • 19
  • hi Petter thanks so much, one question, whta about the "devtmpfs" and "tmpfs" filesystems mounted on /dev and /dev/shm??? – 2legit2quit Jul 10 '15 at 14:29
  • They have got no persistent data on them and are mounted from memory during boot by /etc/fstab. – Petter H Jul 10 '15 at 14:33
  • Petter I found some documents on moving a single physical volume using pvmove to another physical volume (sdc3), but how to do both and make sure they are synchronous? maybe i should just clone the volume group instead.? – 2legit2quit Jul 10 '15 at 20:03