(no subject)
Hi,
Is there a safe way to convert from a working LVM (with root on LVM) to a software RAID1 including the device where is the existing LVM ?
Regards
Jean-Luc
P.S. : sorry if this message is recevied twice. It seems tthat there is a problem between wanadoo and gmail
Re: [linux-lvm] Converting from LVM to LVM on RAID1 (WAS: no subject)
Sorry, I forgot the subject
Le 03.07.2005 20:56:45, Jean-Luc Coulon (f5ibh) a écrit :
Quoted 15 lines
Hi,
Is there a safe way to convert from a working LVM (with root on LVM) to a software RAID1 including the device where is the existing LVM ?
Regards
Jean-Luc
P.S. : sorry if this message is recevied twice. It seems tthat there is a problem between wanadoo and gmail_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Re: [linux-lvm] Converting from LVM to LVM on RAID1 (WAS: no subject)
it's not a good idea, but you could use raid1 without a superblock... did i mention it's not a good idea?
normally you want the raid1 superblock... which lives at the end of the partition. you can't blindly convert an LVM pv to a raid1 device without ensuring the physical extent at the end of the pv isn't in use. i don't see any way to shrink a pv -- so i don't think you'll be able to convert an existing lvm pv to a raid1 device.
however there's nothing stopping you from creating a raid1 device on a second disk (and specify "missing" for the other raid device(s)... see mdadm man page), creating a pv/vg/lv on top of that raid1, then copying the filesystems over... doing grub/lilo/whatever magic... and trying to boot it.
if it works, you can convert the old disk into the second component of the raid.
there's probably several docs already explaining this sort of procedure without lvm involved... (for example there's one supplied with debian mdadm at /usr/share/doc/mdadm/rootraiddoc.97.html)
-dean
Quoted 7 lines · On Sun, Jul 03, 2005 at 06:56:45PM +0000, Jean-Luc Coulon (f5ibh) wrote:
Hi,
Is there a safe way to convert from a working LVM (with root on LVM) to a software RAID1 including the device where is the existing LVM ?
Regards
Jean-Luc
create a degraded raid1 array with only the other disk
add the new md to the existing vg
pvmove all lv on the new pv
remove the old (now empty pv)
use dd to make it forget it was a pv
hotadd this disk to the array
L.
Signature · 6 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \