Exchanging data with a container


Exchanging data with a container

To create the directory automatically in the container, you can also add the create=dir option in the fstab :
/mnt/ssd/solr_data      /var/lib/lxc/Solr4StandAlone/rootfs/data        none   bind,create=dir

ust like we already had "optional", this adds two new LXC-specific mount flags:
  • create=dir (will do a mkdir_p on the path)
  • create=file (will do a mkdir_p on the dirname + a fopen on the path)
This was motivated by some of the needed bind-mounts for the unprivileged containers.
----------------------------------------------
I had to create the /data folder in the local container before the mount would work properly.
I also used this fstab entry:
/mnt/ssd/solr_data      /var/lib/lxc/Solr4StandAlone/rootfs/data        none   bind     0  0

Comentarios