Re: /var or /usr for data?

2007-08-25 Thread rloefgren

On Fri, 24 Aug 2007, Wojciech Puchar wrote:


It would appear that the proper allocation of filesystems on FreeBSD is
to put all data in /usr.  I'm used to this and have been doing it for
years.


my favourite proper allocation is to make ONE partition (/) and nothing 
more. and forget all problems about how to partition your drive right...

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]



I've made a quick look-see through my copies of The Complete FreeBSD and
Absolute BSD and can't find the reference, but I recall reading
somewhere in my 4.x days that FreeBSD used a different algorithm to write
to the /var directory, if it was on its own filesystem, because /var was
written to a lot (holding logs and all.) Because of this, and all the way
up to 6.2 today, I put /var on its own filesystem, after / and swap.
Where the old AIX wonks used to call the outer middle of the disk. Was
this different algorithm really the case? And, now with UFS2, is it still
the case? I still put pgsql/data on /var.

r
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /var or /usr for data?

2007-08-25 Thread Jerry McAllister
On Fri, Aug 24, 2007 at 08:20:16PM -0600, [EMAIL PROTECTED] wrote:

 On Fri, 24 Aug 2007, Wojciech Puchar wrote:
 
 It would appear that the proper allocation of filesystems on FreeBSD is
 to put all data in /usr.  I'm used to this and have been doing it for
 years.
 
 my favourite proper allocation is to make ONE partition (/) and nothing 
 more. and forget all problems about how to partition your drive right...
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 [EMAIL PROTECTED]
 
 
 I've made a quick look-see through my copies of The Complete FreeBSD and
 Absolute BSD and can't find the reference, but I recall reading
 somewhere in my 4.x days that FreeBSD used a different algorithm to write
 to the /var directory, if it was on its own filesystem, because /var was
 written to a lot (holding logs and all.) Because of this, and all the way
 up to 6.2 today, I put /var on its own filesystem, after / and swap.
 Where the old AIX wonks used to call the outer middle of the disk. Was
 this different algorithm really the case? And, now with UFS2, is it still
 the case? I still put pgsql/data on /var.

I think you may be confusing var with swap.A different algorithm is
used for managing and writing/reading swap.   I haven't heard of any
difference with /var.

jerry

 
 r
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /var or /usr for data?

2007-08-25 Thread Bill Vermillion
When asked his whereabouts on Sat, Aug 25, 2007 at 04:34 ,
[EMAIL PROTECTED] took the fifth, drank it,
and then slurred:

 Date: Fri, 24 Aug 2007 14:35:27 -0400
 From: Jerry McAllister [EMAIL PROTECTED]
 Subject: Re: /var or /usr for data?
 Content-Type: text/plain; charset=us-ascii

 On Fri, Aug 24, 2007 at 08:19:43AM +0200, Wojciech Puchar wrote:

  It would appear that the proper allocation of filesystems
  on FreeBSD is to put all data in /usr. I'm used to this and
  have been doing it for years.

  my favourite proper allocation is to make ONE partition
  m(/) and nothing ore. and forget all problems about how to
  mpartition your drive right...

 That works for some situations. But, there are protections,
 conveniences and backup efficiencies that thoughtful
 partitioning provide that all-in-one doesn't.

I've been running Unix systems for a long time.  I've noted that if
a filesystem fails - it almost invariably is /.  If you totally
trash it then you have to reload ALL the data and programs you have
on the system.

And with FBSD if you make root a reasonable size. I am running
about 250MB for / - in a server only environment.  500MB would
be safe however.

Then if something happens you can just rebuild / - or totally
reinstall the /, while NOT making new file systems on the remaining
partitions you have.

I will say that drives are more reliable than ever, but having
spent hours recovering systems [commercial ones in the past] for
someone who thought the best was to put 'all your eggs in one
basket - eg /' was the right way, I've avoided strenuously.

And applications such as MySQL give you options as to where to
store the data.  If you didn't do that during install it's quite
easy to make symlinks to point the data to an approved place
on your HD.

And IF you have a program run amock and start filling things up,
having everything on / will make recovery much harder.  However
cleaning up after one of those messes will teach you a lot.

A friend of mine has a motto of learn by destroying.  Having
a system with only / may be one step along that path :-)

Bill


-- 
Bill Vermillion - bv @ wjv . com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /var or /usr for data?

2007-08-25 Thread CyberLeo Kitsana
Wojciech Puchar wrote:
 It would appear that the proper allocation of filesystems on FreeBSD is
 to put all data in /usr.  I'm used to this and have been doing it for
 years.
 
 my favourite proper allocation is to make ONE partition (/) and
 nothing more. and forget all problems about how to partition your drive
 right...

With a single, large filesystem on /, you cannot take advantage of
things like background fsck, cuz / always needs to be checked fully
before the system goes multiuser.

A small / partition is quick to fsck, and can be kept mounted sync to
ensure consistency without harming system throughput. All the others
(/var, /usr, /foo) can be checked after the machine is live, greatly
speeding up post-crash recovery.

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
[EMAIL PROTECTED]

Furry Peace! - http://.fur.com/peace/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /var or /usr for data?

2007-08-24 Thread Wojciech Puchar

It would appear that the proper allocation of filesystems on FreeBSD is
to put all data in /usr.  I'm used to this and have been doing it for
years.


my favourite proper allocation is to make ONE partition (/) and nothing 
more. and forget all problems about how to partition your drive right...

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /var or /usr for data?

2007-08-24 Thread Jerry McAllister
On Fri, Aug 24, 2007 at 08:19:43AM +0200, Wojciech Puchar wrote:

 It would appear that the proper allocation of filesystems on FreeBSD is
 to put all data in /usr.  I'm used to this and have been doing it for
 years.
 
 my favourite proper allocation is to make ONE partition (/) and nothing 
 more. and forget all problems about how to partition your drive right...

That works for some situations.  But, there are protections, conveniences
and backup efficiencies that thoughtful partitioning provide that
all-in-one doesn't.

jerry

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /var or /usr for data?

2007-08-23 Thread Jerry McAllister
On Wed, Aug 22, 2007 at 09:51:35PM -0500, Andrew Gould wrote:

 On 8/22/07, Brad Waite [EMAIL PROTECTED] wrote:
 
  It would appear that the proper allocation of filesystems on FreeBSD is
  to put all data in /usr.  I'm used to this and have been doing it for
  years.
 
  However, there's a few issues that keep coming up.  A lot of the ports use
  /var for data dirs.  MySQL, Qmail, dspam are a few that I've had issues
  with.
 
  Is there a canonical place to put data files on a modern FreeBSD server?
  Figuring out the sizes for each partition is an exercise in frustration
  when I don't know how big /var or /usr are going to grow.
 
  For now, I've changed the default config files for MySQL and dspam to use
  /usr/local for data dirs, but is this the right thing to do?
 
  I used to put everything on /, but that created problems when I couldn't
  fsck the single large partition and I had to boot from CD to fix things.
  That's an issue when the server's not in the same state.
 
  A Solaris associate of mine is of the opinion that /usr should be able to
  be mounted RO for security purposes.  If /var was the default for all
  add-ons and data, I could see that, but that wouldn't work the ways things
  are now.
 
  I usually move the data directories (/usr/home, /usr/local/pgsql,
 /var/db/mysql, etc) to a separate, hard drive mounted at /data and create
 symbolic links back at the default locations.  If you run out of space, you
 can move the data to a larger hard drive and either adjust the links or have
 the new drive mount at /data (or wherever you choose).

Check out  man hier  for some  information on how FreeBSD wants to
use the directory structure.

Generally /usr and those under it contain utilities and /var stores
data that can change a lot.

jerry

 
 I hope this helps.
 
 Andrew
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /var or /usr for data?

2007-08-23 Thread [EMAIL PROTECTED]
On 22/08/07, Andrew Gould [EMAIL PROTECTED] wrote:
 On 8/22/07, Brad Waite [EMAIL PROTECTED] wrote:
 
  It would appear that the proper allocation of filesystems on FreeBSD is
  to put all data in /usr.  I'm used to this and have been doing it for
  years.
 
  However, there's a few issues that keep coming up.  A lot of the ports use
  /var for data dirs.  MySQL, Qmail, dspam are a few that I've had issues
  with.
 
  Is there a canonical place to put data files on a modern FreeBSD server?
  Figuring out the sizes for each partition is an exercise in frustration
  when I don't know how big /var or /usr are going to grow.
 
  For now, I've changed the default config files for MySQL and dspam to use
  /usr/local for data dirs, but is this the right thing to do?
 
  I used to put everything on /, but that created problems when I couldn't
  fsck the single large partition and I had to boot from CD to fix things.
  That's an issue when the server's not in the same state.
 
  A Solaris associate of mine is of the opinion that /usr should be able to
  be mounted RO for security purposes.  If /var was the default for all
  add-ons and data, I could see that, but that wouldn't work the ways things
  are now.
 
  I usually move the data directories (/usr/home, /usr/local/pgsql,
 /var/db/mysql, etc) to a separate, hard drive mounted at /data and create
 symbolic links back at the default locations.  If you run out of space, you
 can move the data to a larger hard drive and either adjust the links or have
 the new drive mount at /data (or wherever you choose).


I tend to support the notion of a filesystem seperate
from /usr or /var, as if the program goes wild for tequila
you won't be stuffing up a filesystem that you need to
run the operating system.  Quotas, and other such notions
might suffice, but why bother on an essentially single-
purpose system?

-- 
--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /var or /usr for data?

2007-08-22 Thread Maxim Khitrov
On 8/22/07, Brad Waite [EMAIL PROTECTED] wrote:
 It would appear that the proper allocation of filesystems on FreeBSD is
 to put all data in /usr.  I'm used to this and have been doing it for
 years.

 However, there's a few issues that keep coming up.  A lot of the ports use
 /var for data dirs.  MySQL, Qmail, dspam are a few that I've had issues
 with.

 Is there a canonical place to put data files on a modern FreeBSD server?
 Figuring out the sizes for each partition is an exercise in frustration
 when I don't know how big /var or /usr are going to grow.

 For now, I've changed the default config files for MySQL and dspam to use
 /usr/local for data dirs, but is this the right thing to do?

 I used to put everything on /, but that created problems when I couldn't
 fsck the single large partition and I had to boot from CD to fix things.
 That's an issue when the server's not in the same state.

 A Solaris associate of mine is of the opinion that /usr should be able to
 be mounted RO for security purposes.  If /var was the default for all
 add-ons and data, I could see that, but that wouldn't work the ways things
 are now.

I put all the server-related data such as databases, mail, websites,
subversion/mercurial repositories under /srv. It's part of the FHS,
but I don't think many people use it. You should not be using /usr for
this. I think of /usr as the place where software gets installed to
(and from), but there shouldn't be your own data under it with the
exception of configuration files. If I had to use something other than
/srv I would go for /var, but in my opinion that's also messy.
Especially so if you have /var/tmp on the same partition.

As far as partition sizes go, I tend to follow a rather simple model.
I give 1GB to /, even though that's usually an overkill, 2xRAM for
swap, 1-4GB for /var depending on what I plan to use the machine for,
5-20GB for /usr (20 is mostly for workstations where you plan to run
an X server with many other apps), and the rest either for /srv or
/home. For a server I use /srv, for a workstation I use /home.

- Max
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /var or /usr for data?

2007-08-22 Thread Andrew Gould
On 8/22/07, Brad Waite [EMAIL PROTECTED] wrote:

 It would appear that the proper allocation of filesystems on FreeBSD is
 to put all data in /usr.  I'm used to this and have been doing it for
 years.

 However, there's a few issues that keep coming up.  A lot of the ports use
 /var for data dirs.  MySQL, Qmail, dspam are a few that I've had issues
 with.

 Is there a canonical place to put data files on a modern FreeBSD server?
 Figuring out the sizes for each partition is an exercise in frustration
 when I don't know how big /var or /usr are going to grow.

 For now, I've changed the default config files for MySQL and dspam to use
 /usr/local for data dirs, but is this the right thing to do?

 I used to put everything on /, but that created problems when I couldn't
 fsck the single large partition and I had to boot from CD to fix things.
 That's an issue when the server's not in the same state.

 A Solaris associate of mine is of the opinion that /usr should be able to
 be mounted RO for security purposes.  If /var was the default for all
 add-ons and data, I could see that, but that wouldn't work the ways things
 are now.

 I usually move the data directories (/usr/home, /usr/local/pgsql,
/var/db/mysql, etc) to a separate, hard drive mounted at /data and create
symbolic links back at the default locations.  If you run out of space, you
can move the data to a larger hard drive and either adjust the links or have
the new drive mount at /data (or wherever you choose).

I hope this helps.

Andrew
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]