How can I move a Logical Volume from one volume group on /dev/sda to a new disk /dev/sdb which has a new volume group on it?
|
feedback
|
|
I did something similar a while back when I used LVM to migrate filesystems between a regular drive and a raid array. Basically you grow the existing logical volume onto the new disk and and use pvmove to migrate the existing filesystems to the new drive. | |||||||
feedback
|
|
Technically, you can't. The logical volume is intrinsically tied to the underlying volume group. Since you created a new VG then your best option will be to translate the following psuedo-code into the commands most relevant to your system
| |||
|
feedback
|
|
It is probably easiest to create a snapshot of your existing LV, and simply use something like 'dd' to write, block level, i.e. /dev/mapper/vg_your_old_group/lv_snapshot_name to /dev/mapper/vg_your_new_group/lv_name. Make sure that when you do 'dd' your /dev/mapper/vg_your_new_group/lv_name is not mounted. Snapshots are almost instantaneousness, assuming you have enough space to create a snapshot in your original VG. | |||
|
feedback
|