Add a Hard Drive

Introduction

For our servers, we provide a simple and flexible solution for adding hard drives to your existing server. All server hard drives up to a maximum of 10 TiB (NVMe SSD & HDD) can be added through our Customer Center without any downtime.


Prerequisites

  • Your user account must have permission to add a hard drive



Add a Hard Drive

First, log in to our Customer Center at account.creoline.com and select the server to which you want to add another hard drive.


Use the + Add Hard Drive button to configure the desired settings for the hard drive you want to add.


Select the desired hard drive type here and then specify the desired capacity of the new hard drive. Confirm your selections by clicking the Add Hard Drive button.


Please note that manual partitioning is required after your order is processed, and it will no longer be possible to reduce the size of the hard drive at a later time.



Create a Partition (Linux)

To partition the previously added hard drive to the required file system, follow these steps. The secondary hard drive can only be used after partitioning is complete.


Identify Existing Hard Drives

To detect and identify the hard drives in the system, run the following command:

lsblk
# Example output

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda 8:16   0   40G  0 disk
└─sda1   8:17   0   40G  0 part /
sdb 8:0    0 2000G  0 disk <--- NEW HARD DRIVE


Here you can see that the virtual hard drive sda already has a partition sda1, and the new hard drive sdb does not yet have a partition.


Formatting the New Hard Drive

GPT is used to format the added hard drive. To do this, run the following command:

parted /dev/sdb mklabel gpt


Important: /dev/sdb is the unused drive, which can be identified using lsblk.

# Output

Information: You may need to update /etc/fstab.


Create a Partition

Using parted, we’ll create an ext4 partition that occupies 100% of the added hard drive:

parted /dev/sdb mkpart primary ext4 0% 100%


Important: /dev/sdb is the unused drive, which can be identified using lsblk.


Creating the File System

Now that the partition is ready, we can create the file system:

mkfs.ext4 /dev/sdb1
# Output

mke2fs 1.46.2 (Feb 28, 2021)
Discarding device blocks: done
Creating filesystem with 262,143,488 4k blocks and 65,536,000 inodes
Filesystem UUID: a41687b4-0b9f-4144-a178-90bbeb213d4a
Superblock backups stored on blocks:
  32,768, [...], 214,990,848

Allocating group tables: done
Writing inode tables: done
Creating journal (262,144 blocks): done
Writing superblocks and filesystem accounting information: done


Important: /dev/sdb1 is the unused partition, which can be identified using lsblk.


Create a mount point

The new hard drive must be mounted on the server. To do this, you can create a directory, for example, under /mnt.

mkdir -p /mnt/data


Mount the hard drive

To ensure the hard drive is automatically detected and mounted when the server starts, the /etc/fstab file must be updated. To do this, use the hard drive’s unique UUID instead of its unreliable name.


Determining the UUID:

blkid /dev/sdb1
# Output 

/dev/sdb1: UUID="a41687b4-0b9f-4144-a178-90bbeb213d4a" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="d0b44015-e8e2-4ddb-8d78-59ce3309ccd0"


Please make sure to use the UUID and not the PARTUUID.


Once you have determined the UUID, open the /etc/fstab/ file and add the following parameter:

nano /etc/fstab
# Secondary NVMe - 2 TB
UUID=a41687b4-0b9f-4144-a178-90bbeb213d4a /mnt/data ext4    discard,noatime,nodiratime,errors=remount-ro 0 1


To apply the mounts from /etc/fstab, use:

mount -a
systemctl daemon-reload


Check the hard drive

Using df -h, the additional 2 TiB should now be displayed:

df -h

# Output:
File system    Size Used Free % used Mounted on
udev 2.0G 0  2.0G    0% /dev
tmpfs 394M    472K  393M    1% /run
/dev/sda1 40G    1.8G   36G    5% /
tmpfs 2.0G 0  2.0G    0% /dev/shm
tmpfs 5.0M 0  5.0M    0% /run/lock
tmpfs 394M 0  394M    0% /run/user/0
/dev/sdb1 2000G     28K 2000G    1% /mnt/data <-- New partition



Remove a Hard Drive

First, log in to our Customer Center at account.creoline.com and select the server from which you want to remove the hard drive. Select the hard drive you want to remove and click the button with the red X. A confirmation window will then open.


Then confirm the removal by clicking Remove Hard Drive.


Please note that all data on the associated hard drive will be permanently deleted.