---
title: "Using a Secondary Hard Drive on a Dedicated Server"
description: "If you have a dedicated server with 2 hard drives, there might come a time when your primary hard drive is starting to become full, and you'd like to utilize your secondary hard drive. You can either..."
url: https://www.inmotionhosting.com/support/product-guides/dedicated-hosting/using-a-secondary-hard-drive-on-a-dedicated-server/
date: 2013-11-14
modified: 2023-08-21
author: "InMotion Hosting Contributor"
categories: ["Dedicated Hosting"]
type: post
lang: en
---

# Using a Secondary Hard Drive on a Dedicated Server

If you have a [dedicated server](https://www.inmotionhosting.com/dedicated-servers) with 2 hard drives, there might come a time when your primary hard drive is starting to become full, and you’d like to utilize your secondary hard drive.

You can either simply [create an FTP account with access to your secondary hard drive](/support/website/security/password-strength/#ftp-account) to start uploading files there for storage, or you can go all out and [rearrange your cPanel account](/support/website/security/password-strength/#rearrange-cpanel-account) to actually use the secondary hard drive for all of their files.

- [Find Disk Usage on Server](#disk-usage)
- [Rearrange cPanel Account onto Secondary Drive](#rearrange-cpanel-account)
- [Create a Separate FTP Account on Secondary Hard Drive](#ftp-account)

Please note that to follow either of these options you need to have root access to your dedicated server.

Using a Secondary Drive allows you to have more options and features that you can make use of for your account. They include:

- Additional data redundancy, and storage space
- Ability to separate data and application files
- Make use of FTP for file management
- Make use of cPanel Configuration options

## Find Disk Usage on Server

Prior to setting up anything on your secondary hard drive, you should understand the current disk usage on your server which is very simple to review following these steps.

1. Login via [SSH](/support/server/ssh/how-to-login-ssh/) as the root user on your server.
2. Run the following command: **df -h **You should get an output similar to this: **Filesystem Size Used Avail Use% Mounted on **/dev/sdb1 222G 186G 25G 89% / ***/dev/sda1 226G 228M 214G 1% /home2*** tmpfs 2.0G 0 2.0G 0% /dev/shm /usr/tmpDSK 485M 12M 448M 3% /tmpI have bolded and italicized the secondary drive on this server indicated by* **/home2***. You can see we’re using up about **89%** of the available disk space on our primary hard drive, with **25GB** to spare. Let’s say you know you need to upload **30GB** worth of files to store on your server, since you still have **214GB** free on the secondary hard drive you could use that instead of filling your primary hard drive past capacity.

## Rearrange cPanel Account onto Secondary Drive

If you’re running out of hard drive space on your primary drive, and still need to upload website files directly to your cPanel account, you can rearrange the cPanel account to have its home directory on your secondary drive.

You could also just [create a separate FTP account on the secondary hard drive](/support/website/security/password-strength/#ftp-account) if you just needed some more file storage separate from your primary hard drive.

1. [Login to WHM](/support/edu/whm/log-into-whm/) on your dedicated server.
2. In the top-left search box, type **rearrange**. Then click on **Rearrange an Account**.![whm click on rearrange an account](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/whm_whm_rearrangeAccount_highlight.png)
3. Select a cPanel account you want to move to your secondary drive, and then click on **Rearrange**![whm select account and click rearrange](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/whm_rearrange-account_rearrangeAccount_rearrangeButton_highlight.png)
4. You can see the **Current Home Directory** is set to **/home/example** Select **/home2** from the **New mount point for this account** drop-down and click **Move Account**.**DO NOT close WHM or try to interrupt the move process until it fully completes. Depending on the size of your cPanel account this could take some time. You should see a success message once the move is complete:**![Re-arrange account](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/re-arrange-account.jpg)
5. Now whenever you upload files for this cPanel account, it will be uploaded to your secondary drive instead of continuing to fill up the primary one. You can verify this on the server by running: **file /home/example **The server should spit back: **/home/example: symbolic link to `/home2/example’ **This shows that nothing will be uploaded to the primary hard drive on **/home** for this **example** cPanel user, as their home directory on the primary drive is simply a symbolic link to their home directory on the secondary drive.

## Create a Separate FTP Account on Secondary Hard Drive

If you just need to store some files on your servers such as database backups, or something you aren’t going to directly use on your website right away. You can simply create a 2nd FTP account on your secondary hard drive to upload these types of files there.

These files would only be accessible over FTP. You wouldn’t be able to access them from cPanel, or via your website. If you need that you can [rearrange a cPanel account onto the secondary drive](/support/website/security/password-strength/#rearrange-cpanel-account) instead.

1. [Login to the cPanel](/support/edu/cpanel/how-to-log-into-cpanel/) account where you wish to create an FTP account for your secondary drive.
2. Under the Files section, click on **FTP Accounts**. ![click on ftp accounts](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/cpanel_cPanel_ftpAccountsIcon_highlight.png)
3. Fill in the details for a new FTP user, in this case, you can see I’m naming mine **2ndDrive@example.com** and assigning the user’s directory to be **/home/example/public_html/2ndDrive**![create 2nd drive ftp user](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/cpanel_ftp-accounts_ftpAccounts_create2ndDriveUser.png)
4. Login to your server with the root user via [SSH](/support/server/ssh/how-to-login-ssh/).
5. In this example, we created our secondary FTP account on our **example** cPanel account. The actual settings for this FTP user are stored then in the **example** user’s **proftpd** file which you can view with: cat /etc/proftpd/example This will spit back all the current FTP account settings for this **example** cPanel user:**2nddrive**:$1$9Xp:502:501:**example:/home/example/public_html/2ndDrive**:/bin/ftpsh example:$1$nsk:502:501::/home/example:/bin/bash ftp::14:50::/home/example/public_ftp:/bin/ftpsh example_logs:$1$nsk:502:501:example:/usr/local/apache/domlogs/example:/bin/ftpsh I’ve trimmed the long password hashes so the text can fit above, but you should see I’ve bolded the **2ndDrive** FTP user we created, and it belongs to the **example** cPanel user and the home directory is set to **/home/example/public_html/2ndDrive**
6. Now edit the **/etc/proftpd/example** file using this command: **vi /etc/proftpd/example **Now use your **arrow keys** to navigate in the **vi** text-editor to the **/home/** line of our new FTP user. Hit “**i”** on your keyboard to enter **INSERT** mode, and edit this line to read **/home2/example/2ndDrive** Then hit **ESC** to exit **INSERT** mode, and then **Shift ZZ** to save the file![Edit etc proftpd ftp path](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/edit-etc-proftpd-ftp-path.gif)
7. Next, you’ll want to create the directory on the secondary hard drive for this FTP user with: **mkdir -p /home2/example/2ndDrive **You also want to sure the **example** cPanel username has ownership of this directory with: **chown example.example /home2/example/2ndDrive -R**
8. Now if you connect with this 2ndDrive@example.com FTP user in your FTP client, you’ll be presented with a blank directory, and you can start uploading files there. After your files are uploaded you can take a look back on the server to verify they ended up on your secondary drive: **ll /home2/example/2ndDrive** You should see the file you just uploaded: **total 39776 drwxr-xr-x 2 example example 4096 Nov 14 14:38 ./ drwxr-xr-x 3 root root 4096 Nov 14 14:33 ../ -rw-r–r– 1 example example 40677376 Nov 14 14:39 brackets-sprint-33-WIN.msi**

You should now understand how to find out how much disk space is being used on all of the hard drives on your server. Also, you know how to either create a secondary FTP account to utilize the secondary hard drive or rearrange the entire cPanel account to make the secondary hard drive the user’s new home going forward.

**Dedicated Servers, Your Way**

Let InMotion handle security, updates, and optimization with Premier Care, or take full control with self-managed bare metal.

[Explore Dedicated Servers](https://www.inmotionhosting.com/dedicated-servers?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=dedi-cta1)
