Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How to mount a second hard drive? Debian

I got a second hard drive added to one of my servers but now I have no clue how to mount it and have it recognizable by the os. Could anyone give me a quick guide on how to properly mount the hard drive under debian?


share|improve this question

marked as duplicate by mailq, Ward, Scott Pack, Dori Sep 25 '11 at 20:28

This question was marked as an exact duplicate of an existing question.

Asking the same question twice a year sounds like a memory leak ... Oh, sorry it is the 4th time in two years. – mailq Sep 25 '11 at 13:33
up vote 0 down vote accepted

Yes you can check to ensure the hard drive was picked up by the server using a few methods:

Dmesg will give you the last several events on the server the drive should have been given a /dev/ label (Ex: /dev/sdc)


Another method you can use is to check fdisk for a new drive in the list:

fdisk -l

Either method you choose should display the drive if it was picked up by the OS you may need to detach and reconnect the drive if you go the dmesg route and the drive was connected a long time ago.

Once you have established the drive was reckognized by the OS you will need to format it using your preferred method. (fdisk/parted/etc.) After you have formatted the drive you will need to create a FS on the drive and it is ready to mount. See the bottom of this post for step-by-step if you are not familiar with the formatting/FS creation process.

Make a directory to mount the new drive to:

mkdir -p /new/drive/

Mount the drive to the new directory:

mount /dev/sdc1 /new/drive

Be sure to add the following to /etc/fstab if you wish for the mount to survive a reboot of the machine:

/dev/sdc1 /new/drive xfs defaults 0 0

For Example: (Assuming the new drive is /dev/sdc and assuming you wish to us XFS as your FS type and you plan to use the entire disk)

parted /dev/sdc
gpt       # label type
NewDrive  #partition name
xfs       # File system type (ext3,ext4,etc.)
1         # Partition Starting point
100%      # Partition ending point
quit      # exit parted

mkfs.xfs /dev/sdc1
share|improve this answer

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