Re: [Vserver] Quick question

2006-05-23 Thread Fareha Shafique

Corey Wright wrote:


hopefully the line wrapping doesn't visually destroy the following too much.

# ls -1i /home/vservers/*/bin/bash | cut -d' ' -f1 | uniq -c
13 6751094

(all thirteen instances of /bin/bash within vservers occupy inode 6751094.)

# ls -il /home/vservers/{test,client}/bin/bash*
6751094 -rwxr-xr-x  14 root root 729640 2005-05-02
17:39 /home/vservers/client/bin/bash
6751094 -rwxr-xr-x  14 root root 729640 2005-05-02
17:39 /home/vservers/test/bin/bash

(there are 14 hardlinks: 13 belonging to vservers, and the master one
within /etc/vservers/.defaults/apps/vunify/hash/0.)

# cp -av /home/vservers/client/bin/bash{,.unlinked}
`/home/vservers/client/bin/bash' -
`/home/vservers/client/bin/bash.unlinked'
# ls -1i /home/vservers/{test,client}/bin/bash*
6751094 /home/vservers/client/bin/bash
573454 /home/vservers/client/bin/bash.unlinked
6751094 /home/vservers/test/bin/bash
# rm /home/vservers/client/bin/bash
rm: remove write-protected regular file `/home/vservers/client/bin/bash'? y
# mv /home/vservers/client/bin/bash{.unlinked,}
# ls -il /home/vservers/{test,client}/bin/bash*
573454 -rwxr-xr-x   1 root root 729640 2005-05-02
17:39 /home/vservers/client/bin/bash
6751094 -rwxr-xr-x  13 root root 729640 2005-05-02
17:39 /home/vservers/test/bin/bash
# vserver client hashify -nv
Initializing exclude-list for /home/vservers/client (client)
Starting to traverse directories...
snip
unifying   '/bin/bash'
snip
# vserver client hashify
# ls -il /home/vservers/{test,client}/bin/bash
6751094 -rwxr-xr-x  14 root root 729640 2005-05-02
17:39 /home/vservers/client/bin/bash
6751094 -rwxr-xr-x  14 root root 729640 2005-05-02
17:39 /home/vservers/test/bin/bash

so, that's how it works for me.

this is how i set it up, synthesized from
http://linux-vserver.org/alpha+util-vserver under vhashify.

* mkdir -p /etc/vservers/.defaults/apps/vunify/hash
* mkdir -p /home/vservers/.hash
* ln -s /home/vservers/.hash /etc/vservers/.defaults/apps/vunify/hash/0
* mkdir -p /etc/vservers/vserver/apps/vunify
* customize exclusions (if necessary)
o cp
-av /usr/lib/util-vserver/defaults/vunify-exclude 
/etc/vservers/vserver/apps/vunify/exclude
o echo '/usr/src/*' /etc/vservers/vserver/apps/vunify/exclude
* vserver vserver hashify -nv | less
* vserver vserver hashify

all but the first three steps should be repeated for each vserver.

note: /etc/vservers/.defaults/apps/vunify/hash/0, 
/etc/vservers/.defaults/vdirbase,
and correspondingly /etc/vservers/*/vdir must all be (or symlink to
directories) on the same filesystem, otherwise hardlinks cannot be
created.

hth.

corey
 

Thanks for the detailed explanation. I have done exactly what you said, 
but the two folders  /etc/vservers/.defaults/aaps/vunify/hash/0 (and the 
linked one /home/vservers/.hash)
contain a separate file for each file in the 2 vservers I unified (i.e. 
twice as many files as there should be). So when I check my vserver 
files, the number of links is 2 for the unified files: one link from the 
vserver and one link from the host. But the files are not unified 
between the two vservers.
Is there any configuration that might be necessary for unification and I 
may have missed?


Thanks,
-FS
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Quick question

2006-05-23 Thread Fareha Shafique

I did install from source, I used rpms.

ADNET Ghislain wrote:


sorry to jump on the thread, just a little test : when you make the
vserver-util, do the make check  worked for all tests ?
i have issue on the  unify test on debian, perhaps you have something
related or a beecrypt issue ?

Cordialement,
Ghislain ADNET.
 


Thanks for the detailed explanation. I have done exactly what you
said, but the two folders  /etc/vservers/.defaults/aaps/vunify/hash/0
(and the linked one /home/vservers/.hash)
contain a separate file for each file in the 2 vservers I unified
(i.e. twice as many files as there should be). So when I check my
vserver files, the number of links is 2 for the unified files: one
link from the vserver and one link from the host. But the files are
not unified between the two vservers.
Is there any configuration that might be necessary for unification and
I may have missed?

Thanks,
-FS
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
   


___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
 


___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Quick question

2006-05-23 Thread Guenther Fuchs
Hi there,

on Tuesday, May 23, 2006 at 9:08:12 PM there was posted:

AG i have issue on the  unify test on debian, perhaps you have something
AG related or a beecrypt issue ?

FC5 from RPM work's fine out of the box yet, this is prooven binary
packages. The problem _is_ somewhat related to installing yum-2.4.1
from FC4 instead of 2.6 original version supplied with FC5.

I guess this can relate just to dependencies of FC4 yum only, which I
don't have avail for the moment.

--
regards 'n greez,

Guenther Fuchs
(aka muh and powerfox)

___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Quick question

2006-05-23 Thread Corey Wright
 2006/5/23, ADNET Ghislain [EMAIL PROTECTED]:
 sorry to jump on the thread, just a little test : when you make the
 vserver-util, do the make check  worked for all tests ?
 i have issue on the  unify test on debian, perhaps you have something
 related or a beecrypt issue ?

 You cannot use Debian-supplied beecrypt. Grab the source of 4.0 or
 newer from sourceforge or wherever (4.0.0 is fine, as is 4.1.2, tested
 on these two versions). It should be in the archives btw, because I
 remember writing about this earlier.

i presume you are referring to the beecrypt released with sarge.

if anybody is using the util-vserver (and necessary beecrypt) from sarge,
they have my sympathies.

on sarge i use the packages from backports.org, versions 0.30.210 and
4.1.2.  instructions for using backports.org are at
http://backports.org/instructions.html.

to provide background to my previous post in this thread, the vhashify
demonstration, i'm running debian sarge with ubuntu's linux 2.6.12 source
(from breezy) patched with vserver 2.0 using util-vserver 0.30.210.

corey
-- 
[EMAIL PROTECTED]

___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Quick question

2006-05-23 Thread Fareha Shafique

Sorry, I meant I did NOT install from source.

-FS

Fareha Shafique wrote:


I did install from source, I used rpms.

ADNET Ghislain wrote:


sorry to jump on the thread, just a little test : when you make the
vserver-util, do the make check  worked for all tests ?
i have issue on the  unify test on debian, perhaps you have something
related or a beecrypt issue ?

Cordialement,
Ghislain ADNET.



___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Quick question

2006-05-23 Thread ADNET Ghislain
thanks for the hint !!
 on sarge i use the packages from backports.org, versions 0.30.210 and
 4.1.2.  instructions for using backports.org are at
 http://backports.org/instructions.html.

   
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


[Vserver] Quick question

2006-05-22 Thread Fareha Shafique

Hi,

I just wanted to make sure hashify only unifies rpm packages, right? Any 
other files I want to unify I will have to manually hardlink them?
And vdu gives the disk space counting only files that have one hardlink, 
but when I do a vdu on my vserver directory I get 0...why is that?


Thanks,
-FS
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Quick question

2006-05-22 Thread Corey Wright
On Mon, 22 May 2006 10:29:20 -0400
Fareha Shafique [EMAIL PROTECTED] wrote:

i assume you are following the process outlined on
http://linux-vserver.org/alpha+util-vserver under vhashify.

 I just wanted to make sure hashify only unifies rpm packages, right?

no.  vhashify (the helper application called with vserver name hashify)
has no knowledge of the rpm database and what files are installed by rpm
and which are unique to the specific vserver (whether generated by an rpm
post-installation script or manually created by the user).

 Any 
 other files I want to unify I will have to manually hardlink them?

no.  when you run vhashify it creates hardlinks
within /etc/vservers/.defaults/apps/vunify/hash/0 to all files that are not
explicitly excluded within /usr/lib/util-vserver/defaults/vunify-exclude
(well, that's the file within the debian package; location may vary).

again, all files are unified that are not explicitly excluded.

here's something i had to learn the hard way: you can specify exclusions
for a specific vserver, but the vserver-specific exclusions are
supplementary, not complimentary.  so when you
create /etc/vservers/name/apps/vunify/exclude it's best to begin that
file with a copy of /usr/lib/util-vserver/defaults/vunify-exclude.

again, if a vserver-specific exclusion list exists, then the default
exclusion list is totally disregarded, and only the vserver-specific
exclusion list is consulted when running vhashify on that vserver.

 And vdu gives the disk space counting only files that have one hardlink, 
 but when I do a vdu on my vserver directory I get 0...why is that?

i've never used vdu, so i'll defer that question to someone more
knowledgable.  i don't have any personal experience with managing the
vserver file systems (ie quotas) besides vhashify, though i intend to get
to that eventually.

corey
-- 
[EMAIL PROTECTED]
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Quick question

2006-05-22 Thread Daniel Hokka Zakrisson

Fareha Shafique wrote:
And vdu gives the disk space counting only files that have one hardlink, 
but when I do a vdu on my vserver directory I get 0...why is that?


No, vdu counts the files/directories that belong to a specific context 
(if you have 0.30.210).


--
Daniel Hokka Zakrisson
GPG id: 06723412
GPG fingerprint: A455 4DF3 990A 431F FECA  7947 6136 DDA2 0672 3412
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Quick question

2006-05-22 Thread Fareha Shafique



Corey Wright wrote:


On Mon, 22 May 2006 10:29:20 -0400
Fareha Shafique [EMAIL PROTECTED] wrote:

i assume you are following the process outlined on
http://linux-vserver.org/alpha+util-vserver under vhashify.

 


I just wanted to make sure hashify only unifies rpm packages, right?
   



no.  vhashify (the helper application called with vserver name hashify)
has no knowledge of the rpm database and what files are installed by rpm
and which are unique to the specific vserver (whether generated by an rpm
post-installation script or manually created by the user).

 

Any 
other files I want to unify I will have to manually hardlink them?
   



no.  when you run vhashify it creates hardlinks
within /etc/vservers/.defaults/apps/vunify/hash/0 to all files that are not
explicitly excluded within /usr/lib/util-vserver/defaults/vunify-exclude
(well, that's the file within the debian package; location may vary).
 

I checked /etc/vservers/.defaults/apps/vunify/hash/0 and it consists of 
a bunch of directories. At the lowest level, each directory consists of 
one file...the purpose of which i do not understand. Any help will be 
appreciated.



again, all files are unified that are not explicitly excluded.

here's something i had to learn the hard way: you can specify exclusions
for a specific vserver, but the vserver-specific exclusions are
supplementary, not complimentary.  so when you
create /etc/vservers/name/apps/vunify/exclude it's best to begin that
file with a copy of /usr/lib/util-vserver/defaults/vunify-exclude.

again, if a vserver-specific exclusion list exists, then the default
exclusion list is totally disregarded, and only the vserver-specific
exclusion list is consulted when running vhashify on that vserver.

 


Thanks.
-FS
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Quick question

2006-05-22 Thread Daniel Hokka Zakrisson

Fareha Shafique wrote:


Daniel Hokka Zakrisson wrote:


Fareha Shafique wrote:

And vdu gives the disk space counting only files that have one 
hardlink, but when I do a vdu on my vserver directory I get 0...why 
is that?




No, vdu counts the files/directories that belong to a specific context 
(if you have 0.30.210).



Ok, so I still don't understand why I get a 0 when I do something like:
vdu --xid xid --space /vservers/vserver-name
for either of the 2 vservers I have built?


Did you tag the files with chxid? Do the filesystem(s) they live on have 
tagxid enabled?


--
Daniel Hokka Zakrisson
GPG id: 06723412
GPG fingerprint: A455 4DF3 990A 431F FECA  7947 6136 DDA2 0672 3412
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Quick question

2006-05-22 Thread Fareha Shafique

Daniel Hokka Zakrisson wrote:


Fareha Shafique wrote:



Daniel Hokka Zakrisson wrote:


Fareha Shafique wrote:

And vdu gives the disk space counting only files that have one 
hardlink, but when I do a vdu on my vserver directory I get 0...why 
is that?





No, vdu counts the files/directories that belong to a specific 
context (if you have 0.30.210).



Ok, so I still don't understand why I get a 0 when I do something like:
vdu --xid xid --space /vservers/vserver-name
for either of the 2 vservers I have built?



Did you tag the files with chxid? Do the filesystem(s) they live on 
have tagxid enabled?


I don't think I have done that.  I'll look into it thanks.

-FS
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Quick question

2006-05-22 Thread Fareha Shafique



Corey Wright wrote:


On Mon, 22 May 2006 10:29:20 -0400
Fareha Shafique [EMAIL PROTECTED] wrote:

i assume you are following the process outlined on
http://linux-vserver.org/alpha+util-vserver under vhashify.

 


I just wanted to make sure hashify only unifies rpm packages, right?
   



no.  vhashify (the helper application called with vserver name hashify)
has no knowledge of the rpm database and what files are installed by rpm
and which are unique to the specific vserver (whether generated by an rpm
post-installation script or manually created by the user).

 

Any 
other files I want to unify I will have to manually hardlink them?
   



no.  when you run vhashify it creates hardlinks
within /etc/vservers/.defaults/apps/vunify/hash/0 to all files that are not
explicitly excluded within /usr/lib/util-vserver/defaults/vunify-exclude
(well, that's the file within the debian package; location may vary).

again, all files are unified that are not explicitly excluded.
 

If hardlinks are created the inode numbers should be the same. But when 
I hashified 2 of my vservers (I first used the -nv option to see which 
files would be unified) I checked the files that were supposed to have 
been unified and I don't get the same inode number? I don't get any 
error messages, I'm not sure if my hashify is working? How can I check?
Like I mentioned in another thread, I created the second vserver using a 
template of the first one. The number of links on most files in the 
template is already more than one, and hashify does not increase the 
number of these links.



here's something i had to learn the hard way: you can specify exclusions
for a specific vserver, but the vserver-specific exclusions are
supplementary, not complimentary.  so when you
create /etc/vservers/name/apps/vunify/exclude it's best to begin that
file with a copy of /usr/lib/util-vserver/defaults/vunify-exclude.
 


I'm using FC4, I can't seem to find the vunify-exclude file


again, if a vserver-specific exclusion list exists, then the default
exclusion list is totally disregarded, and only the vserver-specific
exclusion list is consulted when running vhashify on that vserver.
 


___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver