Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Aug 1998 13:57:02 -0400 (EDT)
From:      "Robert D. Keys" <bsdbob@seedlab1.cropsci.ncsu.edu>
To:        beaupran@jsp.umontreal.ca (Spidey)
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: linking /usr/src/ to /var/ftp ?
Message-ID:  <199808211757.NAA09629@seedlab1.cropsci.ncsu.edu>
In-Reply-To: <Pine.BSF.3.96.980821080709.11471B-100000@outpost.nada.org> from Spidey at "Aug 21, 98 08:18:13 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> > If you want to set up an ftp archive site for installing FBSD, you
> > might want to do it something like this....
> > 
> > 1.  When installing the machine originaly, DO NOT put ftp in /var.
> 
> ok. How? I don't want to re-install! Where is it determined? Is it when
> ftpd is compiled? If so, how do I re-compile _only_ ftpd? I searched man
> ftpd and found nothing.

In the initial install on the machine which is to be the ftp archive
for later local ftp installs, when the setup screen in sysinstall asks
for you to set up the ftp login data, change the box that has

     /var/ftp     as the original ftp user area
to
     /home/ftp
     /usr/home/ftp    (or wherever normal login users reside)

That is the easiest way to do it.  It can be done manually after
install, but gets more complicated.  You will need to edit the
password files and then tar up ftp from var and move it to wherever
the password file points to as the correct ftp location.  Use vipw
to edit it and remake the database.

If you have a separate disk system for users and you want to keep
it separate from the usr or root trees, then hang the second drive
off /home.  If all you have is one drive, then it is unimportant
where you hang the users, so use /home or /usr/home, for example.
This is a good use for a small second drive --- a safe or portable
ftp archive playspace.

This assumes that you only want to use a small /var for its original
intended use as the variable data file system with machine dependent
data.  I don't consider something like Mr. ftp to be a machine dependent
person or login, especially if he is to hog a considerable amount of
system space allocation by mirroring a large RELEASE install tree,
for example.  If you had several disk drives to play with, then you
could put /var on one whole drive by itself and let Mr. ftp have room
to play galore.  If you only have one or two drives, then put Mr. ftp
along with the other users, if he hogs user space for things like
a whole RELEASE tree.

One could make the /var filesystem a large as necessary, but that would
waste valuable space later on if the ftp RELEASE tree were removed.
IMHO it is more workable to make Mr. ftp a normal login file system
area.  There is pro and con for that, but if it is on your local
system, and space may be tight, make Mr. ftp a normal user area and
keep the /var file system as small as possible.  That will conserve
disk space in the end.

> >     Make him located in /home or /usr/home as others, so that he has
> >     plenty of room to play in, OR, make /var plenty big to handle
> >     the RELEASE space needed (150 megs minimally, for the basic
> >     suite less all the tons of packages and ports distfiles).
> 
> The basic suite includes...? I don't think X would fit... Does somebody
> out there even _knows_ how big the ./2.2.7-RELEASE/ dir is?

The entire release LESS packages and LESS ports distfiles should be
around 130 megs.  That is kindof big for /var on a smaller system,
although I can't think of anything theoretical that says /var could
not be as big as you need.  Practically, there is a good reason
not to make /var that big.

> >     There may be pro and con for keeping ftp in var, but I have
> >     always set him up elsewhere, since I usually drop a lot of
> >     junk there for remote use.
> 
> I agree. But what are the pros and cons? Where could I find a discussion
> or tutorial on this?

I can't point to one right off, but the first thing I learned a couple
of years back, when playing with FBSD on my local servers was that
the ftp area overwhelmed /var.  I routinely keep it out of there now,
because I don't want to waste disk space in /var holding things that
may not be around long, like a whole RELEASE tree (a con).  It is more
advantageous disk space wise to put it on a large file system such as
/usr (a pro).  That way, if it changes or is deleted over time the
/var is not holding excess empty space.

> > 2.  Set up the X.X.X-RELEASE tree in /home/ftp/pub just like it is on
> >     freebsd.org (/home/ftp or /usr/home/ftp, or use a separate fs if
> >     that is workable).
> > 
> >     /home/ftp/pub/2.2.7-RELEASE/cdrom.inf
> >                                /xxxx.TXT (the install guides, etc)
> >                                /floppies
> >                                /bin
> >                                /manpages
> >                                (etc to suit)
> > 3.  Then when installing on other machines, point them to your local
> >     ftp archive box to do the install.  It works great, and I do that
> >     all the time on my home and office networks.  An install on another
> >     box takes around 15-30 minutes that way.
> 
> great!
>  
> > IF you are actually wanting to mirror the actual source tree, tar it
> > up and put in in the ftp rather than link it so you keep a pristine
> > protected source tree in /usr, IMHO. 
> 
> Yes, but isn't it bad to not have access to the /usr/src dir in case of
> a... something? If I want to recompile something, I must un-tar it, and
> move it! Isn't there a way to just link it???

The /usr/src tree is always available to Mr. Root for compiles of kernels,
etc.  I would not be of the opinion that Johnny ftp user should have clear
access to the main system sources, but rather to a copy of them.  Mr. Root
feels safer that way...  That is IMHO, .... others may feel differently.

> > The space considerations in
> > the ftp login still apply... have plenty of space available.
> 
> You see, that's the main problem. I don't have plenty of space...

If space is tight, keep /var small and put ftp on the /usr file system.
Since sources can come along in the installs, when you do the install,
then let each machine or one particular machine have an open /usr/src
tree somewhere other than /usr/src, for example in ftp/pub/usr/src.

I am sure others may have suggestions, too, well worth considering, but,
the first thing I load up on a machine are lots of spare ftp things,
that would normally overwhelm /var.  Moving ftp to elswhere on a bigger
file system seems to me the best way to go, while conserving valuable
disk space.

Good Luck

RDK


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



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