Build an Ubuntu Server with RAID 1

ubuntuThis article covers building an Ubuntu file server including a RAID as part of the installation.  I'm using Ubuntu 14.04 LTS at the time of writing.


Ubuntu Installation

For this article I'm installing the OS onto a 4 GB USB memory stick.  I have also installed two 1TB hard drives, so we can implement the /home partition on a 1TB software RAID 1 partition.

  1. Insert the Ubuntu Server CD, and boot the machine.
  2. Choose your Language.
  3. Press Return, to Install Ubuntu Server.
  4. Select your Language again.
  5. Choose your Country.
  6. I find it quicker to manually configure the keyboard.
  7. Choose a Network Interface Card (NIC) as the Primary NIC (this screen appears if you have more than one NIC).
  8. Assuming you have a DHCP service running, your NIC will be automatically configured.
  9. Enter a meaningful Hostname.
  10. Enter your Full name.
  11. Enter your Username and Password.
  12. Don't encrypt your home directory.
  13. Accept (or change) your Time Zone.

 

RAID 1

Now we can create a RAID 1 partition for the /home directory.

  1. Choose Manual.
  2. Select one of the 1TB hard drives and press Return.
    1. Select Yes, to Create a new empty partition.
    2. Now select the Free Space on this 1TB hard drive.
    3. Choose Create a new partition.
    4. Select Continue to use the whole partition.
    5. Choose Primary.
    6. Select Use as: and choose Physical volume for RAID.
    7. Select Done setting up the partition.
  3. Repeat the above steps for the second 1TB drive.
  4. Select Configure Software RAID.
  5. Select Yes to Write the changes to the storage devices.
  6. Choose Create MD device.
  7. Choose RAID 1.
  8. Leave default of 2 active devices.
  9. Leave 0 number of spare devices.
  10. Select the two partitions that you've just created.
  11. Choose Finish.
  12. Select the 1.0 TB that you've just created.
  13. Select Use as, and choose Ext 4 journaling file system.
  14. Select the Mount point as /home.
  15. Leave all other settings at default.

 

4 GB Memory Stick

We will now configure the memory stick to have Ubuntu installed on it.

  1. Select the 4 GB memory stick, and press Enter.
  2. Select Yes to Create a new empty partition.
  3. Select the newly created Free Space.
    1. Choose Create a new partition.
    2. New partition size:  3.0 GB
    3. Type for the new partition:  Primary
    4. Location:  Beginning
    5. Use as:  ext4
    6. Mount point:  /
    7. Bootable flag:  on
    8. Select Done setting up the partition.
  4. Select the remaining Free space.
    1. Choose Create a new partition.
    2. Use the remaining 1 GB.
    3. Type for the new partition:  Primary
    4. Use as:  Swap area.
    5. Select Done setting up the partition.
  5. Select Finish partitioning and write changes to disk.
  6. Select Yes to write the changes.

 

Finishing the Installation

Ubuntu will now continue the installation on the partitions that you've configured.

  1. Enter any Proxy server information if required.
  2. Choose to have No automatic updates.
  3. Choose from the Software selection.
    1. OpenSSH server
    2. DNS server
    3. LAMP server
    4. Mail server
    5. PostgreSQL server
    6. Print server
    7. Samba file server
    8. Tomcat Java server
    9. Virtual machine host
    10. Manual package selection
  4. OpenSSH is nearly always useful, as it allows you to remotely access this server.

Ubuntu will now be installed.  This will typically take several minutes depending on how many options you have chosen. When the installation finishes, you can choose Yes to Install the GRUB boot loader.

 

Configuration

You are now ready to configure your Ubuntu server.

 

Thanks for visiting.