AWS EBS 볼륨 추가후 mount 정리

Seung·2022년 4월 5일
0

AWS

목록 보기
7/7

1. EBS 볼륨 생성

2. 인스턴스에 생성한 EBS 볼륨 attach

3. 생성한 disk(xvdb) 확인

[ec2-user@ip-10-1-10-52 ~]$ lsblk
NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda    202:0    0   8G  0 disk 
└─xvda1 202:1    0   8G  0 part /
xvdb    202:16   0   8G  0 disk 

4. ext3로 디스크 포멧

[ec2-user@ip-10-1-10-52 ~]$ sudo mkfs -t ext3 /dev/xvdb
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
524288 inodes, 2097152 blocks
104857 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2147483648
64 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

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:  0/64
done 


5. mount할 디렉터리 생성

[ec2-user@ip-10-1-10-52 ~]$ sudo mkdir /mount-test

6. 생성한 EBS 볼륨 디스크와 mount (재부팅시, mount 풀림)

[ec2-user@ip-10-1-10-52 ~]$ sudo mount /dev/xvdb /mount-test

7. 마운트 상태 확인

[ec2-user@ip-10-1-10-52 ~]$ df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
devtmpfs       devtmpfs  474M     0  474M   0% /dev
tmpfs          tmpfs     483M     0  483M   0% /dev/shm
tmpfs          tmpfs     483M  408K  483M   1% /run
tmpfs          tmpfs     483M     0  483M   0% /sys/fs/cgroup
/dev/xvda1     xfs       8.0G  1.6G  6.5G  19% /
tmpfs          tmpfs      97M     0   97M   0% /run/user/1000
/dev/xvdb      ext3      7.8G   19M  7.4G   1% /mount-test
profile
인프라 마스터가 되고 싶어요

0개의 댓글