3

I understand the differences between instance storage and EBS.

However, if I used an m5d.4xlarge instance which is backed by nvme instance store and I also attach some EBS to it, which type of storage is used by default? Is there a process to determining which storage type gets used first?

TylerH
  • 20,799
  • 66
  • 75
  • 101
holly7016
  • 31
  • 1
  • What do you mean default? You are going to specify which one to use while configuring the application isn't it? These storages will be "mounts". The EBS is used for guest operating system. Based on aws blog post, "You don’t have to specify a block device mapping in your AMI or during the instance launch; the local storage will show up as one or more devices (/dev/nvme*1 on Linux) after the guest operating system has booted." – kosa Sep 28 '21 at 17:54
  • Instance store was is a system where OS images were loaded from S3 instead of AMIs. I haven't heard of anyone using instance store instances in at least 5 years. The instances with locally attached storage still boot from EBS. – jordanm Sep 28 '21 at 18:02
  • @kosa thanks for the clarification. I guess by default I meant to ask if the local storage device is utilized before the EBS ones. But per the blog post, it seems that when the devices are mounted by the operating, the devices are used in tandem. So during runtime, the application doesn't differentiate between the different devices? Is that accurate? Are you able to specify that you want to use a specific block device before other ones? Also curious if there is a time difference in how long it takes to mount instance storage vs ebs and if that has any effect on runtime. – holly7016 Sep 28 '21 at 19:57
  • "So during runtime, the application doesn't differentiate between the different devices? Is that accurate?" -- I think still something missing here. Let us say you are installing a caching software on this instance, during the installation you will specify which drive this software need to be installed. Then onwards, the application knows which mounted drive its data and config is. Regarding time, I am not sure, but my guess is, if your instance is healthy and running, the mounting is succesful. – kosa Sep 29 '21 at 15:37

1 Answers1

3

Each drive is mounted as a different device.

Using a Windows analogy, C: would be the Amazon EBS boot disk, while D: would be Instance Store. You choose the device-type by choosing which drive/mount point you want to use.

Amazon EC2 - Add Storage

In the days before Amazon EBS, the EC2 instances would boot from Instance Store. This meant it was not possible to 'Stop' the instance, since it would lose the boot disk. These days, instances boot from EBS volumes. However, any data kept on Instance Store will be lost when the instance is Stopped. It is great for temporary storage, caches or where the data is available elsewhere (eg can be reloaded from S3).

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470