Abhijit Srivastava
Abhijit Srivastava

Reputation: 1459

EBS volume shows no mount point

UseCase: Launch an AWS cloud9 environment that has added EBS of 500GB. This environment will be extensively used to build and publish dockers by developers.


So I did start an m.5.large instance-based environment and attached an EBS volume of 500GB.

Attachment information: i-00xxxxxxb53 (aws-cloud9-dev-6f2xxxx3bda8c):/dev/sdf

This is my total storage and I do not see 500GB volume.

enter image description here

On digging further, it looks like the EBS volume is attached but not at the correct mount point.

enter image description here

EC2 EBS configuration

enter image description here


Question: What should be the next step in order to use this EBS volume?

Question: What should be done in order to make use attached EBS for docker building?

Question: What should be the most efficient instance type for docker building?

Upvotes: 3

Views: 1361

Answers (2)

anitek
anitek

Reputation: 46

  1. Tyoe df -hT here you will find the Filesystem type of root if it is xfs or ext4
  2. If say root (/) is xfs, run the following command for the 500 GiB Volume $ mkfs -t xfs /dev/nvme1n1 If root (/) is ext4, $ mkfs -t ext4 /dev/nvme1n1
  3. Create a directory in root say named mount $ mkdir /mount
  4. Now mount the 500 GiB Volume to /mount $ mount /dev/nvme1n1 /mount
  5. Now it will be mounted and can viewed in df -hT
  6. Also make sure to update the /etc/fstab so mount remains stable if there is a reboot
  7. To update first find UUID if 500 GiB EBS Volume $ blkid /dev/nvme1n1 Note down the UUID from the output
  8. Now go to /etc/fstab using editor of your choice $ vi /etc/fstab
  9. There must be an entry already for /, update for mount and save the file, (note replace xfs with ext4 if filesytem is ext4) UUID=<Add_UUID_here_without_""> /mount xfs defaults 0 0
  10. Now finally run mount command $ mount -a

Upvotes: 2

Marcin
Marcin

Reputation: 238189

Generally, if its new EBS volume you have to format it manually and then mount it, also manually. From docs:

After you attach an Amazon EBS volume to your instance, it is exposed as a block device. You can format the volume with any file system and then mount it.

The instruction for doing this in the link above.

Upvotes: 1

Related Questions