Questions and Answers — VDSina

External drives

What are external disks and how to work with them?

06.05.2022 18:44 Employee Misha Updated 17.11.2023 10:30 no comments yet
06.05.2022 18:44
Answers to the question — 1
Employee Misha

With the help of external disks, you can expand the disk space on your server, which you rent from our company.
They are highly reliable, allow you to quickly scale the size of the connected disk and are available as high-performance NVMe or traditional HDD storage.

To order the service, go to the "My Servers" section in the control panel, open the properties of your server and order the service in the "External disks" tab.

 

vneshnie-diski-1.png

 

vneshnie-diski-2.png

 

After activating the service, connect the disk to the specified server.

 

vneshnie-diski-3.png

 

Let's look at the process of connecting to a server on Linux and Windows.

Attention! To avoid data loss, we strongly recommend that you create a backup copy before performing this operation!

 

Windows

1. Log in to your server via remote desktop and press the Win+R keyboard shortcut. Next, enter the diskmgmt.msc command and click Ok.

 

vneshnie-diski-4.png

 

2. You will see the disk management interface, select a network drive and right-click to set it to the "Online" status.

 

vneshnie-diski-5.png

 

3. At the next stage, initialize the disk in the same way.

 

vneshnie-diski-6.png

 

vneshnie-diski-7.png

 

4. All that remains is to right-click on the zone that is not allocated and create a simple volume. After that, the disk is ready to work.

 

vneshnie-diski-8.png

 

vneshnie-diski-9.png

 

You can expand the external drive you ordered at any time. To do this, in the "External Drives" tab, click on its name and enter new parameters. After that, you need to open the disk manager (see point 1) and expand the disk size in a standard way.

 

Linux

1. First, check the names of the volumes on the server. The main external drive will be marked as /dev/vdb (additional, if available, as /dev/vdc, /dev/vdd...). Use the lsblk command to check the name of the external storage. This example shows a 10 GB volume available as /dev/vdb.

 

vneshnie-diski-10.png

 

2. Create a new disk label using the parted command

 

parted -s /dev/vdb mklabel gpt

 

parted -s /dev/vdb unit mib mkpart primary 0% 100%

 

3. Create an EXT4 file system on a new partition, format it and add a mount point.

 

mkfs.ext4 /dev/vdb1

 

mkdir /mnt/blockstorage

 

4. Add a line to the /etc/fstab file to automatically mount the external disk when rebooting

 

echo >> /etc/fstab
echo /dev/vdb1 /mnt/blockstorage ext4 defaults,noatime,nofail 0 0 >> /etc/fstab 

 

You can mount on the fly.

 

mount /mnt/blockstorage

 

You can check the success of the connection using the df command. The whole process is shown in the screenshot below.

vneshnie-diski-11.png

 

You can expand the volume of the ordered external disk at any time. To do this, in the "External Drives" tab, click on its name and enter new parameters. After that, you need to perform the extension in the OS itself.

1. Unmount the previously connected external disk.

 

umount /mnt/blockstorage

 

2. Using the lsblk command, we check our sections. The example below shows a 10 GB partition as /dev/vdb1. Note that the connection point is empty because it was unmounted earlier.

 

vneshnie-diski-12.png

 

3. Expand the partition to fill all available storage space, according to the instructions, taking into account the name of our disk.

 

Important! If in the future you decide to disconnect the external storage from the Linux server, then you need to remove all references to this volume from the /etc/fstab file.

Updated 18 February, at 12:24 06.05.2022 19:15

To answer you need to register or log in.
Close the window
Authentication
2FA verification
Close the window
Sign up
A password will be sent to the specified email address
Close the window
Password Reminder
Close the window
Password Reminder
Close the window
Password Reminder
Exit