[Lxc-users] Copy-on-write hard-link / hashify feature

Daniel Lezcano daniel.lezcano at free.fr
Wed Jun 9 20:08:44 UTC 2010


On 06/09/2010 08:45 PM, Gordan Bobic wrote:
> Is there a feature that allows unifying identical files between guests
> via hard-links to save both space and memory (on shared libraries)?
> VServers has a feature for this called hashify, but I haven't been able
> to find such a thing in LXC documentation. Is there such a thing?
>
> Obviously, I could manually do the searching and hard-linking, but this
> is dangerous since without the copy-on-write feature for such
> hard-linked files that VServers provides, it would be dangerous as any
> guest could change a file on all guests.
>
> Is there a way to do this safely with LXC?
>    

No because it is supported by the system with the btrfs cow / snapshot 
file system.

https://btrfs.wiki.kernel.org

You can create your btrfs filesystem, mount it somewhere in your fs, 
install a distro and then make a snapshot, that will result in a 
directory. Assign this directory as the rootfs of your container. For 
each container you want to install, create a snapshot of the initial 
installation and assign each resulting directory for a container.






More information about the lxc-users mailing list