Set storage

Prev Next

The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.

Available in VPC

Learn how to attach or detach storage to a server, and how to configure storage size expansion or return protection.

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 attach 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 into 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.

Attach to server

Learn how to attach the added storage to a server.

Note
  • To attach storage to a server, the hypervisor type of the server and storage must be the same.
  • For servers with the encrypted default storage applied, you can attach only encrypted additional storage.
    • KVM-based 3g servers do not support the encryption feature.
    • If the storage encryption feature is enabled on CentOS 7.3 and CentOS 7.8 servers, you can add only the storage with encryption applied through Server > [Manage servers and change settings] > Create storage.
  • For servers with the non-encrypted default storage applied, you can attach only non-encrypted additional storage.

To attach a storage that is not connected to a server:

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to i_menu > Services > Compute > Server.
  2. Click the Storage menu.
  3. Select the storage you want to attach to a server from the storage list, and navigate to [Set storage] > Attach to server.
    • Only storages with the Available status can be attached to a server.
  4. From the Select applied server on the popup window, select the server to attach, and click [Yes].

Detach from server

Before you proceed with deleting or transferring storage, detach the connection between the server and the storage. You can't delete storages attached to servers. You can transfer storage by detaching it from one server and reattaching it to another.

Note

You can't detach the default storage made when the server is created.

To detach a storage from the server:

  1. Detach the storage volume from the server.

    Note

    For storage previously attached to a Linux server, unmount the storage and delete its mount information from /etc/fstab on the server.

  2. In the VPC environment of the NAVER Cloud Platform console, navigate to i_menu > Services > Compute > Server.

  3. Click the Storage menu.

  4. Select the storage to detach from the storage list and navigate to [Set storage] > Detach from server.

  5. Check the details in the confirmation popup window and click [Yes].

    • The storage is detached from the server, and the storage status shows Available.
Note
  • If you fail to detach it from the Windows server and encounter the Retry popup window, proceed with the following:
    1. Enter diskmgmt.msc on the run command window and click [OK].
    2. Find the disk to delete, right-click on the disk name, and click Properties.
    3. In the Properties popup window, check the Target Id displayed in Location.
    4. Enter devmgmt.msc on the run command window and click [OK].
    5. On the disk drive list, find the disk with the same Target Id.
      • You can check the Target Id on the Properties popup window. To open the Properties popup window, find the disk, right-click on the disk name, and click Properties.
    6. Click and hold on the disk name and right-click on the mouse. Click Uninstall device.
    7. After 20-30 seconds, try detaching the server again from the NAVER Cloud Platform console.
  • If the issue is not resolved using the above method, it means the disk was not properly detached from the OS. In this case, stop or restart the server.

Change storage

You can change the size of the storage in use. It is applied to the server when you expand the storage size and change the partition and the file system according to the server system on the NAVER Cloud Platform console.

Caution

When you change the partition and the file system after expanding the size of a storage, data loss in the storage may occur. To prevent data loss, create a snapshot before you expand the size of a storage. For more information on how to create a snapshot, see Create snapshot from storage.

Note
  • For KVM-based storage, both default and additional disks can be resized.
    • Default storage: The size of default storage attached to a running server cannot be changed. Stop the server that has the storage attached before resizing.
    • Additional storage: Expansion is possible even when the mounted server is running.
  • Storage size can only be expanded and cannot be reduced.
  • For CB1, CB2, and SSD, IOPS values increase in proportion to disk size when capacity is expanded.
  • Whether to expand the storage varies depending on the type of the connected server or the type of the storage. To check whether to expand the storage, see Resizability in Storage details.

Expanding storage file size

To expand the storage size on the NAVER Cloud Platform console:

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to i_menu > Services > Compute > Server.
  2. Click the Storage menu.
  3. From the storage list, select the storage to expand, and navigate to [Storage settings] > Change storage.
  4. Enter the new size in the Storage size item on the Change storage popup window, and click [OK].
    • The storage size is changed. To use the changed storage, proceed with expanding partition and file system (Linux/Windows).

Expanding partition and file system (Linux)

To expand the partition and the file system on the Linux server:

Expanding default disk partition and file system (Linux)

To expand the default partition and file system: The description is based on the /dev/vda storage:

Note
  • You can change the default disk size in the KVM-based storage environment.
  • You can see the storage name in Connection information in the storage details.
  1. Connect to the Linux server.
  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 the status of /dev/vda storage.
    • Check the partition name of the / file system. In this example, the description is based on the /dev/vda2 partition.
  4. Enter the growpart command to expand the partition.
  • There is a blank between the storage name and the partition number due to the growpart [스토리지] [파티션 번호] command, so be careful when entering.
```bash
growpart /dev/vda 2
```

:::(Info) (Note)

If the `growpart` command is not properly executed, enter the following command to install the right package for the operating system:  
  * NAVIX 9, Rocky 9
    ```bash
    dnf install cloud-utils-growpart
    ```
* CentOS 7.x, Rocky 8.x  
    ```bash
    yum install cloud-utils-growpart
    ```
* Ubuntu 20.04  
    ```bash
    apt-get update

    apt-get install cloud-guest-utils
    ```

:::
  1. Enter the lsblk command to check the status of partition expansion.
  2. From the following commands, enter a command appropriate for the file system that you are using, and change the size of the file system:
    • ext4
      resize2fs /dev/vda2
      
    • Enter the mount point for xfs_growfs
      xfs_growfs /
      
  3. Enter the df -h command to check if the partition and file system expansion completed successfully.

Expanding additional disk partition and file system (Linux)

To expand the additional disk partition and file system on the Linux server: The description is based on the /dev/xvdb1 storage:

  1. Connect to the Linux server.

  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 the status of /dev/xvdb1 storage.

    • If you are unable to see the status of /dev/xvdb1 storage after executing the command, check if the storage is attached to the server.
  4. Enter the following command to unmount the /dev/xvdb1 storage:

    • Although the growpart command can be run without unmounting the storage as preparation for running the growpart command, it is best to unmount the storage or back up the snapshot first to prevent data loss.
    umount /dev/xvdb1
    
  5. Enter the growpart command to expand the partition.

    • Unmount the storage or back up the snapshot first to prevent data loss due to using the growpart command.
    • There is a blank between the storage name and the partition number due to the growpart [스토리지] [파티션 번호] command, so be careful when entering.
    growpart /dev/xvdb 1
    
    Note

    If the growpart command is not properly executed, enter the following command to install the right package for the operating system:

    • CentOS 7.x, Rocky 8.x
      yum install cloud-utils-growpart
      
    • NAVIX 9 , Rocky 9
      dnf install cloud-utils-growpart
      
    • Ubuntu 18.04, Ubuntu 20.04
      apt-get update
      
      apt-get install cloud-guest-utils
      
  6. Enter the lsblk command to check the status of partition expansion.

  7. Enter the following command to check the file system status of the partition:

    • CentOS 7.x, Rocky Linux 8.x
    e2fsck -f /dev/xvdb1
    
    • NAVIX 9, Rocky Linux 9
    xfs_repair /dev/xvdb1
    
  8. From the following commands, enter the applicable one for the file system in use to mount the file system and expand its size:

    • ext4
      mount /dev/xvdb1 /data
      
      resize2fs /dev/xvdb1
      
    • xfs
      mount /dev/xvdb1 /data
      
      xfs_growfs /data
      
  9. Enter the df -h command to check if the expansion and the mount are completed properly.

Expanding partition and file system (Windows)

To expand the partition and file system from the Windows server:

  1. Connect to the Windows server.
  2. After clicking i-server_window_start, navigate to Windows administrative tools > Computer management > Disk management.
    • 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 Extend Volume.
    • If the storage size has been successfully expanded on the console, the applicable disk shows the added size as Unallocated along with the expandable partition.
  4. Click [Next].
  5. Enter the space to expand and click [Next].
  6. Check the settings and click [Finish].
    • The disk volume is expanded.

Set return protection

You can set return protection to prevent your storage from being returned by accident. To change the return protection settings:

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to i_menu > Services > Compute > Server.
  2. Click the Storage menu.
  3. Select the storage from the storage list, and navigate to [Set storage] > Set storage return protection.
  4. Check the details in the confirmation popup window and click [Yes].
    • If the current return protection status is Enabled, the setting is disabled, and if it is Disabled, the setting is applied.