- Print
- PDF
Using storage
- Print
- PDF
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
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.
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:
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
- 2. Partitioning disk
- 3. Formatting storage
- 4. Mounting storage
- 5. Maintaining mounting settings (fstab settings)
1. Checking storage status
To connect to the server and check the storage status, do the following:
- Connect to 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
fdisk -l
command to check that the disk/dev/xvdb
has been added.
2. Partitioning disk
To make disk partitioning settings, do the following:
- Enter the
fdisk /dev/xvdb
command. - Enter
n
in theCommand
prompt. - To create a primary type partition, enter
p
. To create an extended type partition, entere
. - Enter a number and sector for the partition to create.
- To mount the entire disk, enter the default values.
- Enter
w
in theCommand
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:
Enter the
mkdir /mnt/a
command to create the directory.- The mount point
/mnt/a
is created.
- The mount point
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.
- The storage is mounted on
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
- The
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:
The following is an example for the xvdb1
volume, and 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
xvdb1
volume.Example of volume information
/dev/xvdb1 /mnt/a ext4 defaults 1 2
Column Meaning Description /dev/xvdb1
Volume name Displays the name of the volume /mnt/a
Mount point Location where the volume is to be mounted ext4
File system type ext4
: Ubuntuxfs
: CentOS 7.x
defaults
Option defaults
: option with all the properties of auto, rw, nouser, exec, and suid optionsauto
: mount automatically when bootingnoauto
: do not automatically mount upon bootingrw
: mount with read and write supportro
: mount as read onlynouser
: permits mounting for root account onlyuser
: permits mounting for root and regular accountsexec
: permits file executionsuid
: permitsSetUID
andSetGID
nofail
: option to continue the booting process without pause even when the file system for mounting is unavailable for use
1
Dump settings 0
: file system where dump does not occur1
: file system where dump is available
2
fsck
settings0
:fsck
is not run upon booting1
: checks by prioritizing theroot
file system upon booting2
: checks by prioritizing file system other thanroot
upon booting
Enter the
:wq
command 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
Unmounting storage (Linux)
To unmount the storage mounted on the Linux server, do the following:
- Connect to 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/a
command.- The storage mounted on
/mnt/a
is 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/a
umount -f /mnt/a
- How to use the fuser command
- Use
fuser -cu /mnt/a
to check the user or the process using the directory - Use
fuser -ck /mnt/a
to force-end the process - Use
umount /mnt/a
to perform unmounting
- Use
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:
- Connect to 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.
- Click
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.
- Alternatively, you can enter
- 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:
- On the disk list, find the disk indicated as Unallocated, right-click on the disk name, and click New Simple Volume.
- Click the [Next] button.
- 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 the [Finish] button.
- 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.
Unmounting storage volume (Windows)
To disconnect the registered storage volume on the Windows server, do the following:
- Connect to the Windows server.
- For more information on how to connect to the server, see Access Windows server.
- Click
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.
- 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.
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.