I do a dummy container with the mapped volumes to the /data
docker create
-v /data/prometheus/data:/opt/prometheus/data
-v /data/consul-data:/opt/consul-data
-v /data/mysql:/var/lib/mysql
-v /data/grafana:/var/lib/grafana
–name pmm-data percona/pmm-server /bin/true
And then execute:
docker run -d -p 80:80 --volumes-from pmm-data --name pmm-server --restart always percona/pmm-server
Also I tried as docker-compose.yml with the next configuration:
services:
percona:
image: percona/pmm-server
restart: always
ports:
- 80:80
volumes:
- /data/prometheus/data:/opt/prometheus/data
- /data/consul-data:/opt/consul-data
- /data/mysql:/var/lib/mysql
- /data/grafana:/var/lib/grafana
But both configs doesn’t work.
The logs shows:
2019-05-30 07:33:07,541 INFO spawned: ‘dashboard-upgrade’ with pid 12318
2019-05-30 07:33:07,543 INFO success: dashboard-upgrade entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2019-05-30 07:33:07,544 INFO exited: grafana (exit status 1; not expected)
2019-05-30 07:33:08,012 INFO exited: createdb (exit status 1; not expected)
2019-05-30 07:33:09,016 INFO spawned: ‘createdb’ with pid 12326
2019-05-30 07:33:09,223 INFO exited: qan-api (exit status 1; not expected)
2019-05-30 07:33:10,227 INFO spawned: ‘qan-api’ with pid 12335
2019-05-30 07:33:10,228 INFO success: createdb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-05-30 07:33:10,334 INFO exited: createdb2 (exit status 1; not expected)
2019-05-30 07:33:11,336 INFO success: qan-api entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-05-30 07:33:11,339 INFO spawned: ‘createdb2’ with pid 12339
2019-05-30 07:33:11,342 INFO spawned: ‘pmm-managed’ with pid 12340
2019-05-30 07:33:11,373 INFO exited: pmm-managed (exit status 2; not expected)
2019-05-30 07:33:11,430 INFO exited: createdb3 (exit status 1; not expected)
2019-05-30 07:33:12,432 INFO success: createdb2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-05-30 07:33:12,434 INFO spawned: ‘createdb3’ with pid 12351
2019-05-30 07:33:12,869 INFO spawned: ‘grafana’ with pid 12354
2019-05-30 07:33:12,912 INFO exited: grafana (exit status 1; not expected)
2019-05-30 07:33:13,914 INFO success: createdb3 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-05-30 07:33:13,944 INFO exited: dashboard-upgrade (exit status 1; not expected)
2019-05-30 07:33:14,108 INFO spawned: ‘dashboard-upgrade’ with pid 12361
2019-05-30 07:33:14,110 INFO success: dashboard-upgrade entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2019-05-30 07:33:14,111 INFO exited: createdb (exit status 1; not expected)
2019-05-30 07:33:14,315 INFO spawned: ‘createdb’ with pid 12367
2019-05-30 07:33:15,244 INFO exited: qan-api (exit status 1; not expected)
2019-05-30 07:33:16,248 INFO spawned: ‘qan-api’ with pid 12376
2019-05-30 07:33:16,249 INFO success: createdb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-05-30 07:33:16,361 INFO exited: createdb2 (exit status 1; not expected)
2019-05-30 07:33:17,363 INFO success: qan-api entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-05-30 07:33:17,365 INFO spawned: ‘createdb2’ with pid 12380
2019-05-30 07:33:17,447 INFO exited: createdb3 (exit status 1; not expected)
2019-05-30 07:33:18,449 INFO success: createdb2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-05-30 07:33:18,450 INFO spawned: ‘createdb3’ with pid 12384
2019-05-30 07:33:19,342 INFO exited: createdb (exit status 1; not expected)
2019-05-30 07:33:19,441 INFO spawned: ‘createdb’ with pid 12389
2019-05-30 07:33:19,453 INFO spawned: ‘grafana’ with pid 12390
And the /data files:
root@perconamm:/data# ls -la *
consul-data:
total 8
drwxr-xr-x 2 root root 4096 May 29 23:04 .
drwxrwxrwx 6 root root 4096 May 29 23:04 …
grafana:
total 12
drwxr-xr-x 3 root root 4096 May 29 23:04 .
drwxrwxrwx 6 root root 4096 May 29 23:04 …
-rw-r–r-- 1 root root 0 May 29 23:04 grafana.db
drwxr-xr-x 3 root root 4096 May 30 07:31 plugins
mysql:
total 8
drwxr-xr-x 2 root root 4096 May 29 23:04 .
drwxrwxrwx 6 root root 4096 May 29 23:04 …
prometheus:
total 12
drwxr-xr-x 3 root root 4096 May 29 23:04 .
drwxrwxrwx 6 root root 4096 May 29 23:04 …
drwxr-xr-x 2 root root 4096 May 29 23:04 data
root@perconamm:/data#
If I run the container without volumes, work correctly.
Can anyone help me?
Many thanks