How to partition, format, and mount your block storage

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/vdb

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

  4. Use the command n to create a new partition, then p to create a primary partition. Select the default options for the first and last sectors 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 fdisk.

  6. Format the new partition using the command mkfs.ext4 /dev/vdb1 (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/vdb1 /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/vdb1 /hdd ext4 defaults 0 0

  10. Verify the new partition is properly mounted by using the command df -h. This should show /dev/vdb1 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.

  • storage
  • 10 Users Found This Useful
Was this answer helpful?

Related Articles

How to add or modify rDNS records on VPS servers

Adding or modify your IPv4 and IPv6 rDNS records via Crunchbits' control panel is very simple and...

How to generate SSH keys on Ubuntu/Debian

Here's a step-by-step guide on how to generate and add SSH keys to Ubuntu or Debian: Open a...

How to generate SSH keys on Windows

Here's a step-by-step guide on how to generate SSH keys in Windows: Download and install the...

How to add your public SSH key to an existing Ubuntu/Debian server

To add your public SSH key to a remote Ubuntu or Debian server, follow these steps: Copy...

How to add your public SSH key (pubkey) to Crunchbits' VirtFusion control panel for all new server installs

To add your SSH key to the Crunchbits control panel, follow these simple steps:First, when you...

Powered by WHMCompleteSolution