[Lxc-users] lxc-create and mountpoint
erkan yanar
erkan at linsenraum.de
Thu Mar 17 08:42:19 UTC 2011
Moin Svein-Erik,
On Thu, Mar 17, 2011 at 12:30:02AM +0000, Svein-Erik Lund wrote:
> Is it possible to make lxc-create to ignore the fact that the folder for the container already exists?
>
> My problem is that for different reasons want to have each and every container in its own filesystem.
>
> If I create a logical volume, and mount it at /var/lib/lxc/<hostname> "lxc-create -n <hostname>" will say that the container already exists. For me this is a bit of a problem. any suggestions?
>
lxc-create is a Shellscript, so
less $(which lxc-create) is going to lead you to
if [ -d "$lxc_path/$lxc_name" ]; then
echo "'$lxc_name' already exists"
exit 1
fi
Comment it as a quick-win. But changing it to check if the dir is empty instead
could be a nicer approach.
Regards
Erkan
--
über den grenzen muß die freiheit wohl wolkenlos sein
More information about the lxc-users
mailing list