GridVids
Sign in with YouTube

AWS Cloud | Instance Store | Shell Script to Detect Ephemeral Disks

Mark watched
Don't Miss
Hide
Open in popup Open on YouTube

Yogesh Mehta 9 years ago

An Instance store provides block level storage to the ec2 Instances. The storage is available as physical disks attached to the physical server hosting the EC2 instance. This storage comes free with EC2 instance and have high performance for sequential reads and writes without any network overhead. This instance storage is temporary storage (Ephemeral) , data will be lost when :

- Shutdown the instance. - Instance boots on different hardware. With AWS when you power off/on the server , it might come online on same hardware or different. End user can't control the physical host selection, unless reserved instances.

At time of writing this script, from AWS there is no way/scripts from AWS support to identify the ephemeral volumes attached to an EC2 instance.

There might be scenarios where you want to bootstrap the use of ephemeral device in LVM or direct mount on your Linux EC2 instance. also another issue sometimes ephemeral volumes are identified as xvd* and with new nvm* technology they are named as nvme* , so it becomes difficult to script the disk detection.

Also AWS EC2 metadata is not consistent; we are checking the disks visible to the OS and disks appearing in the Instance attachments. Ephemeral disks are not populated in EC2 instance description. then the delta INSTANCE - OS disks is taken as EPH disks.

Watch the video for more details.