Re: [Vserver] Transparently Creating Multiple Instances of Vservers Using COW?

From: Bruno <bonbons67_at_internet.lu>
Date: Sat 03 Jun 2006 - 14:05:00 BST
Message-Id: <200606031505.00564.bonbons67@internet.lu>

On Saturday 03 June 2006 14:15, EKC wrote:
> Recursively creating hard-links to files in the parent vserver's
> directory tree and running 'setattr --iunlink <file_name>' does seem
> to be the most straightforward solution to rapidly cloning a vserver.
> This approach has the added benefit (I think) of supporting making
> copies of vservers that are themselves copies of other vservers (since
> multiple instances of the same file would point to the same inode, COW
> should behave correctly; am I correct here?).
>
> However, I was hoping to be able to clone vservers in a single
> operation instead of having to traverse the directory tree.
Just copying 1 file is not sufficient, that would be quite what unionfs does!
You can have a single command that does the whole traversal, but that makes no
big difference.

> As an alternative solution, has anyone tried using unionfs to create
> clones of vservers? Unionfs may also be able to support quickly
> creating clones of clones. However, I'm conerned that the performance
> of unionfs may degrade as the number of layers used increases.
> http://www.unionfs.org discusses performance degradtion (vs native
> ext3) of up to 12%. Also, I'm not sure whether the UnionFS kernel
> patch is compatible with Vserver-devel.
Tokkee already adjusted unionfs so that it's VServer compatible.
That was around mid of April.

See the thread following this email:
http://list.linux-vserver.org/archive/vserver/msg13021.html

> I'm also considering using some combination of BME and COW. Does
> anyone know whether it's possible for me to 'clone' a vserver by
> bind-mounting the parent vserver and using COW to incrementally create
> copies of the parent vserver's files as they are accessed by the
> child? Is there any limit to the number of bind-mounts I can have on a
> single vserver-patched system?
>
This would require unionfs. For this to not loose too much performance there
should be one or more non-union-fs based guests images, ro-bind-mounted for
each guest with unionfs on to of each bind-mount.

There is not hard limit of bind-mount count I know of. Memory is probably the
only limit.

Best regards,
Bruno
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Sat Jun 3 14:05:26 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sat 03 Jun 2006 - 14:05:30 BST by hypermail 2.1.8