When 25GB EBS attached to EC2, it provides no space (4MB only)

0

Hi,

my current setup:

  • EC2 with ARM
  • Docker installed in EC2
  • Spring + Java app in one container
  • MySQL in another container

When I run it all in the EC2 it works like charm, but problem occurs when I am trying to connect mysql storage to an attached EBS.

my docker run command for mysql:

docker run -d -p 3306:3306 -v /dev/xvdf/mysql:/var/lib/mysql:rw -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=erdeldb mysql:8

When setting volume as /dev/sdf/mysql I get an error saying it is not a directory. I also can not open that directory in console with same error cd /dev/sdf/ returns not directory error

When setting volume as /dev/xvdf/mysql I get storage issue, not enough space.

When I check storage of /dev/xvdf after I have attached the EBS, I see 4.0 MB dir size

I am not sure what am I doing wrong. I haven't deployed before, just learning. Any inputs, thanks.

1 Answer
0
Accepted Answer
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions