A simple method and guide to attaching BuyVM storage disk slabs to your VPS. This post uses a 3TB disk slab and VPS running Ubuntu 20.04.
Firstly make sure your block storage slab is attached to your server in the Stallion web panel.
Then check it was attached successfully by running:
This will list the current disk partitions:
n (new partition)
p and press enter (primary partition type)
Then for partition number, first sector and last sector you can press enter for each as the defaults will be fine.
w to save.
Note: If your storage slab is 2TB or below skip to the “Format the partition” section.
Using parted for GUID partition
If not installed use:
sudo apt-get install parted to install parted.
Select the partition:
Expand the disk with mkpart
Now using mkpart the disk can be expanded to its actual full capacity.
From the screenshot above (output from the parted print command) the max disk size is 3299GB.
mkpart primary 0GB 3299GB will expand the partition to be ~3TB.
Format the partition
Format this newly expanded partition with:
Mount the disk to a directory
Now to mount the disk:
mount /dev/sda /data
Adding an entry to fstab
Add this entry into the fstab file to be a permanent disk mount (through restarts):
/dev/sda /data ext4 defaults 0 0
To check the new disk: