You are on page 1of 42

Martin's Blog (http://linux-sys-adm.com/) !

(https://www.linkedin.com/in/slavovma
rtin)

SUMMARY (HTTP://LINUX-SYS-ADM.COM/) TUTORIALS (HTTP://LINUX-SYS-ADM.COM/TUTORIALS/) Search for anything on this site...

ABOUT ME (HTTP://LINUX-SYS-ADM.COM/ABOUT-ME/)

MY PROJECTS (HTTP://LINUX-SYS-ADM.COM/MY-PROJECTS/)

How to add second hdd (additional hard drive) in Ubuntu 14.04 (Linux) Step-by-step
(http://linux-sys-adm.com/?p=284)

How to install and activate RAID 1 Ubuntu (Server) 14.04 LTS


Step-by-Step
" June 26, 2015 (http://linux-sys-adm.com/how-to-install-and-activate-raid-1-ubuntu-server-14.04-lts-step-by-step-by-step/) # m.slavov (http://linux-sys-adm.com/)

This guide will describes the basic steps of installing Ubuntu Server 14.04 from beginning to end. is a fault-tolerance conguration known as disk mirroring. With RAID
1 (https://help.ubuntu.com/community/Installation/SoftwareRAID), data is copied seamlessly and simultaneously, from one disk to another, creating a replica, or
mirror. If one disk gets fried, the other can keep working. Its the simplest way to implement fault tolerance and its relatively low cost.The downside is that RAID 1
causes a slight drag on performance. RAID 1 can be implemented through either software or hardware. A minimum of two disks is required for RAID 1 hardware
implementations. With software RAID 1, instead of two physical disks, data can be mirrored between volumes on a single disk. One additional point to remember is
that RAID 1 cuts total disk capacity in half: If a server with two 1TB drives is congured with RAID 1, then total storage capacity will be 1TB not 2TB.

Following are the key points to remember for RAID level 1.

Minimum 2 disks.
Good performance ( no striping. no parity ).
Excellent redundancy ( as blocks are mirrored ).

Step 1 Select what language you would like to install. I am going to use English language.
Step 2 Select Install Ubuntu Server.

Step 3 Select language that used for the installation process, default English.
Step 4 Select location that will used for time zone and also for example to help select the system locale.

Step 5 Congure keyboard layout.


Step 6 Select country of origin for the keyboard. I am going to use English (US).

Step 7 Select the layout matching the keyboard for your machine. Default English.
Step 8 Auto congure network.

Step 9 Set Up users Enter full name or real name for the new user, then select .
Step 10 Set Up users Enter name for your account, then select .

Step 11 Set Up password Enter password for the new user.


Step 12 Set Up password : Re-enter password for the new user.

Step 13 Answer if you want to encrypt home directory. I recommend answer because if your hard driver ever gets corrupted and you need to retrieve information it
will be much easier to access it.
Step 14 Select your time zone.

Step 15 Partition disks: In this case i will choose Manual.


Step 16 Partitioning Disks: In this case, the disks are new and there are no partition tables on it. Select each disk to create a partition table.

Step 17 Partitioning Disks: Choose Create new empty partiton.


Step 18 Partitioning Disks: Select the free space on the rst disk to create partitions on it.

Step 19 Partitioning Disks: Choose Create a new partition.


Step 20 Partitioning Disks: The rst partition will be 10% fromm all HDD at the beginning of the disk (this will be used for swap space).

Step 21 Partitioning Disks: Choose Primary.


Step 22 Partitioning Disks: Choose Beginning.

Step 23 Partitioning Disks: Choose Ext4 journaling le system.


Step 24 Partitioning Disks: Choose physical volume for RAID.

Step 25 Partitioning Disks: Choose Dont setting up the partitions.


Step 26 Partitioning Disks: Select the remaining free space on the rst disk to create the 2nd partition. In this case, we will be using the remaining free space for this
partition.

Step 27 Partitioning Disks: Choose Create new empty partiton.


Step 28 Partitioning Disks: Use all free space for the new partition.

Step 29 Partitioning Disks: Choose Primary.


Step 30 Partitioning Disks: Choose Ext4 journaling le system.

Step 31 Partitioning Disks: Choose physical volume for RAID.


Step 32 Partitioning Disks: Set bootable ag ON.

Step 33 Partitioning Disks: Choose Dont setting up the partitions.


Step 34 Partitioning Disks: Now I will create second HDD witt same parameters.

Step 35 Partitioning Disks: Choose Create new empty partiton.


Step 36 Partitioning Disks: Select the free space on the second disk to create partitions on it.

Step 37 Partitioning Disks: Choose Create a new partition


Step 38 Partitioning Disks: The second partition will be 10% fromm all HDD at the beginning of the disk (this will be used for swap space).

Step 39 Partitioning Disks: Choose Primary.


Step 40 Partitioning Disks: Choose Beginning.

Step 41 Partitioning Disks: Choose Ext4 journaling le system.


Step 42 Partitioning Disks: Choose physical volume for RAID.

Step 43 Partitioning Disks: Choose Dont setting up the partitions.


Step 44 Partitioning Disks: Select the remaining free space on the second disk to create the 2nd partition. In this case, we will be using the remaining free space for
this partition.

Step 45 Partitioning Disks: Choose Create new empty partiton.


Step 46 Partitioning Disks: Use all free space for the new partition.

Step 47 Partitioning Disks: Choose Primary.


Step 48 Partitioning Disks: Choose Ext4 journaling le system.

Step 49 Partitioning Disks: Choose physical volume for RAID.


Step 50 Partitioning Disks: Set bootable ag ON.

Step 51 Partitioning Disks: Choose Dont setting up the partitions.


Step 52 Partitioning Disks: Choose Congure raid.

Step 53 Partitioning Disks: Choose YES.


Step 54 Partitioning Disks: Choose Create MD device.

Step 55 Partitioning Disks: Choose RAID 1.


Step 56 Partitioning Disks: Choose Number of active devices for RAID 1 array 2 .

Step 57 Partitioning Disks: Choose Number of spare devices for the RAID 1 array 0.
Step 58 Partitioning Disks: Select rst partition from HDD1 and HHD2 /dev/sda1 and /dev/sdb1

Step 59 Partitioning Disks: Create RAID for seconds partition Choose Create MD device.
Step 60 Partitioning Disks: Choose RAID 1.

Step 61 Partitioning Disks: Partitioning Disks: Choose Number of active devices for RAID 1 array 2 .
Step 62 Partitioning Disks: Choose Number of spare devices for the RAID 1 array 0.

Step 63 Partitioning Disks: Select seconds partition from HDD1 and HHD2 /dev/sda2 and /dev/sdb2
Step 64 Partitioning Disks: Choose Finish.

Step 65 Partitioning Disks: To congure the swap RAID partition, select the 427.5 MB RAID device listed under RAID1 device #0.
Step 66 Partitioning Disks: Choose Use as.

Step 67 Partitioning Disks: Choose swap area.


Step 68 Partitioning Disks: Choose Dont setting up the partitions.

Step 69 Partitioning Disks: To congure the swap RAID partition, select the 3.9 GB RAID device listed under RAID1 device #0.
Step 70 Partitioning Disks: Choose Use as.

Step 71 Partitioning Disks: Choose Ext4 journaling le system.


Step 72 Partitioning Disks: Choose Mount point.

Step 73 Partitioning Disks: Choose / the root le system.


Step 74 Partitioning Disks: Choose Dont setting up the partitions.

Step 75 Partitioning Disks: Choose Finish partitioning and write changes to disk.
Step 76 Partitioning Disks: If you can choose yes or no in this example i will choose NO. I will change it on YES undel command line. I strongly recommend to
choose YES.

Step 77 Choose YES.


Step 78 Partitioning Disks: Choose Continue without entering anything.

Step 79 Choose no automatic updates.


Step 80 Choose YES.

Step 81 You can view RAID status with this command cat /proc/mdstat

root@mail:/# cat /proc/mdstat


Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda1[0] sdb1[1]
7806912 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sda2[0] sdb2[1]


968818496 blocks super 1.2 [2/2] [UU]

unused devices: none

Step 82 Activate boot degraded array. Edit grub nano /etc/default/grub and edit follow line GRUB_CMDLINE_LINUX_DEFAULT as below:

GRUB_CMDLINE_LINUX_DEFAULT=bootdegraded=true
GRUB_CMDLINE_LINUX_DEFAULT=bootdegraded=true

Step 83 Upgrade-grub.

root@mail:/# update-grub

2 Theme How to FIX BUG disk lter writes are not supported Ubuntu (Server)14.04 (http://linux-sys-adm.com/how-to-xed-bug-disk-lter-writes-are-not-supported-
ubuntu-server14.04/)

Share Share

(//www.linksalpha.com/social/mobile?link=http%3A%2F%2Flinux-sys-adm.com%2Fhow-to-install-and-activate-raid-1-ubuntu-server-14.04-lts-step-by-step-by-step%2F&title=How%20to%20install%20and%20activate

Bookmark the permalink (http://linux-sys-adm.com/how-to-install-and-activate-raid-1-ubuntu-server-14.04-lts-step-by-step-by-step/).

How to install and congure Samba Server with How to FIX BUG disk lter writes are not
FULL AUDIT on Ubuntu (Server)14.04 LTS Step-by- supported Ubuntu (Server)14.04 (http://linux-
Step (http://linux-sys-adm.com/how-to-install-and- sys-adm.com/how-to-xed-bug-disk-lter-writes-
conguration-samba-server-on-ubuntu- are-not-supported-ubuntu-server14.04/)
server14.04-lts-step-by-step/)

Leave a Reply
Your email address will not be published. Required elds are marked *

Name *

Email *

Website

Comment

Post Comment

Developed by MartinSlavov
(http://linux-sys-adm.com/?
page_id=50)

You might also like