Here are the steps to quick format and permanently mount an additional hard drive in Linux (Debian/Ubuntu):

  1. Open a ticket and make sure we have mounted your additional large storage. Once we have done so, you will be notified and your VPS will need to be restarted for the disk to be visible to the OS.

  2. SSH to your server and use the command lsblk to check the name and partition of the newly added hard drive. It will be listed as a block device and will typically be named /dev/sdb

  3. Use the command gdisk /dev/sdb (or the appropriate name for your hard drive in place of 'sdb') to open the gdisk utility and partition the hard drive.

  4. Use the command n to create a new partition. Select the default options for everything to create a partition that fills the entire hard drive.

  5. Use the command w to write the changes to the hard drive and exit gdisk.

  6. Format the new partition using the command mkfs.ext4 /dev/sdb1 (or the appropriate name for your partition). This process will take a few minutes depending on the size of your block storage, be patient.

  7. Create a mount point for the new partition using the command mkdir /hdd.

  8. Use the command mount /dev/sdb1 /hdd to mount the new partition.

  9. To make the partition mount automatically on boot, add the following line to the file /etc/fstab: /dev/sdb1 /hdd ext4 defaults 0 0

  10. Verify the new partition is properly mounted by using the command df -h. This should show /dev/sdb1 and it's size mounted to /hdd

  11. That's it! Enjoy your new persistent large storage space.


Notes: The above instructions are very simplistic and generated with Debian/Ubuntu in mind, use ext4 file system, and make some basic assumptions about disk name and where to mount.

Was this answer helpful? 29 Users Found This Useful (31 Votes)