Site-wide Tags:  Linux(17) | CommandLine(12) | Ubuntu(10) | RemoteAccess(7) | Tools(7) | Vim(7) | LiftWeb(5) | SBT(5) | SoftwareDev(5) | Mac(5) | Scripts(4) | WebDev(4) | Diagrams(4) | Lifty(3) | NetworkDrives(3) | Processwire(3) | Security(3) | Fog(3) | VCS(3) | BestPractices(3) | RaspberryPi(2) | WebDesign(2) | Encryption(2) | Windows(2) | SSH(2) | WinCommandPrompt(2) | GitHubRepos(2) | Emacs(2) | PHP(2) | IDE(2) | ErrorMsgs(2) | JVM(2) | Hardware(2) | Bash(2) | Networks(2) | Graphviz(2) | Cloning | Cygwin | Graphics | Java | SystemRecovery | lessc | Maven | Python | PXE | Samba | LXDE | PackageManagement | LifeHacks | LESS |

This site has been archived and will no longer be updated.
You can find my new profile at My new blog is at

Entry 1: Setting It Up

Topic: RAID1 with LVM on Ubuntu Server   

Created on Mon, 02 Jan 2012.
Last Modified on Sat, 21 Apr 2012.

I had 2x750GB HDD's which I wanted to setup in a RAID array in my ubuntu server 10.04 LTS box.

It turned out to be quite easy when following the guide provided by canonical:

But, I made a few adjustments. The guide makes you partition each of your physical disks into two sections, swap and root. both those are set to be used as 'physical drives for RAID'

These would lead to the creation of two MD's (or md or 'multiple device'). I found it to be simpler to just have one partition for each HDD and use it as the physical drive for RAID. This would reult in only having one MD/md/multiple device.

The reason I chose this was to make for simple maintanaince down the road. From the guide, to replace (remove and add) an HDD i would have to run the command:

sudo mdadm --remove /dev/md0 /dev/sda1
sudo mdadm --add /dev/md0 /dev/sda1

If I have two md's, I would probably have to do:

sudo mdadm --remove /dev/md0 /dev/sda1

sudo mdadm --remove /dev/md1 /dev/sda1

replacing, sda1 with sdb1 if I want to change the second HDD

So,  Since I want to setup an LVM, I will put the full HDD into RAID then setup that RAID Partition to be used as a 'physical drive for LVM'

I think setup the LVM by creating one volume group and various logical volumes within that. I will choose ext4 and mount appropriately for the drives and setup one as a swap.


PLEASE let me know if I'm doing something wrong, or if you have any suggestions or requests~

blog comments powered by Disqus

All Entries Within This Topic:

  • 1: Setting It Up

Subscribe to this topic:

Browse Topics: