[Devel] RE: storage considerations

Dietmar Maurer dietmar at proxmox.com
Tue Feb 3 09:14:23 PST 2009


> I would prefer to find a generic solution, that is,  a configuration
> format which can be interpreted in a generic way by lxc.
> The fstab file format is a good candidate :)
> We can:
>  1 - replace the fstab file by a new keyword lxc.mount = "a fstab
line"
>  2 - each time this keyword is found add a mntentry in a mount list of
> the configuration
>  3 - automatically add the bind mount of the rootfs in this list when
> the lxc.rootfs is found
> 
>  From the point of view of the configuration / setup:
> 
> the lxc-create creates the fstab file (do not mount anything otherwise
> that will be lost at reboot).
> the lxc-start/lxc-execute mount everything (it is up to the user to
> define the right order in the configuration file).
> 
> For example:
> 
> lxc.mount = myhost:/linux /linux nfs defaults 0 0
> lxc.rootfs = /root/debian4
> 
> That will create the fstab file in the container configuration tree:
> 
> myhost:/mydistro /root/mydistro nfs defaults 0 0
> /root/mydistro  /var/lxc/debian4/rootfs bind 0 0
> 
> This fstab can be used with a script for example to unshare the mount
> namespace, bind mount the fstab on top of /etc/fstab and call mount -a
> :)
> 
> In any case, the configuration file stays generic and a new fs support
> can be added without changing the lxc version.
> 
> Shall this fit your needs ?

Yes, I guess that would work for me.

- Dietmar

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list