Hostwinds offers your the ability to add storage to your VPS through volumes. This article will take you through the steps of creating a storage volume in your cloud portal and mounting it on your Linux VPS.
Adding the Volume
First we begin by logging into the Hostwinds Client Area.
Step One: From your client area click on Cloud Control, when you see the drop down click on Cloud Portal.
Step Two: After being redirected to the next page, click on Storage then Volumes.
Step Three: Create your volume by selecting the following:
Select the Volume Size from the drop down menu
Provide Volume name that you can easily remember
Select the Volume Location from the drop down menu
Click the Add Volume button
Step Four: Once the volume has been created, click on the Actions button on the right side of the Volume to attach the Volume to a VPS.
Step Five: You will get a pop-up where you can choose the VPS from the drop down menu to attach the volume to
Step Six: Once the volume has been attached you will see a similar image letting you know the device that has been attached.
Partitioning The Volume
Step One: Log into the VPS and check your device.
You will see the unpartitioned disk /dev/sdb
Step Two: Use parted to partition the disk with the following commands.
parted /dev/sdb mklabel gpt mkpart primary 1M 100% print quit
Step Three: The output should be similar to this
Step Four: Format your partition with desired file system. In this case we’re using xfs .
Mounting the volume
Step One: Create a directory where you wish to mount. In this example, the directory name is /mnt/myvolume
Step Two: Get the unique identifier or UUID of /dev/sdb1.
Step Three: Using your favorite text editor edit your modify the /etc/fstab adding the line below. Note that this is a unique identify for each device. Make sure to acquire the UUID of your drive using the blkid as detailed above and replace /mnt/myvolume with the directory name you mounted your Volume to
UUID=8246d5a0-bea3-4872-a39e-d3ac1ddb4a51 /mnt/myvolume xfs defaults 0 0
Step Four: Run the mount command to mount the Volume drive to the mount point of your choosing
Step Five: To verify that it’s been mounted.