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 年前檢視次數 221 次
1 個回答
0
已接受的答案
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南