How to add 2nd Hard drive to Ubuntu

To add/mount the second hard drive into Ubuntu, open up the terminal window and type:

sudo fdisk -l

Where sdb is our newly added Secondary Harddisk!

To create the partition on the second Hard drive, use the following command and follow the “on screen” instructions:

sudo fdisk /dev/sdb

Use the partprobe command to update the kernel with the changes:

sudo partprobe /dev/sdb

Where /dev/sdb is my device name, you can use your’s!

Now we need to format our newly created partition using the following command:

sudo mkfs /dev/sdb1 -t ext4

Verify the newly created partition:

sudo fdisk -l

Next you need to create a directory for a mount point:

cd /mnt/
sudo mkdir 2ndHDD 
sudo chmod 0777 2ndHDD
ls -l

Next, mount the newly created sdb1 parition into 2ndHDD directory:

sudo mount /dev/sdb1 /mnt/2ndHDD -t ext4

Updated: Run this command once more:

sudo chmod 0777 2ndHDD

Now, we make a test that we can write a file on to the new drive:

touch /mnt/2ndHDD/test.txt
ls /mnt/2ndHDD/* 

Next time, when we will reboot the computer, it will be gone. If we want to mount new hard drive permanently then we need to edit the fstab file:

sudo nano /etc/fstab

Add this line at the end of the fstab file(you can adjust it according to your requirement):

/dev/sdb1 /mnt/2ndHDD ext4 defaults 0 0

Use this command or else reboot your computer:

sudo mount –a

Hope this will help you!

Please Remember me in your prayers!

10 responses to “How to add 2nd Hard drive to Ubuntu

  1. roy June 25, 2012 at 7:33 pm

    rbgeek, been looking for a tutorial such as yours as I have ssd as a boot drive and wanted to incorporate my existing hdd for additional storage. However, I implemented your instructions to a “t” and still can’t get the second drive to mount. Any suggestions? Thanks.

  2. Scop]pq h53poeqrj ergpo October 13, 2012 at 9:51 pm


  3. Gordon Phillips December 8, 2012 at 7:54 pm

    Thank you! – worked great!

  4. Jesse January 28, 2013 at 3:51 am

    Seems to have worked for me as well. Thanks!

  5. Mack March 11, 2013 at 5:49 pm

    Work great for me! I added three drives that contained a total of five partitions.

  6. Steve June 10, 2013 at 10:21 am

    Works perfectly – thanks for a clear, concise and accurate tutorial

  7. Brantan August 8, 2013 at 6:03 pm

    Thank you! Was very helpful tutorial.

  8. Nick April 6, 2015 at 5:46 pm

    Worked great for me – now what course do I take to un-mount the drive should the need arise.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: