« Setting up a Professional Quality Mail Server with Ubuntu Karmic Server 9.10.HOWTO: Setup apt-cacher, caching service for installation packages »

HOWTO: Convert from single disk to RAID 1 without reinstalling

30/12/08

HOWTO: Convert from single disk to RAID 1 without reinstalling

Reboot using the Ubuntu ALT installation disk and choose Rescue a Broken System, a rescue disk of your own or to single user mode. If you use the Ubuntu disk do not mount the old root as the root at this time. It makes the copying part a little more complex. :) I used /dev/md0


Mount the old root partition and then copy the old data over.

mkdir -p /mnt/old_root 
sudo mount /dev/sda1  /mnt/old_root 
df -h 
Output from dh command
Filesystem              Size     Used Available Use% Mounted on 
tmpfs                 507.7M    44.0k    504.7M   0% /dev 
/dev/scd0             696.8M   696.8M         0 100% /cdrom 
/dev/sda1               3.7G     2.3G      1.4G  63% /mnt_old_root 
/dev/md0                3.9G    32.1M      3.9G   1% /target
cp -a /mnt/old_root/*   /target

Once the copy has completed we can reboot back into the old setup and mount the array temporarily in /mnt/mirror. I find it simpler to edit in the real system as I just cannot get on with vi. :) The reboot also gives me an excuse to get another coffee. ;)


Pages: 1 · 2 · 3 · 4 · 5 · 6 · 7

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
What can birds and aeroplanes both do?
antispam test