Using storage

Prev Next

+

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.

Note

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.
Note

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.

Note
  • 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

To access the server and check the storage status, follow these steps:

  1. Access the Linux server on which to mount the added storage.
  2. Enter the su - command and enter the password one more time.
    • You are logged in with the root permission.
  3. Enter the lsblk command to check that the /dev/vdb disk has been added.

2. Disk partition

Note
  • 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.
Caution

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:

  1. Enter the fdisk /dev/vdb command.
  2. Enter n in the Command prompt.
  3. To create a primary type partition, enter p. To create an extended type partition, enter e.
  4. Enter a number and sector component for the partition to create.
    • To mount the entire disk, enter the default values.
  5. Enter w in the Command prompt.
    • The partition settings are applied.

To partition a disk using a GPT partition of more than 2 TB, follow these steps:

  1. Enter the parted /dev/vdb command.
  2. Enter mklabel gpt at the parted commands prompt.
  3. Enter mkpart primary 0% 100% at the (parted) commands prompt to mount the entire disk.
  4. 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
    
  5. Enter quit at 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:

  1. Enter the mkdir /mnt/a command to create the directory.
    • The mount point /mnt/a is created.
  2. Enter the mount /dev/vdb1 /mnt/a command to connect the storage and the directory.
    • The storage is mounted on /mnt/a. You can now use the storage.
  3. Enter the df -h command to check if the mount is completed properly.
    • The /dev/vdb1 mount 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
    

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:

Note

The following is an example for the vdb1 volume, and it also explains how to change other volume settings.

  1. Enter the following command to open the volume information configuration file.
    vi  /etc/fstab
    
  2. See the following table to add the settings of the vdb1 volume.
    • Examples of volume information
      /dev/vdb1      /mnt/a      ext4        defaults        1       2
      
      Column Meaning Description
      /dev/vdb1 Volume name
      /mnt/a Mount point
      ext4 File system type
      defaults Option
      1 Dump settings
      2 fsck setting
  3. Enter the :wq command to end the editor.
Note

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:

  1. Access the Linux server from which to unmount the storage.
  2. Enter the umount /mnt/a command.
    • The storage mounted on /mnt/a is unmounted.
Note

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/a
    • umount -f /mnt/a
  • How to use the fuser commands
    1. Use fuser -cu /mnt/a to check the user or the process using the directory
    2. Use fuser -ck /mnt/a to force-end the process
    3. Use umount /mnt/a to perform unmounting

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:

  1. Access the Windows server to which to register the added storage as a volume.
  2. After clicking i-server_window_start, click Windows administrative tools > Computer management > Disk management in order.
    • Alternatively, you can enter diskmgmt.msc on the run command window.
  3. 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:

  1. On the disk list, find the disk indicated as Unallocated, right-click on the disk name, and click New simple volume.
  2. Click [Next].
  3. Enter the volume size and click [Next].
  4. Select the drive letter to allocate and click [Next].
  5. Set the partition format and click [Next].
  6. Check the settings and click [Finish].
    • Once formatting is completed and the disk status shows normal, the storage is ready for use.
Note

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:

  1. Access the Windows server.
  2. After clicking i-server_window_start, click Windows administrative tools > Computer management > Disk management in order.
    • Alternatively, you can enter diskmgmt.msc on the run command window.
  3. 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