๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

TIL/ETC

[AWS] EC2 ๋””์Šคํฌ ์šฉ๋Ÿ‰ ๋Š˜๋ฆฌ๊ธฐ

AWS EC2 ์„œ๋ฒ„๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๋ฐ์ดํ„ฐ ๋ถ„์„์„ ํ•˜๋‹ค๊ฐ€ ๋Œ€์šฉ๋Ÿ‰์˜ ํŒŒ์ผ์„ ์ €์žฅํ•˜๋‹ค๊ฐ€ ๋””์Šคํฌ ์šฉ๋Ÿ‰์ด ๋ถ€์กฑํ•˜๋‹ค๋Š” ์—๋Ÿฌ๊ฐ€ ๋‚ฌ๋‹ค.

1. EC2 > Instances > Instance ์„ ํƒ

2. Storge > Volumne ID ํด๋ฆญ > ์šฐํด๋ฆญ > Modify volume

3. Size ์ˆ˜์ •

4. ๋งˆ์šดํŠธ

lsblk

๋ฃจํŠธ์—๋Š” ์•„์ง 128G๊ฐ€ ์ ์šฉ๋˜์ง€ ์•Š์•˜๋‹ค.

Volumne state์—์„œ ์„ค์ •ํ•œ ๋ณผ๋ฅจ์ด modifying์ด ์™„๋ฃŒ๋˜๋ฉด ์•„๋ž˜๋ฅผ ์ˆ˜ํ–‰ํ•œ๋‹ค.

sudo growpart /dev/xvda1 1
lsblk

์ ์šฉ์ด ๋˜์—ˆ๋‹ค.

5. ๋ฆฌ๋ˆ…์Šค ํŒŒ์ผ ์‹œ์Šคํ…œ์— ํ™•์žฅ

sudo resize2fs /dev/root

6.์ฐธ๊ณ  ๋งํฌ

https://leonkim.dev/aws/ce2-increase-disk-space/

https://lsjsj92.tistory.com/551