Setting storage
    • PDF

    Setting storage

    • PDF

    Article Summary

    Available in VPC

    This guide describes how to connect or disconnect to/from a server, as well as how to set up storage size expansion or termination protection.

    Connecting to server

    This section explains how to connect additional storage to a server.

    Note
    • To connect 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 connect only encrypted additional storage.
      • KVM-based g3 Micro servers do not support the storage encryption function.
      • 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 connect only non-encrypted additional storage.

    To connect a storage to the server, do the following:

    1. Click the environment you are using in the Region menu and Platform menu of NAVER Cloud Platform console.
    2. Click the Services > Compute > Server menus, in that order.
    3. Click the Storage menu.
    4. Select the storage you want to connect to a server from the storage list, and then click [Set storage] > Connect to server, in that order.
      • Only storages with the Available status can be connected to a server.
    5. From the Select applied server on the pop-up window, select the server to connect, and then click the [Yes] button.

    Disconnecting from server

    Before you proceed with deleting or transferring storage, disconnect the connection between the server and the storage. You can't delete storages connected to servers. You can migrate storage by removing connection from the current server and connecting it to a different server.

    Note

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

    To disconnect a storage from the server, do the following:

    1. Unmount the storage volume from the server.

      Note

      In the case of a storage connected to the Linux server, delete the mounting information of the storage from /etc/fstab of the connected server after unmounting the storage.

    2. Click the environment you are using in the Region menu and Platform menu of NAVER Cloud Platform console.

    3. Click the Services > Compute > Server menus, in that order.

    4. Click the Storage menu.

    5. Select the storage to disconnect from the storage list and click [Set storage] > Remove from server, in that order.

    6. Check the details in the confirmation pop-up window and click the [Yes] button.

      • The storage is disconnected from the server, and the storage status shows Available.
    Note
    • If you fail to remove it from the Windows server and encounter the Retry pop-up window, proceed with the following:
      1. Enter diskmgmt.msc in the Run window and click the [OK] button.
      2. Find the disk to delete, right-click on the disk name, and click Properties.
      3. In the Properties pop-up window, check the Target Id displayed in Location.
      4. Enter devmgmt.msc in the Run window and click the [OK] button.
      5. On the disk drive list, find the disk with the same Target Id.
        • You can check the Target Id on the Properties pop-up. To open the Properties pop-up, find the disk, right-click on the disk name, and click Properties.
      6. Click and hold on the disk name and then right-click on the mouse. Click Uninstall device.
      7. After 20-30 seconds, try disconnecting the storage from server again on NAVER Cloud Platform console.
    • If the problem persists, it means that the OS is unable to disengage the disk properly. In this case, stop or restart the server.

    Changing 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 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
    • As for KVM-based hypervisor, you can change the storage size for both default disks and additional disks.
    • You can't change the size of the storage that is connected to a server in operation. Stop the server that the storage is connected to or remove the storage before expanding.
    • Storage size can only be expanded and cannot be reduced.
    • For CB1 and SSD, expanding the disk size also changes the IOPS value proportionally.
    • 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 NAVER Cloud Platform console, do the following:

    1. Click the environment you are using in the Region menu and Platform menu of NAVER Cloud Platform console.
    2. Click the Services > Compute > Server menus, in that order.
    3. Click the Storage menu.
    4. From the storage list, select the storage to expand, and click [Storage settings] > Change storage, in that order.
    5. Enter the new size in the Storage size item on the Change storage pop-up window, and then click the OK button.
      • 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, do the following:

    Expanding default disk partition and file system (Linux)

    To expand the default partition and file system, do the following: The following is an example for storage /dev/vda.

    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 storage /dev/vda.

      • Check the partition name of the / file system. In this example, the description is based on the /dev/vda2 storage.
    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.
      growpart /dev/vda 2
      
      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
        
      • Ubuntu 20.04
        apt-get update
        
        apt-get install cloud-guest-utils
        
    5. Enter the lsblk command to check the status of partition expansion.

    6. From the commands shown below, enter a command appropriate for the file system that you are using, and change the size of the file system.

      • ext4
        resize2fs /dev/vda2
        
      • xfs
        xfs_growfs /dev/vda2
        
    7. 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, do the following: The following is an example for storage /dev/xvdb1.

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

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

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

      e2fsck -f /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 /dev/xvdb1
        
    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, do the following:

    1. Connect to the Windows server.
    2. Click i-server_window_start and then click the Windows Administrative Tools > Computer Management > Disk Management menus, in that 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 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 the [Next] button.
    5. Enter the space to expand and click the [Next] button.
    6. Check the settings and click the [Finish] button.
      • The disk volume is expanded.

    Setting termination protection

    You can set termination protection to prevent your storage from being terminated by accident. The following describes how to change the termination protection settings.

    1. Click the environment you are using in the Region menu and Platform menu of NAVER Cloud Platform console.
    2. Click the Services > Compute > Server menus, in that order.
    3. Click the Storage menu.
    4. Select the storage from the storage list, and click [Set storage] > Set storage termination protection.
    5. Check the details in the confirmation pop-up window and click the [Yes] button.
      • If the current termination protection status is Enabled, the function will be disabled, and if it is Disabled, the setting is applied.

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.