Create storage with snapshot

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

You can create storages by using snapshots to recover saved data.
First create storage in the console, and access the server to mount storage. For detailed instructions for each OS, see the following guides:

Caution

You can create storage with the snapshot only when the operating system of the server the source storage of the snapshot is connected to is the same as that of the server you want to create storage of.

1. Create storage from console

First, use a snapshot to create storage from the console.
To create the storage using a snapshot, follow these steps:

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to i_menu > Services > Compute > Server.
  2. Click the Snapshot menu.
  3. On the snapshot list, select the snapshot you want to create storage with, and click the [Create storage] button.
  4. From the Create storage popup window, set the information of the storage to be created, and click the [Create] button.
    • Snapshot information: displays selected snapshot's information
    • Storage name: it must start with an English letter. Enter between 3-30 characters using uppercase and lowercase English letters, numbers, hyphens (-), and underscores (_)
      • If you don't enter anything, the storage name is automatically created.
    • Zone: select the zone to place the storage
    • Storage type: select the type you want according to the purpose of use
      • KVM-base storage: select CB1/2 for small data accessed frequently or FB1/2 for storing large data accessed infrequently
      • XEN-base storage: select SSD for high I/O performance or HDD for general services
    • Select server (XEN only): select the server to which you want to connect the storage
    • Size: enter the storage size within the displayed range for KVM-based snapshots
      • You can't change the storage size for XEN-based snapshots.
    • Max IOPS and Apply encryption to storage values are automatically applied, and you can't change the values
    • Storage return protection (KVM only): select whether to protect storage from being returned
  5. After checking the setup information, click the [OK] button.
    • Storage is created. You can check the created storage from the Storage menu.

2. Set server (Linux)

To add storage created from a snapshot to a Linux server, see the following guides:

1. Check storage identifier and file system type
2. Change storage identifier
3. Mount storage

1. Check storage identifier and file system type

Check storage identifier and file system type.

  1. Access the Linux server to which storage is connected.
  2. Check the storage identifier and file system type created by snapshot through the blkid command.
    • The storage identifier is displayed as the UUID value.
    • The file system type is displayed as the TYPE value.
  3. According to the result of the previous step, proceed with the following steps:

2. Change storage identifier

If the identifier of the storage in the original server is the same as the identifier of the created storage, the storage cannot be mounted in the following cases:

  • Creating a snapshot in one of the existing storages of the server to which storages were added
  • Creating a snapshot from the basic boot storage of another server

If applicable, you need to first change the identifier of the created storage.
Proceed with the task according to the file system type checked in 1. Check storage identifier and file system type.

xfs file system type

To change the identifier of a storage using the xfs file system, follow these steps. The description is based on the xvdb1 storage:

Caution

/dev/xvda (XEN only) or /dev/vda (KVM only) is the device file name of the basic boot storage, so do not change the identifier. If you change the identifier of the basic boot storage, the server may not be able to boot.

  1. Enter the xfs_repair -L /dev/xvdb1 command.
    • The storage identifier of xvdb1 is deleted.
  2. Enter the xfs_admin -U generate /dev/xvdb1 command.
    • A new identifier is created for the xvdb1 storage.
  3. Check if it is changed into a new identifier by the blkid command.

ext4 file system type

To change the identifier of a storage using the ext4 file system, follow these steps. The description is based on the xvdb1 storage:

Caution

/dev/xvda (XEN only) or /dev/vda (KVM only) is the device file name of the basic boot storage, so do not change the identifier. If you change the identifier of the basic boot storage, the server may not be able to boot.

  1. Enter the tune2fs -U "UUID" /dev/xvdb1 or tune2fs -U random /dev/xvdb1 command.
  2. Enter the desired storage identifier into the "UUID" location and run it.
    • You can create a new UUID by entering the uuidgen command.
  3. The random option sets UUID to a random value of random.
  4. Check if it is changed into a new identifier by the blkid command.
    If UUID is changed by the tune2fs command after creating and allocating snapshots and storage for default boot storage with the ext4 file system type while the server is running, the following error may occur.
    • For the booting disk, create the snapshot when the server is stopped to prevent data loss issues.
# tune2fs /dev/xvdb1 -U random
This operation requires a freshly checked filesystem.
Please run e2fsck -f on the filesystem.

Perform the following procedures in the relevant cases:

  1. Check storage device status
# file -s /dev/xvdb1

Check if the phrase "needs journal recovery" is output in the command execution result value.
If the phrase is output, it means that the file system is damaged. Conduct the file system inspection and recovery with the following commands:

  1. Conduct the file system inspection and recovery
# e2fsck -f /dev/xvdb1 -y
  1. Conduct the storage identifier change task
# tune2fs /dev/xvdb1 -U random

3. Mount storage

See Mount storage to mount the created storage.

Note

Since the storage data is read and recovered from the snapshot, skip the disk partition and storage format tasks.

2. Set server (Windows)

To add the storage created by the snapshot to the Windows server, set the storage status to online.
To set the storage status online on the Windows server, follow these steps:

  1. Access the Windows server to which storage is connected.
  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. Find the disk marked with Offline from the disk list, right-click the button, and click Online.
    • You can now use the storage.
Note

Since the storage data is read and recovered from the snapshot, skip the disk partition and storage format tasks.