Amazon Elastic Block Store Interview Questions (2022)
What is Amazon Elastic Block Store (EBS)?
What is a block storage volume?
What are the various types of EBS volumes?
What is Amazon Machine Images (AMI) in AWS?
What is EBS block device?
What is the maximum size of an EBS storage device?
How to allow an EBS volume available with no downtime and attach it to an EC2 instance when the EBS volume fails?
How to list information about AWS volumes?
How to attaching external disk to aws cluster kubernetes?
Q: What is Amazon Elastic Block Store (EBS)?
Amazon Elastic Block Store offers raw block-level storage that could be attached to Amazon EC2 instances which is used by Amazon Relational Database Service. Amazon EBS offers a variety of storage performance and cost options.
Amazon EBS is like a cloud-based hard drive that gives persistent block storage volumes to be used with Amazon EC2 instances.
Q: What is a block storage volume?
A block storage volume operates in the same way that a hard drive does. It can be used to store any type of file or even to install an entire operating system.
EBS volumes are placed in an availability zone and automatically replicated to protect data loss in the event of a single component failure.
However, because they are only replicated across a single availability zone, you may lose data if the entire availability zone fails, which is extremely unlikely.
Take a look at our suggested post on AWS :
Q: What are the various types of EBS volumes?
There are five types of EBS volumes available as below:
General Purpose SSD (gp2)SSD (Solid State Drive) is the volume with which EC2 chooses as the root volume of your instance by default. For small input/output operations, SSD is many times faster than HDD (Hard Disk Drive). It gives a balance between price and performance (measured in IOPS - Input-Output Operations per second).
Provisioned IOPS SSD (io1)This is the most expensive and fastest EBS volume. They are intended for I/O-intensive applications like large Relational or NoSQL databases.
Throughput Optimized HDD (st1)These are low-cost magnetic storage volumes whose performance is measured in terms of throughput.
Cold HDD (sc1)These are even less expensive magnetic storage options than Throughput Optimized. They are intended for large, sequential cold workloads, such as those found on a file server.
Magnetic (standard)These are older generation magnetic drives that are best suited for workloads with infrequent data access.
Q: What is Amazon Machine Images (AMI) in AWS?
An Amazon Machine Image (AMI) contains all of the information needed to launch an instance. When you launch an instance, you must specify an AMI.
Q: What is EBS block device?
A block device mapping specifies which block devices (instance store volumes and EBS volumes) should be associated with an instance. When creating an AMI, you can specify a block device mapping will be used by all instances launched from the AMI.
Q: What is the maximum size of an EBS storage device?
The maximum volume size supported by EBS at the moment is 16 TiB. This implies how you can create an EBS volume with a capacity of up to 16 TiB, but whether the OS recognises all of that capacity is dependent on the OS's own design characteristics and how the volume is partitioned.
Q: How to allow an EBS volume available with no downtime and attach it to an EC2 instance when
the EBS volume fails?
You can add a load balancer and auto scaling, which will allow an EBS volume available with no downtime , and if the ec2 instance goes down due to autoscaling, a new instance will be created, and you can add commands to map to the EBS in the shell script. And when the EBS volume fails, we can take regular backups and replace the EBS with the most recent backup or snapshot if it fails.
Q: How to list information about AWS volumes?
You can use below command to list information about AWS volumes
aws ec2 describe-volumes --query "Volumes[*].Tags[?Key=='Name'].Value"
Q: How to attaching external disk to aws cluster kubernetes?
- volumeID: This is the identifier for the AWS volume that will be used.
Obtain the volume ID assigned to our instance using the AWS CLI.
aws ec2 describe-volumes
- If the pod creation with the volume attached was successful (the state of the ebs volume will change
from "available" to "in-use" in the AWS console), we could simply run
kubectl describe podand it should appear in Volumes with a VolumeID similar to what you have in AWS.
apiVersion: "v1" kind: "PersistentVolume" metadata: name: "pv0001" spec: capacity: storage: "5Gi" accessModes: - "ReadWriteOnce" awsElasticBlockStore: fsType: "ext4" volumeID: "vol-f37a03aa"