質問

Good afternoon,

I am new to EC2 and have been trying to mount an EBS volume on an EC2 instance. Following the instructions at this StackOverflow question I did the following:

1.  Format file system /dev/xvdf (Ubuntu's internal name for this particular device number):

  sudo mkfs.ext4 /dev/xvdf

2.  Mount file system (with update to /etc/fstab so it stays mounted on reboot):

  sudo mkdir -m 000 /vol
  echo "/dev/xvdf /vol auto noatime 0 0" | sudo tee -a /etc/fstab
  sudo mount /vol

There now appears to be a folder (or volume) at /vol but it has been (prepopulated?) with a folder entitled lost+found, and does not have the 15GB that I assigned to the EBS volume (it has something much smaller).

Any help you could provide would be appreciated. Thanks!

UPDATE 1

After following the first suggestion (sudo mount /dev/xvdf /vol), here is the output of df:

Filesystem     1K-blocks   Used Available Use% Mounted on
/dev/xvda1       8256952 791440   7046084  11% /
udev              294216      8    294208   1% /dev
tmpfs             120876    164    120712   1% /run
none                5120      0      5120   0% /run/lock
none              302188      0    302188   0% /run/shm
/dev/xvdf       15481840 169456  14525952   2% /vol

This might indicate that I do in fact have the 15GB on /vol . However I still do have that strange lost+found folder in there. Anything I should be worried about?

役に立ちましたか?

解決

Nothing is wrong with your /vol. It was mounted as shown by df output.

lost+found directory is used by filesystem to recover broken files (fsck stores recovered files there), so it's normal you can see it.

Small size problem might refer to kibibytes:

1 kibibyte = 2^10 = 1024 bytes
16G = 14.9Gib

他のヒント

Try at the last line: sudo mount /dev/xvdf /vol

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top