How I Added and Mounted a New Data Disk on My Debian VPS

When I first logged into my VPS, I could only see the main system disk.
The server plan included extra storage, but it was not available in the OS until I added it manually from the provider panel.

After attaching the new disk, Linux showed it as /dev/sdb.

I wanted to use this disk as a separate storage space under /root/hdd1, so I followed these steps.

1. Check whether the new disk exists

First, I used:

lsblk

This showed my system disk /dev/sda and the new disk /dev/sdb.

To confirm that the new disk had no partition yet, I checked:

lsblk /dev/sdb

At that time, it showed only the disk itself, without /dev/sdb1.

2. Create a partition

Next, I created a GPT partition table and one full-size partition:

parted /dev/sdb --script mklabel gpt
parted /dev/sdb --script mkpart primary ext4 0% 100%
partprobe /dev/sdb

After that, /dev/sdb1 appeared.

3. Format the disk

Then I formatted the new partition as ext4:

mkfs.ext4 -L data /dev/sdb1

4. Create a mount point

Since I wanted the disk under the root directory, I created:

mkdir -p /root/hdd1

5. Mount the disk manually

To test it first, I mounted it manually:

mount /dev/sdb1 /root/hdd1
df -h /root/hdd1

This confirmed that the new storage was mounted correctly.

6. Get the UUID

Instead of using /dev/sdb1 directly in system configuration, I used the disk UUID:

blkid /dev/sdb1

Using UUID is safer because device names can change in some situations.

7. Enable auto-mount on boot

Before editing the mount configuration, I made a backup:

cp /etc/fstab /etc/fstab.bak

Then I added this line to /etc/fstab:

UUID=21947410-a8bc-4c4a-84ae-4c697d94bfb3 /root/hdd1 ext4 defaults,nofail 0 2

8. Test the configuration

Finally, I tested the setup:

umount /root/hdd1
mount -a
df -h /root/hdd1

If the disk mounts again without errors, the configuration is correct.

Final result

Now my VPS automatically mounts the extra disk to /root/hdd1 at boot.

This is a simple but useful setup when you want to separate system storage from data storage on a Linux VPS.


Conclusion

This process was straightforward once the disk became visible in the system:

  • detect the disk
  • create a partition
  • format it
  • mount it
  • configure /etc/fstab

For small personal VPS projects, this is a practical way to add more storage without reinstalling the server.