Using storage
    • PDF

    Using storage

    • PDF

    Article Summary

    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

    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.

    Mounting 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 following assumes that the disk name is /dev/xvdb.

    1. Checking storage status

    To connect to the server and check the storage status, do the following:

    1. Connect to 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 fdisk -l command to check that the disk /dev/xvdb has been added.

    2. Partitioning disk

    To make disk partitioning settings, do the following:

    1. Enter the fdisk /dev/xvdb 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 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.

    3. Formatting storage

    To set the file system to the partition, do the following:
    From the following commands, enter the applicable one for the image of the server to mount to format the partition.

    • CentOS 7.x: mkfs.xfs /dev/xvdb1
    • Rocky Linux 8.x: mkfs.xfs /dev/xvdb1
    • Ubuntu: mkfs.ext4 /dev/xvdb1
    • If the disk is encrypted: mkfs.xfs /dev/mapper/crypt_sd[파티션명]

    4. Mounting storage

    To mount a storage, do the following:

    1. Enter the mkdir /mnt/a command to create the directory.

      • The mount point /mnt/a is created.
    2. Enter the mount /dev/xvdb1 /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 -k command to check if the mount is completed properly.

      • The /dev/xvdb1 mount directory is displayed on the file system list.
      Filesystem      Inodes IUsed   IFree IUse% Mounted on
      /dev/vda2      4718080 74947 4643133    2% /
      /dev/vda1       524288   333  523955    1% /boot
      /dev/xvdb1       49984     3   49981    1% /mnt/a
      

    5. Maintaining mounting 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, do the following:

    Note

    The following is an example for the xvdb1 volume, and 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 xvdb1 volume.

      • Example of volume information

        /dev/xvdb1      /mnt/a      ext4        defaults        1       2
        
        ColumnMeaningDescription
        /dev/xvdb1Volume nameDisplays the name of the volume
        /mnt/aMount pointLocation where the volume is to be mounted
        ext4File system type
        • ext4: Ubuntu
        • xfs: CentOS 7.x
        defaultsOption
        • defaults: option with all the properties of auto, rw, nouser, exec, and suid options
        • auto: mount automatically when booting
        • noauto: do not automatically mount upon booting
        • rw: mount with read and write support
        • ro: mount as read only
        • nouser: permits mounting for root account only
        • user: permits mounting for root and regular accounts
        • exec: permits file execution
        • suid: permits SetUID and SetGID
        • nofail: option to continue the booting process without pause even when the file system for mounting is unavailable for use
        1Dump settings
        • 0: file system where dump does not occur
        • 1: file system where dump is available
        2fsck settings
        • 0: fsck is not run upon booting
        • 1: checks by prioritizing the root file system upon booting
        • 2: checks by prioritizing file system other than root upon booting
    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

    Unmounting storage (Linux)

    To unmount the storage mounted on the Linux server, do the following:

    1. Connect to 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 command
      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

    Registering 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. Reset disk

    To reset a disk, do the following:

    1. Connect to the Windows server to which to register the added storage as a volume.
    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 Reset disk pop-up, select the disk to add, select Mater Boot Record (MBR), and click [OK].
      • The disk is reset.
      • If no pop-up 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, do the following:

    1. On the disk list, find the disk indicated as Unallocated, right-click on the disk name, and click New Simple Volume.
    2. Click the [Next] button.
    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 the [Finish] button.
      • 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.

    Unmounting storage volume (Windows)

    To disconnect the registered storage volume on 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 Offline.
      • The disk is disconnected from the server, and the partition status shows Offline.

    Connecting 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 then proceed with the storage mounting task. For more information on how to connect to the server, see Connect to server.

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


    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.