3

In my EC2 instance, that is attached to a volume EBS of 100GB, I run this command:

[ec2-user ~]$ lsblk

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvda    202:0    0  100G  0 disk
└─xvda1 202:1    0    8G  0 part /

Here is the file /etc/fstab:

UUID=ue9a1ccd-a7dd-77f8-8be8-08573456abctkv       /   ext4    defaults       1       1

I want to understand: why only the volume of 8GB has a mount point ? Also, is the fact of mounting a volume on root '/', means that all the content of root is being stored on EBS volume?

Souad
  • 4,856
  • 15
  • 80
  • 140
  • 1
    In your EC2 instance, there are 2 volumes attached. xvda1 is your root volume. For additional volumes, you need to attach it manually (or use user data to automate). Documentation can be found here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html – krishna_mee2004 Jul 18 '17 at 14:39
  • No, only one volume is attached. @KrishnaKumarR – Souad Jul 18 '17 at 14:41
  • @Somar BOTH volumes are attached (because you see them in `lsblk`) but only xvda1 mounted. As Krishna Kumar said, it should be mounted - either manually or using 'user data' – Putnik Jul 18 '17 at 16:52
  • @Putnik I'm confused. This instance only has one volume attached. Not TWO volumes. where does the volume of 8Go come from? – Souad Jul 19 '17 at 07:01
  • This is what I have `Root device: /dev/xvda --- Block devices: /dev/xvda` – Souad Jul 19 '17 at 07:08
  • At your quote both me and Krishna Kumar see two volumes: 1) xvdf 100G unmounted and 2) xvda 8G with its partition xvda1 mounted to '/'. Could you please be more clear in the question? Are you sure you aren't confused with 'attached vs mounted' and/or 'drive/volume vs partition'? – Putnik Jul 20 '17 at 10:06
  • @Putnik I'm so sorry!!! I edited the quote. I was showing the wrong mapping. Please forgive. – Souad Jul 20 '17 at 10:23
  • Then the second volume is not attached. Make sure you've attached it to the same instance you're ssh-ing in. – Putnik Jul 20 '17 at 19:09

1 Answers1

3

I want to understand: why only the volume of 8GB has a mount point ?

Because additional volumes are not formatted/mounted by default. AWS does not know whether you'd like to have ext4 or NTFS or something else as well as which mount point you'd like to have.

Also, is the fact of mounting a volume on root '/', means that all the content of root is being stored on EBS volume?

Yes if you have EBS-backed instance (unlike so-called instance-backed instances) and if you do not have other volumes mounted (not to be confused with 'attached')

p.s. as far as I see, you initially had created 8GB volume then resized it via AWS console to 100GB. Pls note you resized the EBS volume (xvda) but did not resize the partition (xvda1). AWS will not resize it automatically by the same reason: it doesn't know how you're going to use the extra space.

Putnik
  • 5,925
  • 7
  • 38
  • 58