<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">A couple of things i have set up for. The initital install is on LVM already so most of that was in place (including /) and i have no data on this. so if it wrecked its only an install away to start over.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">But this is a good start for some reading, thank you!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 23, 2015 at 9:12 AM, Matt Graham <span dir="ltr"><<a href="mailto:mhgraham@crow202.org" target="_blank">mhgraham@crow202.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2015-07-21 13:28, Stephen Partington wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ubuntu 15.04 installed and am looking to find out if there is a way<br>
to migrate to raid on a running system.<br>
<br>
In theory i should be able to do this by creating a degraded portion<br>
of the raid volume on the empty disk, extend/move my LVM to that disk<br>
then rebuild the original disk as part of that raid volume.<br>
</blockquote>
<br></span>
This is a softRAID-1, right? That makes the most sense for what you've said.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I was wondering if anyone had some documentation of information i<br>
could read about this scenario.<br>
</blockquote>
<br></span>
I did something like this when I moved my stuff from just 1 disk on regular partitions to softRAID-1. First, back up all your junk, because there are multiple points in this where you could scribble all over your disks. Second, make sure you have a LiveCD or LiveUSB disk to boot from if the bootloader goes wonky. <a href="https://wiki.gentoo.org/wiki/Complete_Handbook/Software_RAID" rel="noreferrer" target="_blank">https://wiki.gentoo.org/wiki/Complete_Handbook/Software_RAID</a> should be pretty applicable to working with softRAID and applicable to distros that are not Gentoo.<br>
<br>
You'd first take the new disk and partition it. I would think you'd need at least 2 partitions since having /boot on LVM is not going to work, and possibly 3 because having / on LVM has more fiddly bits than having it on a regular partition.<br>
<br>
So, fdisk /dev/sdb , set it up with 2 or 3 partitions (whichever), and then set up the RAID. This'll assume that your largest partition (the one that'll be your PV) is /dev/sdb2 . You'd then do<br>
<br>
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb2 missing<br>
<br>
This'll set up an array in degraded mode on /dev/md0. You'd then pvcreate /dev/md0 , then vgextend $VG_NAME /dev/md0 , then pvmove /dev/$OLD_PV_LOCATION . Then vgreduce $VG_NAME /dev/$OLD_PV_LOCATION and pvremove /dev/$OLD_PV_LOCATION to remove the old PV from lvm's config. Then you'd add the old PV back to the md0 with mdadm /dev/md0 --add /dev/$OLD_PV_LOCATION . The disk sync will probably take a while.<br>
<br>
You'll have to set things up so that the bootloader can figure everything out. Are you going to put / on LVM? That requires that the initrd have all the LVM tools on it. I don't know if Ubuntu can handle that automatically or not--I would guess so, but ICBW.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Crow202 Blog: <a href="http://crow202.org/wordpress" rel="noreferrer" target="_blank">http://crow202.org/wordpress</a><br>
There is no Darkness in Eternity<br>
But only Light too dim for us to see.<br>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">A mouse trap, placed on top of your alarm clock, will prevent you from rolling over and going back to sleep after you hit the snooze button.<br><br>Stephen<br><br></div>
</div>