Gentoo Archives: gentoo-user

From: Thomas Drueke <tdrueke@×××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Emerging package via NFS ?
Date: Mon, 20 Dec 2010 19:30:34
Message-Id: 4D0FAE7E.10506@gmx.net
In Reply to: Re: [gentoo-user] Emerging package via NFS ? by YoYo Siska
1 Hi,
2
3 just to let you know that approach below works for me.
4
5 I modified it slightly in that I add
6
7 mount --bind /usr/portage /mnt/other/usr/portage
8
9 to belows cmd list as machine A and B will always be synchronized.
10
11 Thanks a lot,
12 Thomas
13
14 Am 15.12.2010 10:56, schrieb YoYo Siska:
15 > On Wed, Dec 15, 2010 at 10:15:12AM +0100, Thomas Drueke wrote:
16 >> Hi,
17 >>
18 >> is it possible to emerge packages to a $ROOT directory mounted via NFS ?
19 >>
20 >> The setup is
21 >> - machine A is equipped with a Quad core CPU
22 >> - machine B is equipped with an N330 Atom-CPU
23 >> - machine A is doing the system update on a local chroot-environment
24 >> for machine B and generates binary packages. These packages are
25 >> installed on machine B using the binary package feature of portage.
26 >>
27 >> I expected that the above setup would give an performance improvement
28 >> over letting machine B do the portage update itself. However a trial run
29 >> did not show significant improvement that justifies the effort. Machine
30 >> B still needs a reasonable amount of time to fetch unpack and install
31 >> the packages.
32 >>
33 >> An alternative way might be to mount machine B's / directory via NFS
34 >> and change make.conf's $ROOT variable to that mount point.
35 >>
36 >> Does that sound as a reasonable approach ?
37 >
38 > I had a very old machine, that was really slow. Compiles could be
39 > offloaded by distcc, but even the ./configure-s and portage stuff
40 > (checking, upacking, ...) was reaaly slow...
41 >
42 > So I just used to export / through nfs, mounted it on a fast amd64 and
43 > basically did (other is the slow machine)
44 >
45 > mount other:/ /mnt/other
46 > mount -t proc proc /mnt/other/proc
47 > mount --bind /dev /mnt/other/dev
48 > mkdir /tmp/other
49 > mount --bind /tmp/other /mnt/other/var/tmp/portage
50 > mkdir /home/gentoo-other
51 > mount --bind /home/gentoo-other /mnt/other/home/gentoo
52 >
53 > linux32 chroot /mnt/other /bin/bash
54 > emerge.....
55 >
56 > For the last mkdir/mount, I have DISTDIR=/home/gentoo/distfiles and
57 > PKGDIR=/home/gentoo/packages in make.conf, you can do that with the
58 > standart /usr/portage/{distfiles,packages}
59 >
60 > This way most of the compile is done "localy" on the fast machine.
61 > yoyo
62 >
63 >
64 >>
65 >> Regards,
66 >> Thomas
67 >>
68 >
69 >
70 >
71 >