Re: [Vserver] vserver migration 1.2.10 > 2.0.1

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Thu 22 Dec 2005 - 15:39:06 GMT
Message-ID: <20051222153906.GA6819@MAIL.13thfloor.at>

On Thu, Dec 22, 2005 at 02:46:11PM +0100, Lars Braeuer wrote:
> 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)!?

hmm, I assume tar looks in /etc/passwd, /etc/group
without that and tries to find an user/group, which
is not there, so it uses -1 (or -2), which looks
strange to you (2^24-1 = 16777215)

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

no, in this case I'm tending to believe that the
inode data is wrong/different, but we might have
to look at a 'test' dump to figure that ...

> 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?

you could mount the partition without tagxid (which
will give you 'funny' numbers for uid and gid, and
manuall (script) remap them by applying the following
algorithm (please make that on the copy, not the
original)

 uid' = uid & 0xFFFFFF
 gid' = gid & 0xFFFFFF

> >>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.

as it is *14 not *15, please make sure that the
host where you restore the files has similar entries
in /etc/passwd and /etc/group than the original
(maybe even copy them over for the restore?)

HTH,
Herbert

> >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 mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Thu Dec 22 15:39:27 2005

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 22 Dec 2005 - 15:39:35 GMT by hypermail 2.1.8