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개 답변
0
수락된 답변
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠