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

Valerio Mariani valerio.mariani at gmx.de
Tue Aug 18 12:18:05 UTC 2015


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?

Thank you for your help
 
   Valerio










On 17.08.2015 18:41, Andrey Repin wrote:
> Greetings, Valerio Mariani!
>
>>     I have been using this syntax to mount some of the hosts's     directories in the container:
>> lxc config device add gp sources disk source=$HOME/p/gratipay.com     path=/opt/srv
> lxc config device add gp sources disk source="$HOME/p/gratipay.com"     path=/opt/srv
> ?
>
>> However, I don't see to be able to use a       host path (source=) with a
>> space in it. I tried using forward       slash (\), single quotes ('),
>> double quotes (") around the path,       everything, but it gets put in the
>> configuration with the path       truncated at the first space.... Is it
>> possible to use paths with       spaces in it?
>



More information about the lxc-users mailing list