1. EC2 --> ELASTIC BLOCK STORE/Volumes 에서 볼륨을 생성한다.

:  디스크아이디:vol-0bdb9fc0, 디스크네임: USS.DSK_DEV.D1

:  디스크아이디:vol-c9e4a002, 디스크네임: USS.DSK_DEV.D2

2. 해당 디스크 볼륨을 클릭해서 컨텍스 메뉴에서 "Attach Volume"를 선택해서 생성된 EC2인스턴스를 선택해준다.

: USS.DSK_DEV.D1 --> i-c3fdd31f (APP.DEV.1):/dev/sdf (attached)

: USS.DSK_DEV.D2 --> i-c3fdd31f (APP.DEV.1):/dev/sdg (attaching)


3. 해당 인스턴스로 들어가서 디스크를 마운트한다.

: AWS에서 작업한것으로 아직 디스크를 사용할 준비가 되어있지 않다. 이를 위해서 SSH로 해당 인스턴스에 로그인하여 작업해줘야한다.

3-1 다음은 디스크를 생성하기전의 상태이다.

root@appdev1:~$ df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/xvda1      7.8G  1.4G  6.4G  18% /

devtmpfs        7.4G   56K  7.4G   1% /dev

tmpfs           7.4G     0  7.4G   0% /dev/shm



3-2 다음 명령(fdisk -l)를 실행보면 사용가능(마운트 가능한)한 디시크를 볼수 있다. ( /dev/xvdf, /dev/xvdg --> 앞에 x가 붙은것은 실제디스크가 심볼릭 링크로 연결되어 있기 때문이다.)


root@appdev1:~# fdisk -l

WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/xvda: 8589 MB, 8589934592 bytes, 16777216 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: gpt

#         Start          End    Size  Type            Name

1         4096     16777182      8G  Linux filesyste Linux

128         2048         4095      1M  BIOS boot parti BIOS Boot Partition

Disk /dev/xvdf: 85.9 GB, 85899345920 bytes, 167772160 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/xvdg: 85.9 GB, 85899345920 bytes, 167772160 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes




3-3 다음명령을 통해 각각의 디스크를 포맷한다.

root@appdev1:~# mke2fs -F -t ext4 /dev/xvdf

mke2fs 1.42.12 (29-Aug-2014)

Creating filesystem with 20971520 4k blocks and 5242880 inodes

Filesystem UUID: e6f2d4f1-9ceb-4531-bab8-0f59c3865a14

Superblock backups stored on blocks: 

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 

4096000, 7962624, 11239424, 20480000

Allocating group tables: done                            

Writing inode tables: done                            

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done   

root@appdev1:~# mke2fs -F -t ext4 /dev/xvdg

mke2fs 1.42.12 (29-Aug-2014)

Creating filesystem with 20971520 4k blocks and 5242880 inodes

Filesystem UUID: fa2ddd46-64e4-4095-bbab-1f0808fb4748

Superblock backups stored on blocks: 

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 

4096000, 7962624, 11239424, 20480000

Allocating group tables: done                            

Writing inode tables: done                            

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done   



3-4 마운트할 디렉토리를 생성한다.

root@appdev1:~# cd /local

root@appdev1:/local# mkdir programs

root@appdev1:/local# mkdir application


3-5 생성된 디렉토리로 두개의 디시크를 마운트한다.

mount /dev/xvdf /local/programs

mount /dev/xvdg /local/application



4. 마운트가 정상적으로 잘 생성되었는지 확인한다.


root@appdev1:~# df -l

Filesystem     1K-blocks    Used Available Use% Mounted on

/dev/xvda1       8123812 1386976   6636588  18% /

devtmpfs         7693200      64   7693136   1% /dev

tmpfs            7702400       0   7702400   0% /dev/shm

/dev/xvdf       82438832   57088  78171056   1% /local/programs

/dev/xvdg       82438832   57088  78171056   1% /local/application



5. 인스턴스가 재 부팅후에도 마운트 설정이 남도록 하기위하여 /etc/fstab파일에 다음과 같이 추가해준다.

vi /etc/fstab

/dev/xvdf   /local/programs     ext4  defaults  0   0

/dev/xvdg   /local/application  ext4  defaults  0   0


Posted by Steven J.S Min
,