블록스토리지

[ 리눅스 서버 ] 블록스토리지 이용가이드

iwinv는 SSD와 SATA 타입의 블록 스토리지를 제공하며 관리자는 이를 서버에 추가하여 사용할수 있습니다.

블록 스토리지 서버는 RAID로 구성되어있어 OS 영역 공간보다 더 안전하며 중요한 데이터가 유실되지 않도록 서버에 블록 스토리지를 추가할 것을 권장합니다.

 

블록 스토리지는 서버당 3대까지 추가가 가능하며 타입에 따라 지원되는 용량이 다르니 자세한 내용은 아래를 참고해주시기 바랍니다.

 

 

블록 스토리지 사양

 

 

서버별 블록 스토리지 경로

관리콘솔 (console.iwinv.kr)  - 서버 - 가상서버 - Disk - 디스크 관리

바로가기 : https://console.iwinv.kr/volume/ (가상서버 블록 스토리지)

바로가기 : https://console.iwinv.kr/disk/ (베어메탈 서버 블록 스토리지)

 

 

 

 

블록 스토리지 추가하기


 

 

1. 로그인 후 관리콘솔에서 '스토리지 - 스토리지 관리 - 블록 스토리지 추가하기'를 클릭합니다.

 

 

 

2. 블록 스토리지를 추가할 서버를 선택하고, 이름, 종류, 용량, 설명을 입력한 후 '신청하기' 버튼을 클릭합니다.

 

서버 : 블록 스토리지를 사용할 서버 선택

이름 : 블록 스토리지 이름 입력

종류 : SSD(Solid State Drive) Block, SATA Block x4 Hard Raid

용량 : SSD(10G ~ 2,000G), SATA(50G ~ 20,000G)입력 가능 (최초 생성 후 용량 변경은 불가능)

비용 : SSD : 10G당 / 월 1,600원, SATA : 10G당 / 월 300원

설명 : 블록 스토리지에 대한 간단한 메모를 입력

 

 

 

3. 잠시 기다리시면 블록 스토리지가 생성된 것을 확인하실 수 있습니다.

 

 

 

 

서버에서 추가된 블록 스토리지 설정하기


 

블록 스토리지를 추가한 후 사용하려면 서버에서 별도의 설정이 필요하며 아래의 내용을 참고하여 진행합니다.

 

 

1. 서버에서 블록 스토리지 장착 여부 확인 

[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. 블록 스토리지 파티션 설정

[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. 블록 스토리지 디스크 포맷

[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. 블록스토리지 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 

 

 

7. 시스템 리부팅 (시스템 리부팅후 마운트가 잘 되는지 확인하는것이며 꼭 할 필요는 없습니다.)

[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. 다시 접속 후 파티션 확인

[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 (마운트가 성공적으로 완료)

 

 

 

블록 스토리지 ATTACH / DETATCH


 

추가한 블록 스토리지를 ATTACH (장착), DETATCH (해제) 할 수 있습니다.

 

우선 위에서 추가한 블록스토리지를 DETATCH (해제)를 사용하여 해제 해보겠습니다.

 

 

1. DETATCH 할 블록 스토리지를 선택하고 화면에서 '블록 스토리지 Attach/Detach' 를 클릭합니다.

 

 

2. 아래 화면에서 'Detach' 를 선택 한 후 '블록 스토리지 수정' 을 클릭합니다.

 

 

3. Detach 가 진행됩니다. '확인' 버튼을 클릭합니다.

 

 

4. 블록 스토리지 관리에서 정상적으로 Detach 된 것을 확인할수 있습니다.

 

 

Attach는 Detach와 반대로 해제된 블록 스토리지를 선택하여 이용할 서버에 연결해 주시면 됩니다.