How To's

Mounting A Hard Drive In Linux

3,010 views · 0 found this helpful

Was this helpful?

Problem

The following document will outline the process for mounting a new hard drive on a Linux server. It is assumed that we will be using a disk with standard partitioning. We will be using fdisk in order to get the list of drives and mount to mount the disk.

tl;dr

fdisk -l
...output suppressed
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225200 bytes
 
Device Boot Start End Blocks ID System
/dev/sdb1 * 1 13 488279610 83 Linux
mkdir /newdrive
mount -t auto /dev/sdb1 /newdrive

Solution

Let's assume that the new drive is /dev/sdb and it has one big standard partition on it. We want to mount that partition to /newdrive. First, let's display our partitioning scheme:

fdisk -l
...output suppressed
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225200 bytes
 
Device Boot Start End Blocks ID System
/dev/sdb1 * 1 13 488279610 83 Linux

Now, let's make a new directory for the new drive:

mkdir /newdrive

Finally, we need to mount the partition to that newly created directory.

mount -t auto /dev/sdb1 /newdrive
  • Updated

← All articles

Still stuck?

Our engineers answer tickets directly, 24/7.