juicedata / docker-volume-juicefs

Docker volume plugin for juicefs
30 stars 8 forks source link

mysql init failure with juicefs volume #26

Open edwardchenchen opened 2 years ago

edwardchenchen commented 2 years ago

I have created a volume using

juicefs format \
    --storage minio \
    --bucket "https://minio.edwardcc.com/juicefs" \
    --access-key python \
    --secret-key removed \
    "mysql://root:password@(removed:3306)/juicefs" \
    docker

format success

2022/10/11 16:21:12.119184 juicefs[15272] <INFO>: Meta address: mysql://root:****@(removed:3306)/juicefs [interface.go:402]
2022/10/11 16:21:12.128931 juicefs[15272] <INFO>: Data use minio://minio.edwardcc.com/juicefs/docker/ [format.go:435]
2022/10/11 16:21:12.947961 juicefs[15272] <INFO>: Volume is formatted as {
  "Name": "docker",
  "UUID": "30444015-1d19-4865-923c-b7b618d69143",
  "Storage": "minio",
  "Bucket": "https://minio.edwardcc.com/juicefs",
  "AccessKey": "python",
  "SecretKey": "removed",
  "BlockSize": 4096,
  "Compression": "none",
  "KeyEncrypted": true,
  "TrashDays": 1,
  "MetaVersion": 1
} [format.go:472]

start a mysql db using compse docker-compose.yml

version: '3'
services:
  db:
    image: mysql/mysql-server
    restart: always
    environment:
      MYSQL_DATABASE: demo
      MYSQL_USER: demo
      MYSQL_PASSWORD: demo
      MYSQL_ROOT_PASSWORD: demo
    volumes:
      - jfsvolume:/var/lib/mysql
volumes:
  jfsvolume:
    driver: juicedata/juicefs:latest
    driver_opts:
      name: jfsvolume
      metaurl: "mysql://root:password@(removed:3306)/juicefs"

the mysql init process failed with

 2022-10-11 at 16 25 15

can see high volume of write to minio

 2022-10-11 at 16 51 50  2022-10-11 at 16 46 57

I have also tried using AWS S3, same problem