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 Resposta
0
Resposta aceita
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas