How To Allow AWS IAM Users EBS Snapshot Create And Delete Access

Author: , July 29th, 2021

SUMMARY: Needed to create an AWS IAM Policy to allow a user access to create and delete EBS snapshots. This script also needed to be able to list volumes:

How To Expand an NVMe EBS Volumes After a Disk Resize on Amazon Linux

Author: , February 19th, 2021

First, use lsblk to see the raw partitions:

Note how the partition at 259:1 is only 20GB, while the entire disk at 259:0 is 40GB. A partition resize is required in this case.

For an EXT4 filesystem, use the resize2fs command instead:

For more information, please visit the AMW Docs: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html

How To Eject a Volume from the Terminal Command Line in MacOSX

Author: , December 8th, 2015

As always, YMMV…

How To Resize an ext3 Filesystem

Author: , August 31st, 2014

I had to replace an ailing root volume on AWS, so I decided to double the size when I created the new volume from snapshot. After booting, I realized that df still showed the old filesystem size of 10GB, not the new size of 20GB Here is the solution: resize2fs /dev/xvda1

How To Grow EBS Volumes on AWS

Author: , June 27th, 2014

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. […]

How To Change the Volume on MacOSX in Small Increments

Author: , July 7th, 2012

To change the volume in smaller increments on MacOSX Snow Leopard, hold down Shift-Option when pressing either the Volume-Up or the Volume-Down keys. You should see the volume indicator show a fractional portion of the normal scale selected:

How To Migrate MySQL To A New Volume On CentOS

Author: , October 26th, 2011

Stop MySQL and move the existing database files to the EBS volume.

Use the bind option to the mount command in the /etc/fstab file to direct MySQL to the correct files, then restart:

How To Create An XFS Formatted Filesystem On AWS EC2

Author: , October 26th, 2011

First, use the AWS management console to create and attach a new volume. Note the device name, in our example /dev/sdf.

You now have a 10 GB (or whatever size you specified) EBS volume mounted under /data with an XFS file system, and it will be automatically mounted if the instance reboots.