[lxc-users] Mount directory with space in the path

Tycho Andersen tycho.andersen at canonical.com
Tue Aug 18 16:07:49 UTC 2015


On Tue, Aug 18, 2015 at 02:18:05PM +0200, Valerio Mariani wrote:
> Dear Andrey,
> 
>    thanks for your answer. So, I did this (psana is the software I am
> working on):
> 
> lxc config device add centos6-amd64-psana opt-working disk
> source="/data/Data/Psana Tests/" path=/opt/working
> 
> Then if I try:
> 
> lxc config device show centos6-amd64-psana
> 
> I see:
> 
> ...
> opt-working
>   source: /data/Data/Psana Tests/
>   type: disk
>   path: /opt/working
> ...
> 
> However, when I start the container:
> 
> lxc start centos6-amd64-psana
> error Error calling 'lxd forkstart centos6-amd64-psana
> /var/lib/lxd/containers /var/log/lxd/centos6-amd64-psana/lxc.conf':
> err='exit status 1'
> 
> The log says:
> 
>             lxc 1439899856.718 ERROR    lxc_conf -
> conf.c:mount_entry:1720 - No such file or directory - failed to mount
> '/data/Data/Psana' on '/usr/lib/x86_64-linux-gnu/lxc/Tests/'
>             lxc 1439899856.718 ERROR    lxc_conf - conf.c:lxc_setup:3801
> - failed to setup the mount entries for 'centos6-amd64-psana'
> 
> So, when it tries to mount the directory, it cuts the path at the first
> space... then takes the second part of the string as the target path for
> the mount.
> 
> Should I report this as a bug on the gitHub page?

Thanks, I think this is a bug in LXD, can you try:

https://github.com/tych0/lxd/commit/08f4e8580c42fc38063b9dfa53dc2e6550a0ed6c

and see if that fixes it?

Thanks,

Tycho


More information about the lxc-users mailing list