블록스토리지

블록 스토리지 관리

이용자는 블록 스토리지를 이용하여 서버에 저장 볼륨을 확장할 수 있습니다.

서버에 블록 스토리지 타입별로 생성한 볼륨을 최대 3개씩 마운트 할 수 있습니다.
*베어메탈 서버는 SSD 타입의 블록스토리지 연결만 제공합니다. 

블록 스토리지는 애플리케이션을 실핼 할 수 있는 성능과 중요 데이터를 보관할 수 있는 안정성을 제공합니다.
따라서 이용자는 블록 스토리지를 추가해 사용하는 것을 권장합니다.
 

 

 


블록 스토리지 볼륨의 지원 범위는 아래 표와 같습니다.
아래 웹 콘솔(Console.iwinv.kr) 링크에서 서버 별로 블록 스토리지를 추가,삭제,변경,서버 지정할 수 있습니다. 
 
 

 

 

블록 스토리지 추가하기


  

1. 웹 콘솔(Console.iwinv.kr)에서 스토리지 관리 페이지를 열어 [블록 스토리지 추가하기] 버튼을 클릭합니다.
참고로 생성한 서버가 없을 경우 블록 스토리지를 신청 할 수 없습니다.

 

2. 서버를 1대 이상 생성해 운영 중이라면 블록 스토리지를 추가 할 수 있습니다.
서버, 이름, 종류, 용량, 비용, 설명 관련 정보를 입력 후 [신청하기] 버튼을 클릭합니다. 

blockstorage3

서버 : 마운트 할 서버를 선택 

이름 : 블록 스토리지의 이름 입렵 

종류 : 블록 스토리지 타입(SSD or SATA) 선택 

용량 : 증설 용량을 10GB 단위로 입력 (SSD 10GB ~ 2,000GB / SATA 50GB ~ 20,000GB)

비용 : 증설 용량에 따른 이용 요금 출력 

설명 : 생성된 블록 스토리지를 관리할 수 있는 메모 기능

 

 

3. [신청하기] 버튼 클릭하면 생성 작업이 진행되고 곧 다음과 같이 성공적으로 블록 스토리지가 서버에 추가된 것을 확인 할 수있습니다.

 

 

 

 

서버에 블록 스토리지 마운트 하기 


  

블록 스토리지 추가 후 이를 사용하려면 다음과 같은 서버에 설정 작업이 필요합니다. 

  

1. CLI(Command Line Interface) 콘솔에서 'fdisk -l' 명령으로 서버에 블록 스토리지가 추가되었는지 확인을 합니다.

[root@iwinvhelper-2196 ~]# fdisk -l (입력)

  

# OS 디스크

Disk /dev/vda: 26.8 GB, 26843545600 bytes
139 heads, 8 sectors/track, 47148 cylinders
Units = cylinders of 1112 * 512 = 569344 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00002127

 

Device Boot Start End Blocks Id System
/dev/vda1 2 47149 26213376 83 Linux

 

# 블록스토리지 디스크

Disk /dev/vdb: 10.7 GB, 10737418240 bytes
16 heads, 63 sectors/track, 20805 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

 

 

2. 'fdisk/dev/vdb' 입력 후 다음과 같이 블록 스토리지 파티션을 설정합니다.

[root@iwinvhelper-2196 ~]# fdisk /dev/vdb (입력)
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x49b42461.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): n (입력)
Command action
e extended
p primary partition (1-4)
p (입력)
Partition number (1-4): 1 (입력)
First cylinder (1-20805, default 1): (엔터입력)
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-20805, default 20805): (엔터입력)
Using default value 20805

Command (m for help): wq (입력)
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@iwinvhelper-2196 ~]#

   

3. 'mkfs.ext4/dev/vdb1'을 입력해 블록 스토리지 디스크를 포맷합니다. 

[root@iwinvhelper-2196 ~]# mkfs.ext4 /dev/vdb1 (입력)
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2621422 blocks
131071 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2684354560
80 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@iwinvhelper-2196 ~]#

 

 

4. 'blkid'를 입력해 블록 스토리지 UUID를 확인합니다.

[root@iwinvhelper-2196 ~]# blkid (입력)
/dev/vda1: UUID="8328eca5-aa6e-4820-80d9-373ed1627d7c" TYPE="ext4"
/dev/vdb1: UUID="fd68aff1-0dd4-42d2-8ef9-6d6dd1814df1" TYPE="ext4"

 

 

5. 다음과 같이 블록 스토리지를 마운트합니다.

[root@iwinvhelper-2196 ~]# mount UUID="fd68aff1-0dd4-42d2-8ef9-6d6dd1814df1" /mnt (입력)

 

 

6. /etc/fstab 에 파티션을 추가합니다. 

UUID=8328eca5-aa6e-4820-80d9-373ed1627d7c / ext4 defaults 1 1
UUID=fd68aff1-0dd4-42d2-8ef9-6d6dd1814df1 /mnt ext4 defaults,nofail 0 2 (라인추가)
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0

 

 

7. 'reboot'명령으로 시스템을 재부팅합니다. 이 과정은 시스템 재부팅 후에도 볼륨 스토리지 마운트에 이상이 없는지 확인하기 위해 진행하는 것으로 반드시 실행할 필요는 없습니다. 

[root@iwinvhelper-2196 mnt]# reboot (입력)

Broadcast message from root@iwinvhelper-2196
(/dev/pts/1) at 19:59 ...

The system is going down for reboot NOW!

 

 

8. 재부팅 후 관리자로 접속해 'df-Th' 명령으로 파티션을 확인합니다. 

[root@iwinvhelper-2196 ~]# df -Th (입력)
Filesystem Type Size Used Avail Use% Mounted on
/dev/vda1 ext4 25G 643M 23G 3% /
tmpfs tmpfs 250M 0 250M 0% /dev/shm
/dev/vdb1 ext4 9.8G 23M 9.2G 1% /mnt (마운트가 성공적으로 완료)

 

 

 

 

블록 스토리지 제거하기 


 

 웹 콘솔(Console.iwinv.kr)에서 스토리지 관리 페이지를 열어 생성한 블록 스토리지 추가(Attach) 및 제거(Detatch) 할 수 있습니다
 예제를 통해 블록 스토리지 제거 후 서버와의 연결을 해제하는 과정을 살펴보겠습니다.  
   

 

 

1. 제거할 블록 스토리지를 선택한 후 [블록스토리지 Attach / Detach] 버튼을 클릭합니다. 

blockstorage6-1

 

 

2. 블록스토리지 추가와 제거 화면에서 'Detach'를 선택한 다음 [블록 스토리지 수정] 버튼을 클릭합니다. 

blockstorage7

 

  

3. 블록 스토리지 제거 진행에 대한 다음과 같은 안내문이 나오면 [확인] 버튼을 클릭합니다.

blockstorage8

 

 

 

4. 웹 콘솔(Console.iwinv.kr)에서 스토리지 관리 페이지를 열어 블록 스토리지가 정상적으로 제거되었는지 확인할 수 있습니다. 

blockstorage9-1

다음으로 서버와 연결이 해제된 블록 스토리지를  제거하고 확인하는 방법을 알아보겠습니다.
다음과 같이 3개의 블록 스토리지를 서버에 연결해 사용하고 있는 상황을 가정하겠습니다.  

  

[root@iwinvhelper-303 ~]# fdisk -l

 

# OS 리눅스

Disk /dev/vda: 26.8 GB, 26843545600 bytes
139 heads, 8 sectors/track, 47148 cylinders
Units = cylinders of 1112 * 512 = 569344 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000594e0

Device Boot Start End Blocks Id System
/dev/vda1 2 47149 26213376 83 Linux

 

# 블록스토리지1

Disk /dev/vdb: 10.7 GB, 10737418240 bytes
16 heads, 63 sectors/track, 20805 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xed87bffb

Device Boot Start End Blocks Id System
/dev/vdb1 1 20805 10485688+ 83 Linux

 

# 블록스토리지2

Disk /dev/vdc: 10.7 GB, 10737418240 bytes
16 heads, 63 sectors/track, 20805 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xed87bffb

Device Boot Start End Blocks Id System
/dev/vdc1 1 20805 10485688+ 83 Linux

 

# 블록스토리지3

Disk /dev/vdd: 21.5 GB, 21474836480 bytes
16 heads, 63 sectors/track, 41610 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xed87bffb

Device Boot Start End Blocks Id System
/dev/vdd1 1 20805 10485688+ 83 Linux
/dev/vdd2 20806 41610 10485720 83 Linux

 

 

1. 웹 콘솔(Console.iwinv.kr)에서 서버 관리 페이지에서 특정 블록 스토리지를 2개를 삭제합니다. 
 

block-delete1

 

 

2. CLI(Comman Line interface) 콘솔에서 'fdisk -l' 명령으로 서버에 블록 스토리지 2와 3이 제거되었는지 확인합니다. 

[root@iwinvhelper-303 mnt1]# fdisk -l (입력)

 

# OS 리눅스

Disk /dev/vda: 26.8 GB, 26843545600 bytes
139 heads, 8 sectors/track, 47148 cylinders
Units = cylinders of 1112 * 512 = 569344 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000594e0

Device Boot Start End Blocks Id System
/dev/vda1 2 47149 26213376 83 Linux

 

# 블록스토리지 1

Disk /dev/vdb: 10.7 GB, 10737418240 bytes
16 heads, 63 sectors/track, 20805 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xed87bffb

Device Boot Start End Blocks Id System
/dev/vdb1 1 20805 10485688+ 83 Linux

 

 

3. 블록 스토리지 제거를 확인한 후 'umount' 명령으로 마운트를 해제합니다. 

[root@iwinvhelper-303 mnt1]# df -Th (입력)
Filesystem Type Size Used Avail Use% Mounted on
/dev/vda1 ext4 25G 687M 23G 3% /
tmpfs tmpfs 246M 0 246M 0% /dev/shm
/dev/vdb1 ext4 9.8G 23M 9.2G 1% /mnt
/dev/vdc1 ext4 9.8G 23M 9.2G 1% /mnt1 (제거됨)
/dev/vdd1 ext4 9.8G 23M 9.2G 1% /mnt2 (제거됨)

 

[root@iwinvhelper-303 mnt1]# cd /mnt1 (입력)
[root@iwinvhelper-303 mnt1]# ll (입력)
ls: reading directory .: Input/output error (제거된 블록스토리지에서 ll 명령어를 입력하면 IO 에러가 발생합니다.)
total 0

 

# 마운트 제거

[root@iwinvhelper-303 /]# umount /dev/vdc1 (입력)

[root@iwinvhelper-303 /]# umount /dev/vdd1 (입력)

 

  

4. 다음으로 '/etc/fstab' 파일을 수정합니다. 다음과 같이 2개 라인을 삭제한 다음 저장합니다.

UUID=ad11bafe-de2c-4d3f-be13-51dd0ef0d819 / ext4 defaults 1 1
UUID=dc9dce12-d89c-40a4-8261-8bd2c0ed7bc7  /mnt  ext4 defaults,nofail 0 2 
UUID=d1a3cf37-a838-4cbb-a4b6-895c540f421c  /mnt1 ext4 defaults 0 1  (라인제거)
UUID=d73a2cf2-2488-42d1-b737-86cfa5559702 /mnt2 ext4 defaults 0 1  (라인제거)
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0

   

서버에 다수의 블록 스토리지를 마운트 할 경우 웹 콘솔(Console.iwinv.kr)에서 보이는 블록 스토리지와
OS에서 실제로 사용하는 블록 스토리지 경로를 파악하기 어려울 수 있습니다.

따라서 웹 콘솔 '설명' 기능을 이용하여 OS에서 실제로 마운트된 경로를 입력하고 관리하는 것을 권장합니다.  

 

block-delete2

 

 

NOTE

디스크 추가 한 후 실제 서버에서 마운트 명령어를 입력해야 정상적으로 사용할수 있습니다.

디스크는 사용하지 않더라도 사용료는 부과되며 디스크의 비용을 부담하고 싶지 않다면 블록 스토리지를 삭제 해야 합니다.  

오토스케일에서 추가디스크를 이용하면 시간요금제, 가상서버에서 사용하면 일간요금제가 적용됩니다.