[Lxc-users] Hard links, code map sharing
Daniel Lezcano
daniel.lezcano at free.fr
Mon Feb 21 09:33:36 UTC 2011
On 02/20/2011 08:08 PM, Daniel Farina wrote:
> Hello list,
>
> I've been scouring The Internet on and off for this, but have not come
> to a conclusion:
>
> Does a linux host running LXC share code maps between containers? e.g.
> redundant read-only maps to the same .so or /bin/foo, as defined by an
> equivalent hardlink?
Hmm, I suppose you are refering to similar feature than
http://linux-vserver.org/util-vserver:Vhashify right ?
Actually you can use the same rootfs than the host by ro bind mount the
some directories like /usr, /lib etc ...
That means you have a dedicated host for the containers and upgrading
the host will upgrade all the containers.
The idea of the vhashify for lxc was discussed some months ago and I
find the idea pretty smart. But the objective of lxc is to follow the
mainline, so the question is do we have a COW filesystem we can use to
implement on top of it the vhashify ?
Replacing the same file by a hardlink is easily implementable. But I am
not sure we have a feature in the kernel which allows to replace this
hardlink by a file when we modify it (eg. apt-get upgrade in the
container). Do we have ?
The btrfs seems to provide something not so far of this feature but I
noticed the inode number is the same even if the file is different. I
don't know how mapped file will be optimized, if it is ... Moreover IMHO
btrfs is not mature enough for that.
Thanks
-- Daniel
More information about the lxc-users
mailing list