Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am going to put an additional (non-USB) hard drive in my system. I already have Ubuntu on my other hard drive so I do not want to install Ubuntu on the additional drive but only use it for storage. How do I add the additional hard drive to my Ubuntu system, e.g. make Ubuntu recognize it and mount it properly?

share|improve this question
1  
I thought it would make sense to have a general question for this issue. I tried to find one and asked in chat for one without success. Hint: help.ubuntu.com/community/InstallingANewHardDrive –  N.N. Apr 26 '12 at 6:45
    
Good idea! Wish I'd found it before I answered this: askubuntu.com/questions/488213/…. Perhaps they could be merged. –  Elder Geek Jul 4 at 15:56
add comment

2 Answers 2

There is a good description how to add another drive here:

Basically you have to partition the new disk, create a file system on it and then mount it. Thats is the easy way. Another way would be to use lvm and create virtual disks on the new drive. That would give you more flexibility:

share|improve this answer
2  
Answers are generally expected to be self-sufficient. Could you please provide explicit instructions rather than links to make your answer better? –  N.N. Apr 26 '12 at 9:17
add comment

1 Partition

The easiest and user-friendly way is probably to use gparted after you have installed your new HDD and boot your machine:

sudo gparted

Then you create partitions, by setting their size and type.
Hint: since your hard drive is additional storage space, you probably want to create one single big partition with the type of ext4.

Screenshot of gparted

gparted is a very easy to use tool, and yet very advanced.

2 Mount

After you are done creating your partitions (most likely it will be just one ext4 data partition, since this is your additional storage drive), you need to permanently mount it.

At this step you already know what names your new partition(-s) have. If not sure, following command will remind you about existing drives and partitions on them:

sudo fdisk -l

This will output something like this (intentionally skipped /dev/sda system drive info):

Disk /dev/sda: 250.1 GB, 250059350016 bytes
....

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000814e3

   Device Boot      Start         End      Blocks   Id  Syste
/dev/sdb1               1      243201  1953512001   83  Linux

Output states, that your new partition is /dev/sdb1. Now you need to mount it to utilize it's precious space. To achieve this, you need to perform three simple steps:

2.1 Create a mount point

sudo mkdir /hdd

2.2 Edit /etc/fstab

Open /etc/fstab file with root permissions:

sudo vim /etc/fstab

And add following to the end of the file:

/dev/sdb1    /hdd    ext4    defaults    0    0

2.3 Mount partition

Last step and you're done!

mount /hdd

Links

share|improve this answer
1  
Good answer. I think you can improve on it in some ways though. You may want to add a warning that you should only partition is it is a new drive or if you want to lose the data on the drive. Could you please add a short explanation of what mounting means and why you need to add the drive to /etc/fstab? Also, could you please add an explanation of what each part of the /etc/fstab entry means? –  N.N. Apr 26 '12 at 9:23
    
Thanks. Yes, your proposals sounds reasonable. –  Andrejs Cainikovs Apr 26 '12 at 9:51
1  
You say you think my proposal is reasonable but you have not edited your answer accordingly. –  N.N. Dec 29 '12 at 20:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.