How to mount the data disk in your VPS at TheStack
TheStack now provides the VPS through noKVM virtualization, a powerful virtualization control panel. VPS generally comes with two disks, OS disk and Data disk. One thing you should have to keep in mind about OS disk is that it will get erased when the server is reloaded and OS disk is fixed size. We use the Data disk to store our permanent data. The data disk will depend on the VPS plan. In this article, we will guide you to mount the data disk on your VPS server that you purchased from Thestack. If you have purchased the Windows VPS from us skip the Linux VPS part scroll down for the guidance for Windows VPS.
Step 1: Know your disk space
- Using the
lsblk command will list all mass storage devices and partitions on them, including mounted file systems, unmounted file systems and devices without any file system. In this article, we are going to make the partition for vdb.
Step 2: Create partition using fdisk
For disks with the MBR partitioning schema,
fdisk partition editor can be used.
- Specify the disk device to create partition on.
- Specify the partition type, partition number, First sector, Last sector,
- Save partition table changes
- Initiate a kernel re-read of the new partition table by running partprobe command
Step 3: Creating file systems
After a block device has been created, the next step is applying a file system format to it. A file system applies a structure to the block device so that data can be stored and retrieved from it. The mkfscommand can be be used to apply a file system to a block device. Here we are using an extended type four(ext4) file system.
Step 4: Adding file system to
If an administrator wants the file system to be persistently mounted, a listing for the file system needs to be added to
/etc/fstab is a white space-delimited file with six fields per line. The first field specifies the device to be used.
You can find your device UUID by
The second field is the mount point where the device should be attached to the directory hierarchy. The third field contains the file system type that has been applied to the block device. The fourth field is the list of options that should be applied to the device when mounted to customize the behavior. The last two fields are the dump flag and fsck order.
Step 4: Mount the device
mount command to mount the device. After a successful mount, you can list the mounted devices using
Here we will discuss how to create a partition on a windows VPS server. To follow this article you should have the initial setup.
Select the hard disk where you need to create the partition
In the server manager, you will be able to see an option called volumes where you can create the new volumes for the harddisk
A new wizard window will be prompted where you have to complete some details. We will be discussing those steps with the help of screenshots.
- Select the server and disk need to be partitioned
- Specify the size of the volume
- Select the file system settings. we go with the default file system.
- You will saw the confirmation section with the option you have chosen. Click create after verifying the details.
- After completing the partition you can see the disk in the file explorer of your Windows server.