April 18, 2017 1:28 PM, "Gabriel Marais" <[email protected]> wrote:

> Hi Guys
> 
> I added a block device to a container through the command
> 
> lxc config device add vmh01-db-master-01 storage disk 
> path=/var/lib/mysql source=/mnt/db-master-01-varlibmysql/
> 
> On the container:-
> /dev/mapper/3600a098000a2f553000003fe58f63589-part1 50G 52M 47G 
> 1% /var/lib/mysql
> 
> On my host:-=
> /dev/mapper/3600a098000a2f553000003fe58f63589-part1 
> 50G 52M 47G 1% /mnt/db-master-01-varlibmysql
> 
> The permissions/owner in the container looks like this:
> drwxr-xr-x 3 nobody nogroup 4096 Apr 18 09:02 mysql
> 
> I am unable to change permissions or modify the user/group
> 
> root@vmh01-db-master-01 [11:24:22] :~# chown root:root /var/lib/mysql
> chown: changing ownership of '/var/lib/mysql': Operation not permitted
> 
> I was trying to mount a block device where my mysql data would live.
> How do I go about changing the permissions/ownership?

I guess the easiest is to change the uid/guid on the host to match the desired 
uid/gid in the container.

Cheers,
Sjoerd
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to