Re: [Vserver] Hashification

From: Corey Wright <>
Date: Wed 24 May 2006 - 21:44:58 BST
Message-ID: <37300.corey.1148503498.squirrel@squirrelmail>

> I've been struggling to fully understand how vhashify works for a while
> now. I want to know more about it. It would be nice if someone could
> answer the following questions for me or point to some document which
> can help me understand the vhashify and unify better:

isn't there a vhashify.c? ;-)

> 1) What files and how does vhashify step through and compare for
> unification?

dunno. i've wondered that myself, and postulated some, but "the proof is
in the pudding" so i haven't questioned it too much.

i'm guessing here, but every file in /etc/vservers/<vserver>/vdir not
explicitly excluded by some pattern in
/etc/vservers/<vserver>/apps/vunify/exclude or
/usr/lib/util-vserver/defaults/vunify-exclude is hashed, looked up in a
hash table (ie files within /etc/vservers/.defaults/apps/vunify/hash/0
named after value of hash of contents), file attributes are compared
against the hardlink in the hash table, and if found equal, then the files
are "unified".

so how close did i get? :-D

herbert, daniel, somebody correct me if i'm wrong.

> 2) What things are compared to determine if the files can be unified? In
> other words, what properties of the file should be the same?

all properties besides file name. at least that's my guess according to
as unification just takes advantage of hardlinks (with the special
property of being immutable but unlinkable).

> 3) What is the format of an exclude file?

from, under "Directory/vserver

It has rsync-like excludelists, so that you can e.g. exclude anything
under /etc/ except /etc/termcap; the corresponding excludelist would be


further see, specifically the

take all the above with a grain of salt as i'm just making educated
guesses. hopefully somebody will at least confirm whether i'm right or


Vserver mailing list
Received on Wed May 24 21:45:29 2006
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 24 May 2006 - 21:45:35 BST by hypermail 2.1.8