Add hard disk

Preface

For our servers, we provide a simple and flexible solution to add hard disks to your existing server. All server hard disks can be added up to a maximum of 10 TiB (NVMe SSD & HDD) via our customer center without downtime.


Requirements

  • Your user account must have the authorization to add a hard disk



Add hard disk

First log in to our customer center at account.creoline.com and select the server to which you want to add another hard disk.

Hard disks - server overview


You can use the + Add hard disk button to make the desired settings for the hard disk you wish to add.

Festplatte hinzufügen


Select the desired hard disk type here and then enter the desired capacity of the new hard disk. Confirm the details with the Add hard disk button.


Please note that manual partitioning is required after your order has been executed and it is no longer possible to reduce the size of the hard disk at a later date.



Create partition (Linux)

To partition the previously added hard disk to the required file format, the following steps are necessary. The secondary hard disk can only be used after it has been completely partitioned.


Identify existing hard disks

To determine and identify the hard disks in the system, execute 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 HDD


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


Formatting the new hard disk

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

parted /dev/sdb mklabel gpt


Important: /dev/sdb is the unused drive, which can be determined via lsblk.

# Output

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


Create partition

With the help of parted we create an ext4 partition that takes up 100% of the added hard disk:

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


Important: /dev/sdb is the unused drive, which can be determined via lsblk.


Create file system

Now that the partition is ready, the file system can be created:

mkfs.ext4 /dev/sdb1
# Output

mke2fs 1.46.2 (28-Feb-2021)
Discarding device blocks: done
Creating filesystem with 262143488 4k blocks and 65536000 inodes
Filesystem UUID: a41687b4-0b9f-4144-a178-90bbeb213d4a
Superblock backups stored on blocks:
    32768, [...], 214990848

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


Important: /dev/sdb1 is the unused partition, which can be determined via lsblk.


Create mount point

The new hard disk must be mounted on the server. For this purpose, a folder can be created under /mnt, for example.

mkdir -p /mnt/data


Mount hard disk

The /etc/fstab file must be updated so that the hard disk is automatically recognized and mounted when the server is started. To do this, use the unique UUID of the hard disk instead of the insecure name.


Determine 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"


If you were able to determine the UUID, open the file /etc/fstab/ and add the following parameter:

nano /etc/fstab
# Secondary NVMe - 2 TB
UUID=23a61b22-9dda-48c8-b888-178191e4edaf /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 hard disk

The additional 2 TiB should now be displayed with the help of df -h:

df -h

# Output:
Filesystem Size Used 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 hard disk

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

Festplatten - Server Übersicht


Then confirm the removal with Remove hard disk.

Festplatte entfernen - Server


Please note that all data on the associated hard disk will be irrevocably removed.