[Lxc-users] Help with mounting a directory

Serge Hallyn serge.hallyn at canonical.com
Mon Jan 28 16:18:23 UTC 2013


Quoting Kim C. Callis (kim.callis at gmail.com):
> I have is Ubuntu 12.10 container. I create a directory called /Data and in
> my /var/lib/lxc/media I have the following:
> 
> 
> kcc at attitude-w:/var/lib/lxc/media$ cat fstab
> proc            proc         proc    nodev,noexec,nosuid 0 0
> sysfs           sys          sysfs defaults  0 0
> /home/kcc home/kcc none bind 0 0
> /home/kcc/Documents/E-Books/Calibre_Library
> /var/lib/lxc/media/rootfs/Data/Books none bind 0 0
> /home/kcc/Videos/Movies /var/lib/lxc/media/rootfs/Data/Videos/Movies none

What you have should also work, but it's recommended to use paths
relative to the container for the target, i.e.

/home/kcc/Documents/E-Books/Calibre_Library Data/Books none bind 0 0

> bind 0 0
> /home/kcc/Videos/TV/Series /var/lib/lxc/media/rootfs/Data/Videos/TV/Series
> none bind 0 0
> 
> 
> Although the home come up just fine, I am not able to access any of the
> directories under /Data. So what am I doing wrong?

Do the paths exist in the container?  (i.e. /Data/Videos/Movies)

Best to run with

	lxc-start -n container -l info -o debug

and look at the file 'debug' for information on why they failed to
mount.

-serge




More information about the lxc-users mailing list