Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Feb 2002 05:49:00 +0100
From:      Bernd Luevelsmeyer <bdluevel@heitec.net>
To:        Daniel Lang <dl@leo.org>, hubs@FreeBSD.org
Cc:        adminmail@heitec.net
Subject:   Re: FTP mirror; anonymous CVS
Message-ID:  <20020201044900.3B8C9B8101@christel.heitec.net>
References:  <20020130043616.BD197B8206@christel.heitec.net> <20020130131414.I81625@atrbg11.informatik.tu-muenchen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Lang wrote:
> 
> Hi,
> 
> some more hints:
> 
> Bernd Luevelsmeyer wrote on Wed, Jan 30, 2002 at 05:36:16AM +0100:
> [..]
> > I'm also considering to set up an anonymous CVS server. Because of the
> > CVSUP, the contents is there anyway, so it's merely a question of
> > activating the :pserver: and pointing it to the CVSUP repository. Is
> > there demand for such a server, and are there any reasons why the CVSUP
> > repository might be unsuitable as a CVSROOT?
> It's not unsuitable. But you have to take into account, that
> AnonCVS may consume lot of resources on your server.
> A checkout creates a temporary shadow directory tree, that may slow
> things down seriously.
> 
> Check the archives for postings on this list describing the
> setup of a MFS for a tempdir for that shadow tree.
> You should have plenty of memory anyway.

Yes I should ;-)

I set up a MFS of 15 MB, and promptly ran out of the 2042 inodes.
Oh well, it has 256 MB RAM so I gave it a 200 MB MFS with 350'000 inodes
and tried again. Ports are worst, checkout being slightly in front of
update. checkout needs 136 MB and 67'860 inodes, while update needs only
113 MB and 59'290 inodes. I was left with 12 MB of free RAM and a
slightly swapping machine. I had to kill apache to make it run too. I
can't do that often, it's the company's WWW and FTP server ;-)))

The temp directory will be on a real disk after all, I think ;-)


Btw I'm a little bit proud on the command line to check the /tmp size,
here it is in the entire beauty:

while true
 do
 df -ki /tmp | grep -v "^Filesystem"
 sleep 1
 done | awk '{ if(l++%10==0)
                   printf("%10s%10s%10s%10s\n",
                   "kb used","kb free","i used","i free");
               printf("%10d%10d%10d%10d\n",$3,$4,$6,$7)
             }'


> For demand I'm not sure. The last three weeks
> anoncvs.de.freebsd.org received ~800 individual connections
> requesting cvs. Of course one host/update often cause much more than
> one connection.

I'll set up the anoncvs anyway; if it's not used, it's only an entry in
inetd.conf, and that's really cheap.


In an attempt to have it *really* read-only, I set up the inetd.conf
line like this:
  cvspserver stream tcp nowait/1/5 nobody /usr/bin/cvs cvs \
  -f -R -T /var/tmp --allow-root=/home/ftp/repo pserver

$CVSROOT/CVSROOT/passwd contains several passwordless users, all aliased
to nobody:
  anonymous::nobody
  anoncvs::nobody
  cvs::nobody
  nobody::nobody

and $CVSROOT/CVSROOT/writers is an empty file.

Now my theory is that the entire cvs thing will now run as 'nobody', and
because of the -R and the existing but empty 'writers' file this nobody
surely will never even attempt to write anything. Does this sound
plausible?

(I hope the 'passwd' and 'writers' files won't get exported via CVSUP
now and mess up other people's repositories, but I tested with a client
machine and cvsup didn't fetch them.)


I'd be glad if people willing to spend the time would test the cvs
access; of course also feel free to break it, as I'm not sure I got it
right; it's only the second anonymous cvs server I set up.
Just in case someone didn't guess it, the CVSROOT is
:pserver:anoncvs@cvsup.heitec.net:/home/ftp/repo 


As for the FTP server, I put install ISO images there (mounted as vn
devices) and will put some more when I've got time to do the copying.
Compared to other servers, this isn't satisfactory at all; although it's
sufficient to get a machine installed. I'm still trying to find a good
idea how to make the most out of the limited space.


Greetings,
	Bernd

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hubs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020201044900.3B8C9B8101>