LoginSignup
0
0

More than 5 years have passed since last update.

Ec2インスタンスのディスク拡張

Posted at

awsのconsoleで色々やったあとにこんなエラー出ました。


[root@webdev01 ~]# resize2fs /dev/xvda1
resize2fs 1.42.12 (29-Aug-2014)
The filesystem is already 2096635 (4k) blocks long. Nothing to do!

実は解決方法非常に簡単下記コマンドを実行すればOK

[root@webdev01 ~]# growpart /dev/xvda 1
CHANGED: disk=/dev/xvda partition=1: start=4096 old: size=16773086,end=16777182 new: size=209711070,end=209715166

でresize2fs実行、正常に終了しました。

[root@webdev01 ~]# resize2fs /dev/xvda1
resize2fs 1.42.12 (29-Aug-2014)
Filesystem at /dev/xvda1 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 7
The filesystem on /dev/xvda1 is now 26213883 (4k) blocks long.

[root@webdev01 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 100G 0 disk
└─xvda1 202:1 0 100G 0 part /
[root@webdev01 ~]# df -h
ファイルシス サイズ 使用 残り 使用% マウント位置
devtmpfs 488M 56K 488M 1% /dev
tmpfs 498M 0 498M 0% /dev/shm
/dev/xvda1 99G 3.5G 95G 4% /

0
0
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
0