+
Available in VPC
To use an added storage, you need to mount the storage or register the storage to the server as a volume. The following describes how to mount the storage to the Linux server and how to register the storage volume to the Windows server.
To enhance service reliability, redundancy between zones is recommended.
- Block storage redundancy: block storage is configured on a per-zone basis. Set up redundancy between server and block storage zones to ensure continuity of service without interruption in the event of unexpected storage malfunctions or scheduled change task within a specific zone. See Load Balancer overview to set up server redundancy, create block storage in each zone, and connect respective block storage to the servers in each zone to enhance stability.
- Server redundancy: NAVER Cloud Platform provides a high availability (HA) structure to prepare for failures in the physical server, such as memory, CPU, and power supply.
HA is a policy for preventing hardware failures from expanding to the virtual machine (VM) server. It supports live migration, which automatically migrates the VM on the host server to another secure host server when a failure occurs in the aforementioned host server.
However, the VM server is rebooted when an error occurs where Live Migration cannot be initiated. If the service is being operated with a single VM server, it is recommended that you also set up multiplexing for VM servers in order to reduce the frequency of failures that may occur as a result of rebooting the VM server.
Before you perform storage mounting or storage volume registering, connect the added storage to the server. For more information on how to connect to the server, see Connect to server
Mount storage (Linux)
To use the added storage, you need to mount the storage on the Linux server. To mount an added storage, proceed with the following steps in order.
- You can see the disk name in Connection information in Storage details.
- The first additional storage is typically named /dev/xvdb on XEN hypervisor and /dev/vdb on KVM hypervisor. This guide uses /dev/vdb as an example disk name.
- 1. Check storage status
- 2. Disk partition
- 3. Storage format
- 4. Mount storage
- 5. Mount information retention settings (fstab settings)
1. Check storage status
To access the server and check the storage status, follow these steps:
- Access the Linux server on which to mount the added storage.
- For more information on how to connect to the server, see Access Linux server
- Enter the
su -command and enter the password one more time.- You are logged in with the root permission.
- Enter the
lsblkcommand to check that the/dev/vdbdisk has been added.
2. Disk partition
- MBR partition (also known as MS-DOS or DOS partitions) have a maximum size of 2 TB. To configure more than 2 TB, you must use a GPT partition (GUID Partition Table). On XEN hypervisor, the maximum additional storage size is 2 TB while on KVM hypervisor, it is 16 TB.
- For detailed usage of the fdisk/parted commands, refer to the official documentation provided by the OS vendor.
Changing the partition type (MBR partition ↔ GPT partition) requires recreating the partition, so it can only be done after deleting the data and the existing partition.
Even if using 2 TB or less on XEN hypervisor or KVM hypervisor, using GPT partition is recommended.
To partition a disk using an MBR partition of 2 TB or less, follow these steps:
- Enter the
fdisk /dev/vdbcommand. - Enter
nin theCommandprompt. - To create a primary type partition, enter
p. To create an extended type partition, entere. - Enter a number and sector component for the partition to create.
- To mount the entire disk, enter the default values.
- Enter
win theCommandprompt.- The partition settings are applied.
To partition a disk using a GPT partition of more than 2 TB, follow these steps:
- Enter the
parted /dev/vdbcommand. - Enter
mklabel gptat the parted commands prompt. - Enter
mkpart primary 0% 100%at the (parted) commands prompt to mount the entire disk. - Enter the following commands to divide the disk into 2 partitions with 40% and 60%.
(parted) mkpart primary 0% 40% (parted) mkpart secondary 40% 100% (parted) print Number Start End Size File system Name Flags 1 1049kB 1288GB 1288GB primary 2 1288GB 3221GB 1933GB secondary - Enter
quitat the (parted) commands prompt.- The partition settings are applied.
3. Storage format
To set the file system to the partition, follow these steps:
From the following commands, enter the applicable one for the image of the server to mount to format the partition.
- NAVIX, CentOS, Rocky Linux :
mkfs.xfs /dev/vdb1 - Ubuntu:
mkfs.ext4 /dev/vdb1 - If the disk is encrypted:
mkfs.xfs /dev/mapper/crypt_sd[파티션명]
4. Mount storage
To mount a storage, follow these steps:
- Enter the
mkdir /mnt/acommand to create the directory.- The mount point
/mnt/ais created.
- The mount point
- Enter the
mount /dev/vdb1 /mnt/acommand to connect the storage and the directory.- The storage is mounted on
/mnt/a. You can now use the storage.
- The storage is mounted on
- Enter the
df -hcommand to check if the mount is completed properly.- The
/dev/vdb1mount directory is displayed on the file system list.
Filesystem Size Used Avail Use% Mounted on /dev/vda2 9.0G 3.5G 5.6G 39% / /dev/vda1 1014M 260M 755M 26% /boot /dev/vdb1 10G 104M 9.9G 2% /mnt/a - The
5. Mount information retention settings (fstab settings)
To maintain the mounting settings after the Linux server is booted, you need to change the volume settings in /etc/fstab. /etc/fstab is the path that stores the volume information to be mounted in the booting stage. To change the volume settings to maintain the storage mounting information after booting, follow these steps:
The following is an example for the vdb1 volume, and it also explains how to change other volume settings.
- Enter the following command to open the volume information configuration file.
vi /etc/fstab - See the following table to add the settings of the
vdb1volume.- Examples of volume information
/dev/vdb1 /mnt/a ext4 defaults 1 2Column Meaning Description /dev/vdb1Volume name /mnt/aMount point ext4File system type defaultsOption 1Dump settings 2fscksetting
- Examples of volume information
- Enter the
:wqcommand to end the editor.
If the nofail option exists, the storage is booted properly even when the following errors occur:
- When the mounting information is wrong, such as unnecessary quotation marks in UUID or mistyping of "default"
- When no file system exists for mounting or the file system is damaged
Unmount storage (Linux)
To unmount the storage mounted on the Linux server, follow these steps:
- Access the Linux server from which to unmount the storage.
- For more information on how to connect to the server, see Access Linux server
- Enter the
umount /mnt/acommand.- The storage mounted on
/mnt/ais unmounted.
- The storage mounted on
If unmounting does not proceed properly, you need to check and end the processes running in certain files, file systems, ports, and so on by using the force unmount commands or the fuser command.
- Force unmount commands
umount -l /mnt/aumount -f /mnt/a
- How to use the fuser commands
- Use
fuser -cu /mnt/ato check the user or the process using the directory - Use
fuser -ck /mnt/ato force-end the process - Use
umount /mnt/ato perform unmounting
- Use
Register storage volume (Windows)
To use an added storage, you need to register the storage as a volume to the Windows server. To register an added storage as a volume, proceed with the following steps in order.
1. Initialize disk
To initialize a disk, follow these steps:
- Access the Windows server to which to register the added storage as a volume.
- For more information on how to connect to the server, see Access Windows server
- After clicking
, click Windows administrative tools > Computer management > Disk management in order.
- Alternatively, you can enter
diskmgmt.mscon the run command window.
- Alternatively, you can enter
- On the Initialize disk popup window, select the disk to add, select Mater Boot Record (MBR), and click [OK].
- The disk is initialized.
- If no popup window appears, find the disk indicated as Not initialized on the disk list, right-click on the disk name, and click Initialize disk.
2. Create and format volume
To create and format the storage volume to the server, follow these steps:
- On the disk list, find the disk indicated as Unallocated, right-click on the disk name, and click New simple volume.
- Click [Next].
- Enter the volume size and click [Next].
- Select the drive letter to allocate and click [Next].
- Set the partition format and click [Next].
- Check the settings and click [Finish].
- Once formatting is completed and the disk status shows normal, the storage is ready for use.
To check if volume registration has succeeded, open File Explorer, click This PC, and check the hard disk drive list.
Unmount storage volume (Windows)
To disconnect the registered storage volume on the Windows server, follow these steps:
- Access the Windows server.
- For more information on how to connect to the server, see Access Windows server
- After clicking
, click Windows administrative tools > Computer management > Disk management in order.
- Alternatively, you can enter
diskmgmt.mscon the run command window.
- Alternatively, you can enter
- On the list that appears, find the partition to expand, right-click on the partition name, and click Offline.
- The disk is disconnected from the server, and the partition status shows Offline.
Connect to server
To set up and use storage after you create a storage, you must connect the storage to a server. Connect storage to a server, and proceed with the storage mounting task. For more information on how to connect to the server, see Connect to server
Disconnect from server
Before you delete a storage, you must disconnect it from the server. Likewise, when you transfer storage to another server, disconnect it from the server first. For more information on how to disconnect from the server, see Disconnect from server