0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

EC2インスタンスのディスクを拡張する

Posted at

ボリュームをデタッチしてスナップショットを作成。

スナップショットからサイズを拡張したボリュームを作成。

他のインスタンスに作成したボリュームをアタッチ。

ボリュームのパーティションの終了位置を変更。

$ lsblk
$ sudo parted /dev/xvdf
(parted) unit s
(parted) print
(parted) rm 1
(parted) mkpart
パーティションの種類?  primary/プライマリ/extended/拡張? primary
ファイルシステムの種類?  [ext2]? ext3
開始? 16065s
終了? 100%
警告: The resulting partition is not properly aligned for best performance.
無視(I)/Ignore/取消(C)/Cancel? I
(parted) set 1 boot on
(parted) print
(parted) quit
$ lsblk

ボリュームをデタッチして元のインスタンスのルートデバイス(/dev/sda1など)にアタッチしてファイルシステムのサイズを変更

$ sudo resize2fs /dev/xvda1
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?