Comments on: Using Different Mount Points on PMM Docker Deployments https://www.percona.com/blog/using-different-mount-points-on-pmm-docker-deployments/ Mon, 03 Feb 2020 16:43:23 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: molguram vinay https://www.percona.com/blog/using-different-mount-points-on-pmm-docker-deployments/#comment-10971770 Mon, 03 Feb 2020 16:43:23 +0000 https://www.percona.com/blog/?p=48415#comment-10971770 Also a workaround. To change the docker default configuration and make it use the Disk/Partition that we want to.

For the above example, If we want to use the /pmm/ .

1. Stop docker service:
systemctl stop docker.service

2. Override defaults(which is /var/lib/docker/volumes/) to use /pmm.

Add in /etc/systemd/system/docker.service.d/override.conf

[Service]
ExecStart=
ExecStart=-/usr/bin/dockerd -H fd:// -g /pmm/docker –containerd=/run/containerd/containerd.sock

3. Start docker service:
systemctl status docker.service

systemctl status docker.service

Now follow the same steps to Install and configure: https://www.percona.com/doc/percona-monitoring-and-management/2.x/install/docker-setting-up.html

And then, you will have docker using the /pmm mount.

]]>
By: Agustín https://www.percona.com/blog/using-different-mount-points-on-pmm-docker-deployments/#comment-10971475 Fri, 22 Nov 2019 11:27:19 +0000 https://www.percona.com/blog/?p=48415#comment-10971475 Hi José. Thanks for your comment.

Can you be more specific as to what is failing, so we can see if there are any issues with the steps? So far, we haven’t seen any errors due to these steps, specifically, although there were errors when some commands were not run as expected. Feel free to use the forums to post full steps used, and their outputs, so we can review them.

]]>
By: Jose Manuel Vera https://www.percona.com/blog/using-different-mount-points-on-pmm-docker-deployments/#comment-10971471 Fri, 22 Nov 2019 08:56:55 +0000 https://www.percona.com/blog/?p=48415#comment-10971471 This procedure leads to Prometheus template error on CentOs 7

]]>
By: Fernando Mattera https://www.percona.com/blog/using-different-mount-points-on-pmm-docker-deployments/#comment-10971413 Mon, 11 Nov 2019 14:53:36 +0000 https://www.percona.com/blog/?p=48415#comment-10971413 Excelent post!

I did this a year ago, and still working

]]>
By: Agustin G https://www.percona.com/blog/using-different-mount-points-on-pmm-docker-deployments/#comment-10971302 Mon, 21 Oct 2019 22:32:46 +0000 https://www.percona.com/blog/?p=48415#comment-10971302 Hi Tanuj,
Sorry for the late reply. Were you able to solve this? Please go to our online forums for these kinds of questions: https://www.percona.com/forums/

]]>
By: Agustin G https://www.percona.com/blog/using-different-mount-points-on-pmm-docker-deployments/#comment-10971301 Mon, 21 Oct 2019 22:29:54 +0000 https://www.percona.com/blog/?p=48415#comment-10971301 Hi Janis,
Thanks for your comment. I have double-checked this, and it should work as mentioned in the original steps. The thing is that we never created the innermost directories with mkdir command, so we would be in the following situation (from the same documentation link you sent):

-> SRC_PATH specifies a directory
—-> DEST_PATH does not exist
——–> DEST_PATH is created as a directory and the contents of the source directory are copied into this directory

I have tried this again, just in case, and it is working as expected. Maybe you modified the mkdir commands? Please send the exact commands you sent, so I’m able to reproduce, if not.

]]>
By: Tanuj https://www.percona.com/blog/using-different-mount-points-on-pmm-docker-deployments/#comment-10970829 Sun, 26 May 2019 01:01:29 +0000 https://www.percona.com/blog/?p=48415#comment-10970829 We get permission denied error when we run step 5
chown: cannot read directory ‘/opt/prometheus/data’: Permission denied
chown: cannot read directory ‘/opt/consul-data’: Permission denied
chown: cannot read directory ‘/var/lib/grafana’: Permission denied
chown: cannot read directory ‘/var/lib/mysql’: Permission denied

]]>
By: Janis Puris https://www.percona.com/blog/using-different-mount-points-on-pmm-docker-deployments/#comment-10970513 Wed, 27 Mar 2019 15:04:28 +0000 https://www.percona.com/blog/?p=48415#comment-10970513 Step #3 is not correct with recent docker versions

The docker paths need to have “/.” at the end as per https://docs.docker.com/engine/reference/commandline/cp/
If this is not done, the cp command will nest the directories in destination path and mysql will fail to start (among to start with).

Change following

shell> docker cp pmm-data-temporary:/opt/prometheus/data /pmm/opt/prometheus/data
shell> docker cp pmm-data-temporary:/opt/consul-data /pmm/opt/consul-data
shell> docker cp pmm-data-temporary:/var/lib/mysql /pmm/var/lib/mysql
shell> docker cp pmm-data-temporary:/var/lib/grafana /pmm/var/lib/grafana
shell> docker rm -v pmm-data-temporary

to

shell> docker cp pmm-data-temporary:/opt/prometheus/data/. /pmm/opt/prometheus/data
shell> docker cp pmm-data-temporary:/opt/consul-data/. /pmm/opt/consul-data
shell> docker cp pmm-data-temporary:/var/lib/mysql/. /pmm/var/lib/mysql
shell> docker cp pmm-data-temporary:/var/lib/grafana/. /pmm/var/lib/grafana
shell> docker rm -v pmm-data-temporary

]]>