How To Grow EBS Volumes on AWS

Published Date Author: , Posted June 27th, 2014 at 9:29:02pm

PROCEDURE FOR NON-ROOT FILESYSTEMS:

  • Run the df command and record the device path for the mount point you wish to grow.
  • Unmount the filesystem to insure consistency.
  • Detach the volume from the instance.
  • Create a snapshot of the unmounted filesystem.
  • Create a volume from the snapshot, specifying a larger size in the new volume form.
  • Attach the new volume to the same device path.
  • Mount the filesystem.
  • For XFS: sudo xfs_growfs -d /{mount_point}
  • For EXT[2,3,4]: sudo resize2fs /dev/xvdN

HOUSEKEEPING WHEN EVERYTHING IS TESTED AND WORKING:

  • Delete the snapshot.
  • Delete the old volume.

FULL LIST OF PROCEDURES, INCLUDING ROOT FILESYSTEMS:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.