Re: [Vserver] Hashification

From: Fareha Shafique <fareha_at_eecg.toronto.edu>
Date: Wed 24 May 2006 - 21:59:08 BST
Message-ID: <4474C91C.4010302@eecg.toronto.edu>

Corey Wright wrote:

>>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? ;-)
>
>
I had a look at that but specifically for the answer of the first
questions, unfortunately I didn't quite grasp what was going on :)
The reason I asked the questions is that I have 2 identical vservers
(i.e. all the files are the same except those created by the skeleton
build method). However, when I hashify, one vserver ends up with a lot
more unified files than the other. So I'm trying to figure out why this
is happening...I have not customized the exclude list in either vserver.

>>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
>http://www.debian.org/doc/manuals/debian-tutorial/ch-advanced.html#s-advanced-files-hardlinks
>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 http://linux-vserver.org/alpha+util-vserver, under "Directory/vserver
>unification":
>
>It has rsync-like excludelists, so that you can e.g. exclude anything
>under /etc/ except /etc/termcap; the corresponding excludelist would be
>
> +/etc/termcap
> /etc
>
>further see http://samba.anu.edu.au/ftp/rsync/rsync.html, specifically the
>FILTER RULES and INCLUDE/EXCLUDE PATTERN RULES sections.
>
>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
>wrong.
>
>corey
>
>
Thanks for your help. I really appreciate it.

-FS
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Wed May 24 21:59:36 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 24 May 2006 - 21:59:40 BST by hypermail 2.1.8