[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RAID+LVM migration, need help



Thanks for the input David, and yes backups are always good :)

I was looking into other options available.

Considering that I am already using LVM, one that caught my eye is pvmove and the other was snapshots.

1) pvmove
Add the new RAID01 md to the existing vgroot and then pvmove the data from the
old RAID5 md.

Do I have to unmount the LVs to do this ?
I think it would be safer to reboot into single user mode.

So it would be something like this:

vgextend rootvg /dev/md7
pvmove -v /dev/md2 /dev/md7
vgreduce rootvg /dev/md2

What I don'tlike about this is the chance that a power outage or what ever would destroy all the data.

2) snapshots
Add the new RAID01 md to the existing vgroot and then make snapshots of the
data from the old RAID5 md, make sure the snapshots work, delete the old ones
and vgrename the new ones.

I think the sequence would be something like:

vgextend rootvg /dev/md7

(example using vg_usr)
lvcreate -L20G -s -n lv_usr_backup /dev/rootvg/lv_usr /dev/md7
(validate /dev/rootvg/lv_usr: resize2fs,fsck,mount,umount)
lvremove vg_usr
lvrename lv_usr_backup lv_usr

vgreduce rootvg /dev/md2

It's a little more work but this way the data should always be "safely" moved
and I can increase the size of some of the volumes in the process.

From what I've read can I safely mount the backup the way I want to do here as
the "new" main partition, is that right ?

I am tending towards using snapshots, *if* the copy can be simply mounted in
place of the original.


--
Bill



Reply to: