ubuntu-raid1-conversion
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu-raid1-conversion [2009/10/29 18:15] – snarg | ubuntu-raid1-conversion [2009/10/30 17:46] (current) – snarg | ||
---|---|---|---|
Line 2: | Line 2: | ||
===Created for Phil, using Ubuntu 9.10 Karmic Koala=== | ===Created for Phil, using Ubuntu 9.10 Karmic Koala=== | ||
This Procedure will take a standard install of Ubuntu, and mirror it to a spare hard disk, forming a RAID-1 array. Ubuntu by default on a standard install has 2 partitions. One for the root (/) filesystem and one for swap space. This procedure sets up individual raid arrays for each of these (root filesystem and swap). This procedure makes heavy use of the linux shell (terminal). In Ubuntu you can load a terminal from the Applications menu, under Accessories. | This Procedure will take a standard install of Ubuntu, and mirror it to a spare hard disk, forming a RAID-1 array. Ubuntu by default on a standard install has 2 partitions. One for the root (/) filesystem and one for swap space. This procedure sets up individual raid arrays for each of these (root filesystem and swap). This procedure makes heavy use of the linux shell (terminal). In Ubuntu you can load a terminal from the Applications menu, under Accessories. | ||
+ | \\ | ||
+ | \\ | ||
- | {{wiki: | + | {{: |
==1. Determine device names to be used in the procedure.== | ==1. Determine device names to be used in the procedure.== | ||
Line 22: | Line 24: | ||
Command (m for help): p | Command (m for help): p | ||
- | Disk / | + | Disk / |
- | 255 heads, 63 sectors/ | + | 255 heads, 63 sectors/ |
Units = cylinders of 16065 * 512 = 8225280 bytes | Units = cylinders of 16065 * 512 = 8225280 bytes | ||
Disk identifier: 0xeea1cf79 | Disk identifier: 0xeea1cf79 | ||
Line 212: | Line 214: | ||
</ | </ | ||
Now go back to the original terminal window and type: | Now go back to the original terminal window and type: | ||
+ | < | ||
sudo nano / | sudo nano / | ||
</ | </ | ||
Line 227: | Line 230: | ||
Use CTRL+W to save the fstab and exit nano text file editor. | Use CTRL+W to save the fstab and exit nano text file editor. | ||
- | ==12. Adjust UUID in / | + | ==12. Adjust UUID in / |
This step will cause the bootloader to load up using the raid array (/dev/md0) instead of the old drive (/ | This step will cause the bootloader to load up using the raid array (/dev/md0) instead of the old drive (/ | ||
< | < | ||
Line 313: | Line 316: | ||
Also a one-liner: | Also a one-liner: | ||
< | < | ||
- | sudo mdadm --manage /dev/md1 --add /dev/sda2 | + | sudo mdadm --manage /dev/md1 --add /dev/sda5 |
</ | </ | ||
- | ==17. Watch some rebuild stats. | + | ==17. Watch some rebuild stats. |
- | Voila! | + | |
Type "cat / | Type "cat / | ||
Line 334: | Line 336: | ||
</ | </ | ||
+ | ==18. Final update to the bootloader to account for the first drive being changed.== | ||
+ | Use nano to edit your / | ||
+ | < | ||
+ | sudo nano / | ||
+ | </ | ||
+ | And make sure it looks like this: (note this should be the same as your bios hard disk boot order) | ||
+ | < | ||
+ | (hd0) / | ||
+ | (hd1) / | ||
+ | </ | ||
+ | Type this to finalise the bootloader config and Master Boot Record on both hard disks: | ||
+ | < | ||
+ | sudo update-grub | ||
+ | sudo grub-install /dev/sda | ||
+ | sudo grub-install /dev/sdb | ||
+ | </ | ||
+ | \\ | ||
+ | ALL DONE!! | ||
+ | \\ | ||
+ | update- 20091030 - Please note that at time of writing there is a bug in GRUB 1.97 which causes a boot delay of about 10-20 seconds for boot partitions on RAID-1. This is a known problem and is being worked on. Please see: [[https:// |
ubuntu-raid1-conversion.1256811356.txt.gz · Last modified: 2009/10/29 18:15 by snarg