LoginSignup
0
1

More than 5 years have passed since last update.

aws ec2の容量を変えてみた

Posted at

背景

ec2の容量が足りたいので、増やしたい。

ハマったこと

aws consoleでEBSを増やすだけだと増やした容量を反映されないです。

8Gから20Gにしても

Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        3.9G   56K  3.9G   1% /dev
tmpfs           3.9G     0  3.9G   0% /dev/shm
/dev/xvda1      7.8G  3.5G  4.2G  46% /

解決

[~]$lsblk
NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda    202:0    0   20G  0 disk
└─xvda1 202:1    0   8G  0 part /

# Expand the modified partition
[~]$sudo growpart /dev/xvda 1

# resize the file system to the new volume capacity.
[~]$sudo resize2fs /dev/xvda1

[~]$lsblk
NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda    202:0    0  20G  0 disk
└─xvda1 202:1    0  20G  0 part /

参照

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1