Re: [Vserver] dev setting in interfaces

2005-12-23 Thread Lars Braeuer

Stephan Mueller wrote:

Hi Herbert,

* Herbert Poetzl [EMAIL PROTECTED] [051222 18:10]:



if you want the tools to 'create' the IP for
your guest, then you have to tell them on which
interface it shall be done ...



ah, okay. Thank your for putting this straight.

One more question: where has the onboot option gone in the new
configuration style? I was not able to mark my clients to be run after
booting the vserver.


echo default  /etc/vservers/name/apps/init/mark

the vservers-default start script must be in the active runlevel!





Cheers + thanks again,
___
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] vserver migration 1.2.10 2.0.1

2005-12-22 Thread Lars Braeuer
Ok, this is really emberassing to me. I forgot to use --numeric-owner with tar. Though, I don't know 
why (without --numeric-owner) only the GIDs got messed up and not the UIDs (with UGID24)!?


dump/restore still don't work. Might there be a problem because I'm moving the guest systems from 
lvm1 to lvm2?


Herbert Poetzl wrote:

On Wed, Dec 21, 2005 at 10:09:21PM +0100, Lars Braeuer wrote:


Hi,

I'm having an issue with some files (group owner) when migrating a
vserver from a 2.4.30-vs1.2.10-vquota (GID24) system, ext3 partitions
mounted with tagctx to the new 2.6.14.3-vs2.0.1 system (GID24,
util-vserver-0.30.209), ext3 partitions mounted with tagxid. The
context id is the same (fixed) on both systems.



you sure that the original partition is mounted with
the proper tagxid (former tagctx) option? i.e. that
the files show sane uid/gid at the 'source'



When tarring the files on one vserver and untarring it on the new one,
a few files have different GID's. UID's are correct as far as I can
see.



could you tar a few of those problematic files for
me and upload or attach them to the next mail?


I tarred a few files that have the wrong GID 16777214 find it at:
http://mpex.net/tmp/wrong-xid.tar

mtab entry (on 'source'):
/dev/vg/test /vservers/test ext3 rw,tagctx,usrquota,grpquota 0 0

mtab (on 'destination'):
/dev/vg/test /vservers/test ext3 rw,tagxid 0 0

on the 'source' everything looks fine. uid's/gid's are correct.

here's exactly what I'm doing to transfer the files with dump.
- destination: create lvm2 partition with same size as the old one
- destination: create ext3 fs / mount fs with tagxid option
- source: dump 0zf /tmp/test.dump /vservers/test ; copy to destination
- destination: cd /vservers/test ; restore rf /test.dump
- destination: Lots of GIDs are 16777214, UIDs are fine

As we are not really using the tagging on the old and new system for quota (we planned to, but we 
never used it), is there a way to remove it before transfering the guest system via dump, i.e. with 
chxid -c 0 or something?






Same issue when using dump/restore to transfer the guest system to the
new host. The only difference is, that the GID is 16777214 on those
files.



just to make sure, both systems use UGID24?


yep, triple checked that.





Running chxid with the desired context id from the hostsystem doesn't
change anything.

Any hints? Am I missing anything?



we'll see ...
best,
Herbert



Regards,

Lars


Best,

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


[Vserver] vserver migration 1.2.10 2.0.1

2005-12-21 Thread Lars Braeuer

Hi,

I'm having an issue with some files (group owner) when migrating a vserver from a 
2.4.30-vs1.2.10-vquota (GID24) system, ext3 partitions mounted with tagctx to the new 
2.6.14.3-vs2.0.1 system (GID24, util-vserver-0.30.209), ext3 partitions mounted with tagxid. The 
context id is the same (fixed) on both systems.


When tarring the files on one vserver and untarring it on the new one, a few files have different 
GID's. UID's are correct as far as I can see.


Same issue when using dump/restore to transfer the guest system to the new host. The only difference 
is, that the GID is 16777214 on those files.


Running chxid with the desired context id from the hostsystem doesn't change 
anything.

Any hints? Am I missing anything?

Regards,

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


Re: [Vserver] When to mount lvm? (vs2.01)

2005-12-14 Thread Lars Braeuer

First of all, thanks for the answers.

I basically understand the design of namespaces. Should have looked through this page before asking 
my question.


Does anybody know what happens in the background if I take the example at the bottom and physically 
mount the device onto /vservers/test01 which will then also be used in the namespace of the vserver 
as mountpoint for the bind mount?


Another question:
There's the generateInitOptions function setting the values for INITCMD_START, INITCMD_STOP and so 
on. In the vserver.functions file I don't see a call for a different namespace, but test -x 
$vdir/vdir/etc/init.d/rc is still working (when running vserver.start). How can this be, if this 
all happens without a namespace set or is there somewhere a namespace call that I didn't see so far?


When running vserver.stop the INITCMD_STOP can't be set, although nothing is unmounted before 
generateOptions in vserver.stop is called. I included a ls -la $vdir/vdir/$i right above the 
test -x call at line 264 (util-vserver-0.30.209) which returns:


ls: /usr/local/etc/vservers/test01/vdir//etc/init.d/rc: No such file or 
directory

Leading to a No command given; use '--help' for more information., because 
the INITCMD_STOP is empty.

When running vserver.start it seems to see the directory:

-rwxr-xr-x  1 root root 2235 Dec 13 20:11 
/usr/local/etc/vservers/test01/vdir//etc/init.d/rc


I know, I can set cmd.stop and everything works fine, but I want it to be detected automatically 
without having to set the config options myself for each guest system.


Best,

Lars

PS: I'm running the latest stable release (2.6.14.3-vs2.01, 
util-vserver-0.30.209)


Enrico Scholz wrote:

[EMAIL PROTECTED] (Lars Braeuer) writes:



I'm not sure where to mount an LVM2 device with vs2.0.  I do
not want to mount it on system boot, but when starting the
guest vserver.

The fstab file in the vserver config directory seems to be the right place.

But when including an entry like this in the fstab file, the mount
won't show up in the hostsystem and will not be accessible via the
mount point in the /vservers directory:
/dev/mapper/vg-test01   /   ext3 defaults   1 2



I would recommend to do physical mounting in the host's /etc/fstab
and bind-mount it in the vserver's fstab. E.g.

| [/etc/fstab]
| /dev/mapper/vg-test01   /srv/mnt/test01   ext3 defaults   1 2

| [/etc/vservers/.../fstab
| /srv/mnt/test01/   none   bind


This gives the advantage that the partition will be fsck'ed
during the regularly system boot and that you can share it
between multiple vservers ('mount' is allowed only once per
physical partition but you can 'mount --bind' multiple times).




But I'm able to enter the vserver with vserver test01 enter,
weird.



Expected namespace behaviour...



Enrico



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


[Vserver] When to mount lvm? (vs2.0)

2005-12-13 Thread Lars Braeuer

Hi,

I'm not sure where to mount an LVM2 device with vs2.0.
I do not want to mount it on system boot, but when starting the guest vserver.

The fstab file in the vserver config directory seems to be the right place.

But when including an entry like this in the fstab file, the mount won't show up in the hostsystem 
and will not be accessible via the mount point in the /vservers directory:

/dev/mapper/vg-test01   /   ext3 defaults   1 2
But I'm able to enter the vserver with vserver test01 enter, weird.

I also tried the prepre-start script, but it seems to be the wrong place, because it's called after 
the generateOptions function.


Any hints?

Best,

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


Re: [Vserver] When to mount lvm? (vs2.0)

2005-12-13 Thread Lars Braeuer

Chuck wrote:

On Tuesday 13 December 2005 07:38 am, Lars Braeuer wrote:


Hi,

I'm not sure where to mount an LVM2 device with vs2.0.
I do not want to mount it on system boot, but when starting the guest 


vserver.


The fstab file in the vserver config directory seems to be the right place.



good question. i run lvm2 and i have found on my system, if i want to be able 
to administer the guest directly from the host, i must mount it on boot or 
create a special script to start the guest which mounts the lvm2 mountpoint, 
then calls vserver to start the guest. if i do not do this, then i cannot 
administer the guest from the host and must enter the guest to do anything at 
all.


will be interesting to see what the gurus say :)


so you are doing it the same way, via the fstab config file?

it seems like the device is mounted right until after the vserver is up.

I included a ls -la /vservers/test01/ ; df -a in the prepre-start script and it actually outputs a 
listing of the guest system. This might be from a different ctx (i.e. 1)???
Because after the guest system is started, and I return to the normal hostsystem shell, a ls -la 
/vservers/test01 outputs an empty directory.





But when including an entry like this in the fstab file, the mount won't 


show up in the hostsystem 


and will not be accessible via the mount point in the /vservers directory:
/dev/mapper/vg-test01   /   ext3 defaults   1 2
But I'm able to enter the vserver with vserver test01 enter, weird.

I also tried the prepre-start script, but it seems to be the wrong place, 


because it's called after 


the generateOptions function.

Any hints?

Best,

Lars
___
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] Docs: Migration to 2.0

2005-12-12 Thread Lars Braeuer

hi,

added a migration section to http://linux-vserver.org/Step-by-Step+Guide+2.6

let me know if you think this is helpful. it took me some time to figure out the options needed, so 
I thought this might be helpful for other people as well!?


didn't know how to indent the code snippets so that they match the indents of 
the bullet points.

regards,

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


Re: [Vserver] Docs: Migration to 2.0

2005-12-12 Thread Lars Braeuer

Guenther Fuchs wrote:

Hi there,

on Monday, December 12, 2005 at 10:46 on the list was posted:



added a migration section to
http://linux-vserver.org/Step-by-Step+Guide+2.6

let me know if you think this is helpful.



I guess it is. IMO you should also mention to state only the nubers
into the Prefix file:
  The Prefix (i.e. /24; check [this page] for more info)
(or are both variants possible?)


a thanks. that's what I wanted to do.
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


[Vserver] vprocunhide check

2005-12-08 Thread Lars Braeuer

Hi!

Is this line in the vprocunhide init.d script supposed to check for the iattr 
feature?

$_VSERVER_INFO - FEATURE iattr || exit 0

I remember it wasn't present in older versions.

When calling vserver-info manually with these option it returns a 1 as return code. The script then 
stops. When commenting this line out, everything works fine.


I'm using util-vserver-alpha 0.30.209.


Also: One has to hide all entries by using setattr --hide --admin --~watch /proc/* (for hiding all 
entries within the vservers) before calling vprocunhide, right?


Best,

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


Re: [Vserver] vprocunhide check

2005-12-08 Thread Lars Braeuer

Herbert Poetzl wrote:

On Thu, Dec 08, 2005 at 04:18:23PM +0100, Lars Braeuer wrote:


Hi!

Is this line in the vprocunhide init.d script supposed to check for
the iattr feature?

$_VSERVER_INFO - FEATURE iattr || exit 0

I remember it wasn't present in older versions.

When calling vserver-info manually with these option it returns a 1
as return code. The script then stops. When commenting this line out,
everything works fine.

I'm using util-vserver-alpha 0.30.209.



may I ask what kernel/patch you are using?


2.4.32 with patch for 2.4.30.
I installed the alpha tools just for setattr (ProcFS security) and vprocunhide.





Also: One has to hide all entries by using setattr --hide --admin
--~watch /proc/* (for hiding all entries within the vservers) before
calling vprocunhide, right?



hmm, no, usually (i.e. the default) is to hide
all entries (valid for 2.6 kernels)


Ok, makes sense, cause I'm using the patch for 2.4 kernel which defaults to 
reveal everything.

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


Re: [Vserver] patch for linux-2.6.14.3

2005-12-07 Thread Lars Braeuer

Hi,

I'd be interessted in a 2.6.14.3 patch as well.

Tried to adapt the patch myself, but found some severe differences in several files I don't have any 
knowledge of, so I don't wanna mess up the stuff. ;)


Best,

Lars

Georges Toth wrote:

Hi Bertl,

Could you please make a patch for linux-2.6.14.3 ?


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


Re: [Vserver] uid problem after vserver update

2004-03-29 Thread Lars Braeuer
Herbert Poetzl wrote:

What would be the right formula for reassembling the id's for vs1.27 + 
quota?


currently the best format would probably be UID24/GID24 

#define  XIDINO_UID(uid, xid)  (((uid)  0xFF) | (((xid)  0xFF00)  16))
#define  XIDINO_GID(gid, xid)  (((gid)  0xFF) | (((xid)  0x00FF)  24))
which basically means that the upper 8 bit of (16 bit) xid 
go into the upper 8 bit of the (32 bit) uid, and the lower
8 bit of the xid, into the upper 8 bit of the (32 bit) gid

but probably simpler would be the transition to UID32/GID16
because in this setup, you only have to mask the 'old' uid
to 16 bit, and leave the gid untouched ...
You mean the uid will remain untouched, since the xid goes into the upper 16 bit of the gid, correct 
or am I making a mistake here?

Well if UID24/GID24 is the recommended format, then converting both values (uid/gid) should be as 
easy as converting a single one (gid), I hope. ;)

Thanks for your help.

Regards,

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


Re: [Vserver] uid problem after vserver update

2004-03-28 Thread Lars Braeuer
Herbert Poetzl wrote:

The same listing from inside the vserver (vserver name exec ls -lagn /):

...
drwxr-x---2 004096 Nov 19 02:08 service
drwxrwxrwt3 008192 Mar 27 19:45 tmp
drwxr-xr-x   14 004096 Oct 16 11:36 usr
drwxr-xr-x   20 004096 Oct 15 01:38 var
When updating to the new kernel the files with the long uid's are not 
properly mapped anymore. We noticed this because mysql wouldn't start in 
any of the 10 vservers on this system. After chown'ing the related 
mysql.pid files and directories the mysql server started. But there are 
tons of files with wrong uid's left, so this wouldn't be a solution, just a 
temporary patch.


as I see it, you have two options to migrate to 2.4.25/vs1.27

a) change the context tagging of all files to xid=0
   - this can be done on the 'old' setup by using the
 old chctx tool, or by touching each file from the
 host context (xid = 0)
   - or with tagxid disabled, using a small script, 
 reading the uid/gid, cropping them to 16 bits
   - or by doing an xid agnostic backup (tar, dump)

b) converting the partition to the new context tagging
   - again a small script, reading the uid/gid, splitting 
 it into xid/uid/gid and reassembling them to one of 
 the newer formats ...


So I would get the xid by dividing uid and gid by 65536, right?

What would be the right formula for reassembling the id's for vs1.27 + quota?

In a posting I read about three different xid tagging methods: UID32/GID16, UID24/GID24 and UID32/GID32.

I couldn't find a hint when looking at the latest quota patch.
___
Vserver mailing list
[EMAIL PROTECTED]
http://list.linux-vserver.org/mailman/listinfo/vserver


[Vserver] uid problem after vserver update

2004-03-27 Thread Lars Braeuer
I've had a problem when updating from 2.4.20ctx-17_quota to 2.4.24/vserver 1.26 (+quota) two weeks ago.

The system hasn't been able to map the long unique uid's to usernames anymore after booting the new 
kernel. For now we are using the old kernel again and I'm kind of stuck in solving this problem.

The first thing that seemed weird to me, is that when listing the files from outside the vserver, 
some files have a uid of 0 (root) and others have a long uid (i.e. 458752) which also seems to map 
to root (inside the vserver). Here's an example (listing via ls -lagn /vserver/name):

...
drwxr-x---2 458752   458752   4096 Nov 19 02:08 service/
drwxrwxrwt3 008192 Mar 27 19:45 tmp/
drwxr-xr-x   14 004096 Oct 16 11:36 usr/
drwxr-xr-x   20 004096 Oct 15 01:38 var/
The same listing from inside the vserver (vserver name exec ls -lagn /):

...
drwxr-x---2 004096 Nov 19 02:08 service
drwxrwxrwt3 008192 Mar 27 19:45 tmp
drwxr-xr-x   14 004096 Oct 16 11:36 usr
drwxr-xr-x   20 004096 Oct 15 01:38 var
When updating to the new kernel the files with the long uid's are not properly mapped anymore. We 
noticed this because mysql wouldn't start in any of the 10 vservers on this system. After chown'ing 
the related mysql.pid files and directories the mysql server started. But there are tons of files 
with wrong uid's left, so this wouldn't be a solution, just a temporary patch.

I wasn't able to test this issue anymore, because it's on a production system. I'll be starting 
another try next week, so if there are any other things I could check, please tell me.

Thanks in advance for your help.

Regards,

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