partitioning with more mount points on obsd51

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

partitioning with more mount points on obsd51

Darrel-11
We have less limitation on partitioning these days, so /usr/obj
was obvious- actually had that one before.  I chose /usr/src and
/usr/local as well, and expect that this was unimportant unless
moving into NFS or some special circumstance.

I have looked at some of the things that folks are doing with /var
on ZFS.  I understand that ZFS is not within the scope of this
list; however, does anyone have some neat ideas about partitions
under /var?

Particularly, I am interested in /var/crash, /var/tmp, and /tmp.
I would not personally have any use for a crashdump, unless it
would be to pass it along to someone who could make use of it.  I
basically want the partitions to be set up logically.

Typically etc, usr, tmp, var, home, and / have been enough.  /usr/obj
is an excellent addition and so does someone have recommendations
of further refining my scheme for OpenBSD51?

I used /altroot for the first time on OpenBSD50, but had to modify
fstab like this:
#bb128e900f20094a.d /altroot ffs xx 0 0
/dev/wd0d /altroot ffs xx 0 0

I guess that /var/crash should be crafted to memory and that /var/tmp as well
as /tmp can actually be very small?

Darrel

Reply | Threaded
Open this post in threaded view
|

Re: partitioning with more mount points on obsd51

Francois Pussault-2
> ----------------------------------------
> From: Darrel <[hidden email]>
> Sent: Tue Jun 26 20:58:20 CEST 2012
> To: <[hidden email]>
> Subject: partitioning with more mount points on obsd51
>
>
> We have less limitation on partitioning these days, so /usr/obj
> was obvious- actually had that one before.  I chose /usr/src and
> /usr/local as well, and expect that this was unimportant unless
> moving into NFS or some special circumstance.
>
> I have looked at some of the things that folks are doing with /var
> on ZFS.  I understand that ZFS is not within the scope of this
> list; however, does anyone have some neat ideas about partitions
> under /var?
>
> Particularly, I am interested in /var/crash, /var/tmp, and /tmp.
> I would not personally have any use for a crashdump, unless it
> would be to pass it along to someone who could make use of it.  I
> basically want the partitions to be set up logically.
>
> Typically etc, usr, tmp, var, home, and / have been enough.  /usr/obj
> is an excellent addition and so does someone have recommendations
> of further refining my scheme for OpenBSD51?
>
> I used /altroot for the first time on OpenBSD50, but had to modify
> fstab like this:
> #bb128e900f20094a.d /altroot ffs xx 0 0
> /dev/wd0d /altroot ffs xx 0 0
>
> I guess that /var/crash should be crafted to memory and that /var/tmp as well
> as /tmp can actually be very small?
>
> Darrel
>

Hi,

Yeah /var, /var/tmp, & /tmp should be very small, as far as you make "classical" use of your machine.
For example on very low performance machine I use about 128/256Mo at most for it all !

Reply | Threaded
Open this post in threaded view
|

Re: partitioning with more mount points on obsd51

Norman Golisz-3
In reply to this post by Darrel-11
Hi Darrel,

On Tue Jun 26 2012 14:58, Darrel wrote:
> We have less limitation on partitioning these days, so /usr/obj
> was obvious- actually had that one before.  I chose /usr/src and
> /usr/local as well, and expect that this was unimportant unless
> moving into NFS or some special circumstance.

no, this isn't necessarily true. Think of FFS' block alignment feature,
using different mount options, file system optimisations, etc.

> I have looked at some of the things that folks are doing with /var
> on ZFS.  I understand that ZFS is not within the scope of this
> list; however, does anyone have some neat ideas about partitions
> under /var?
>
> Particularly, I am interested in /var/crash, /var/tmp, and /tmp.
> I would not personally have any use for a crashdump, unless it
> would be to pass it along to someone who could make use of it.  I
> basically want the partitions to be set up logically.
>
> Typically etc, usr, tmp, var, home, and / have been enough.  /usr/obj
> is an excellent addition and so does someone have recommendations
> of further refining my scheme for OpenBSD51?
>
> I used /altroot for the first time on OpenBSD50, but had to modify
> fstab like this:
> #bb128e900f20094a.d /altroot ffs xx 0 0
> /dev/wd0d /altroot ffs xx 0 0
>
> I guess that /var/crash should be crafted to memory and that

Hmm. No. Be aware that the kernel dumps the entire physical memory to
swap. When rebooting, savecore(8) copies the dump to /var/crash.
Therefore, it needs to be at least as big as available system RAM + a
few bits more. You see why mfs is not suited for this.

> /var/tmp as well as /tmp can actually be very small?

Yes, they can. But it depends on your setup. See, /tmp can become scarce
when your web browser stores its temporary data there, e.g. video data.
And, one further hint, you should place /var/tmp on non-volatile
storage, as it is supposed to hold temporary data between reboots,
whereas /tmp can safely be an mfs.

My imperfect configuration looks like this:

~ $ df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd2a      509M   64.0M    420M    13%    /
/dev/sd2p     44.8G   29.1G   13.5G    68%    /home
/dev/sd2d     1001M    793M    158M    83%    /usr
/dev/sd2e      502M    196M    281M    41%    /usr/X11R6
/dev/sd2f      6.9G    2.7G    3.8G    42%    /usr/local
/dev/sd2i      2.0G    1.1G    812M    58%    /usr/obj
/dev/sd2k      4.9G    384M    4.3G     8%    /usr/ports
/dev/sd2l      3.9G   87.4M    3.7G     2%    /usr/ports/pobj
/dev/sd2g      2.9G    890M    1.9G    31%    /usr/src
/dev/sd2h      2.0G    552M    1.3G    29%    /usr/xenocara
/dev/sd2j      2.0G    495M    1.4G    26%    /usr/xobj
/dev/sd2m      123M   17.4M   99.8M    15%    /var
/dev/sd2o      246M    5.1M    229M     2%    /var/log
/dev/sd2n      123M   96.0K    117M     0%    /var/tmp
mfs:4517       495M    109K    470M     0%    /tmp

Yours,
Norman.

Reply | Threaded
Open this post in threaded view
|

Re: partitioning with more mount points on obsd51

Michał Markowski
In reply to this post by Darrel-11
2012/6/26 Darrel <[hidden email]>:
> does anyone have some neat ideas about partitions under /var?

Are you familiar with FAQ?
http://openbsd.org/faq/faq4.html#Partitioning

--
Michał Markowski

Reply | Threaded
Open this post in threaded view
|

Re: partitioning with more mount points on obsd51

Stuart Henderson
In reply to this post by Norman Golisz-3
On 2012-06-26, Norman Golisz <[hidden email]> wrote:
> /dev/sd2o      246M    5.1M    229M     2%    /var/log

useful one this, to protect your system logs against things like too
much disk space taken by email/databases/etc.

Reply | Threaded
Open this post in threaded view
|

Re: partitioning with more mount points on obsd51

Darrel-11
In reply to this post by Norman Golisz-3
On Tue, 26 Jun 2012, Norman Golisz wrote:

> Hi Darrel,
>
> On Tue Jun 26 2012 14:58, Darrel wrote:
>> We have less limitation on partitioning these days, so /usr/obj
>> was obvious- actually had that one before.  I chose /usr/src and
>> /usr/local as well, and expect that this was unimportant unless
>> moving into NFS or some special circumstance.
>
> no, this isn't necessarily true. Think of FFS' block alignment feature,
> using different mount options, file system optimisations, etc.
>
>> I have looked at some of the things that folks are doing with /var
>> on ZFS.  I understand that ZFS is not within the scope of this
>> list; however, does anyone have some neat ideas about partitions
>> under /var?
>>
>> Particularly, I am interested in /var/crash, /var/tmp, and /tmp.
>> I would not personally have any use for a crashdump, unless it
>> would be to pass it along to someone who could make use of it.  I
>> basically want the partitions to be set up logically.
>>
>> Typically etc, usr, tmp, var, home, and / have been enough.  /usr/obj
>> is an excellent addition and so does someone have recommendations
>> of further refining my scheme for OpenBSD51?
>>
>> I used /altroot for the first time on OpenBSD50, but had to modify
>> fstab like this:
>> #bb128e900f20094a.d /altroot ffs xx 0 0
>> /dev/wd0d /altroot ffs xx 0 0
>>
>> I guess that /var/crash should be crafted to memory and that
>
> Hmm. No. Be aware that the kernel dumps the entire physical memory to
> swap. When rebooting, savecore(8) copies the dump to /var/crash.
> Therefore, it needs to be at least as big as available system RAM + a
> few bits more. You see why mfs is not suited for this.
>
>> /var/tmp as well as /tmp can actually be very small?
>
> Yes, they can. But it depends on your setup. See, /tmp can become scarce
> when your web browser stores its temporary data there, e.g. video data.
> And, one further hint, you should place /var/tmp on non-volatile
> storage, as it is supposed to hold temporary data between reboots,
> whereas /tmp can safely be an mfs.
>
> My imperfect configuration looks like this:
>
> ~ $ df -h
> Filesystem     Size    Used   Avail Capacity  Mounted on
> /dev/sd2a      509M   64.0M    420M    13%    /
> /dev/sd2p     44.8G   29.1G   13.5G    68%    /home
> /dev/sd2d     1001M    793M    158M    83%    /usr
> /dev/sd2e      502M    196M    281M    41%    /usr/X11R6
> /dev/sd2f      6.9G    2.7G    3.8G    42%    /usr/local
> /dev/sd2i      2.0G    1.1G    812M    58%    /usr/obj
> /dev/sd2k      4.9G    384M    4.3G     8%    /usr/ports
> /dev/sd2l      3.9G   87.4M    3.7G     2%    /usr/ports/pobj
> /dev/sd2g      2.9G    890M    1.9G    31%    /usr/src
> /dev/sd2h      2.0G    552M    1.3G    29%    /usr/xenocara
> /dev/sd2j      2.0G    495M    1.4G    26%    /usr/xobj
> /dev/sd2m      123M   17.4M   99.8M    15%    /var
> /dev/sd2o      246M    5.1M    229M     2%    /var/log
> /dev/sd2n      123M   96.0K    117M     0%    /var/tmp
> mfs:4517       495M    109K    470M     0%    /tmp
>

Thank you, Norman.

I plan to borrow some of this.  I have been slow this time- most machines
are getting a fresh reinstall.

My 5.0 boxes have 3g on /usr/obj and 2g on /usr/src.

I tend to get old computers from folks that upgrade and actually have a
DNS Server running on an Intel built for windows95.  :)

And for the sake of comparison, I have a FreeBSD machine with ZFS
filesystem mostly backup up video and it looks like this:

(70) @ 23:39:38> zfs list
NAME                 USED  AVAIL  REFER  MOUNTPOINT
bigD                32.8G  37.6G   672M  /
bigD/swap           4.13G  41.7G  57.1M  -
bigD/tmp              44K  37.6G    44K  /tmp
bigD/usr            27.8G  37.6G   312M  /usr
bigD/usr/distfiles    31K  37.6G    31K  /usr/distfiles
bigD/usr/home       23.9G  37.6G  23.9G  /usr/home
bigD/usr/local       421M  37.6G   421M  /usr/local
bigD/usr/obj        2.44G  37.6G  2.44G  /usr/obj
bigD/usr/packages     31K  37.6G    31K  /usr/packages
bigD/usr/ports       435M  37.6G   435M  /usr/ports
bigD/usr/src         351M  37.6G   351M  /usr/src
bigD/var             156M  37.6G  1.28M  /var
bigD/var/backups    1.04M  37.6G  1.04M  /var/backups
bigD/var/crash      31.5K  37.6G  31.5K  /var/crash
bigD/var/db          153M  37.6G   152M  /var/db
bigD/var/db/pkg     1.30M  37.6G  1.30M  /var/db/pkg
bigD/var/empty        31K  37.6G    31K  /var/empty
bigD/var/mail         31K  37.6G    31K  /var/mail
bigD/var/run          55K  37.6G    55K  /var/run
bigD/var/tmp          32K  37.6G    32K  /var/tmp

Darrel

Reply | Threaded
Open this post in threaded view
|

Re: partitioning with more mount points on obsd51

Darrel-11
In reply to this post by Francois Pussault-2
>> We have less limitation on partitioning these days, so /usr/obj
>> was obvious- actually had that one before.  I chose /usr/src and
>> /usr/local as well, and expect that this was unimportant unless
>> moving into NFS or some special circumstance.
>>
>> I have looked at some of the things that folks are doing with /var
>> on ZFS.  I understand that ZFS is not within the scope of this
>> list; however, does anyone have some neat ideas about partitions
>> under /var?
>>
>> Particularly, I am interested in /var/crash, /var/tmp, and /tmp.
>> I would not personally have any use for a crashdump, unless it
>> would be to pass it along to someone who could make use of it.  I
>> basically want the partitions to be set up logically.
>>
>> Typically etc, usr, tmp, var, home, and / have been enough.  /usr/obj
>> is an excellent addition and so does someone have recommendations
>> of further refining my scheme for OpenBSD51?
>>
>> I used /altroot for the first time on OpenBSD50, but had to modify
>> fstab like this:
>> #bb128e900f20094a.d /altroot ffs xx 0 0
>> /dev/wd0d /altroot ffs xx 0 0
>>
>> I guess that /var/crash should be crafted to memory and that /var/tmp as well
>> as /tmp can actually be very small?
>>
>> Darrel
>>
>
> Hi,
>
> Yeah /var, /var/tmp, & /tmp should be very small, as far as you make "classical" use of your machine.
> For example on very low performance machine I use about 128/256Mo at most for it all !
>
>

Thank you, Francois.

This one is actually a Windows95 Intel now running FreeBSD9.  My sister's
friend did not want Windows95 any longer:

Disk status:
Filesystem    Size    Used   Avail Capacity  Mounted on
/dev/ada0a    755M    394M    300M    57%    /
devfs         1.0k    1.0k      0B   100%    /dev
/dev/ada0d     29M    4.1M     22M    15%    /tmp
/dev/ada0e    393M    4.8M    357M     1%    /var
/dev/ada0f    5.9G    3.8G    1.6G    70%    /usr
/dev/ada0g    1.6G    200M    1.3G    13%    /home

I probably should have made /home smaller and increased /var.

It has used some swap:

last pid: 69956;  load averages:  0.00,  0.00,  0.01   up 13+05:43:32
03:37:09
27 processes:  1 running, 26 sleeping
CPU:  0.0% user,  0.0% nice,  0.4% system,  1.1% interrupt, 98.5% idle
Mem: 21M Active, 36M Inact, 41M Wired, 4752K Cache, 21M Buf, 4720K Free
Swap: 768M Total, 15M Used, 752M Free, 2% Inuse

Darrel

Reply | Threaded
Open this post in threaded view
|

Re: partitioning with more mount points on obsd51

Darrel-11
In reply to this post by Michał Markowski
Darrel

On Tue, 26 Jun 2012, Micha? Markowski wrote:

> 2012/6/26 Darrel <[hidden email]>:
>> does anyone have some neat ideas about partitions under /var?
>
> Are you familiar with FAQ?
> http://openbsd.org/faq/faq4.html#Partitioning
>

Good point, Micha.

I should consider /var/www

Thank you,
Darrel

Reply | Threaded
Open this post in threaded view
|

Re: partitioning with more mount points on obsd51

Norman Golisz-3
In reply to this post by Darrel-11
> I tend to get old computers from folks that upgrade and actually
> have a DNS Server running on an Intel built for windows95.  :)

Yeah, BSDs deal fine with old computers and limited resources. I love
that, too. :)

> And for the sake of comparison, I have a FreeBSD machine with ZFS
> filesystem mostly backup up video and it looks like this:
>
> (70) @ 23:39:38> zfs list
> NAME                 USED  AVAIL  REFER  MOUNTPOINT
> bigD                32.8G  37.6G   672M  /
> bigD/swap           4.13G  41.7G  57.1M  -
> bigD/tmp              44K  37.6G    44K  /tmp
> bigD/usr            27.8G  37.6G   312M  /usr
> bigD/usr/distfiles    31K  37.6G    31K  /usr/distfiles
> bigD/usr/home       23.9G  37.6G  23.9G  /usr/home
> bigD/usr/local       421M  37.6G   421M  /usr/local
> bigD/usr/obj        2.44G  37.6G  2.44G  /usr/obj
> bigD/usr/packages     31K  37.6G    31K  /usr/packages
> bigD/usr/ports       435M  37.6G   435M  /usr/ports
> bigD/usr/src         351M  37.6G   351M  /usr/src
> bigD/var             156M  37.6G  1.28M  /var
> bigD/var/backups    1.04M  37.6G  1.04M  /var/backups
> bigD/var/crash      31.5K  37.6G  31.5K  /var/crash
> bigD/var/db          153M  37.6G   152M  /var/db
> bigD/var/db/pkg     1.30M  37.6G  1.30M  /var/db/pkg
> bigD/var/empty        31K  37.6G    31K  /var/empty
> bigD/var/mail         31K  37.6G    31K  /var/mail
> bigD/var/run          55K  37.6G    55K  /var/run
> bigD/var/tmp          32K  37.6G    32K  /var/tmp

Interesting. Depending on purpose, I also dedicate /var/www, /var/named,
and everything chroot'ed. And, *if* useful, you can also optimise their
filesystem parameters according to the expected utilisation (many small
files, fast seek times, big chunks of data, high throughput?). Note,
however, most of the time the defaults are just fine, since reasonable
metrics are applied to them anyway.
And, if you're going to build your own releases on OpenBSD, you might
want to plan another 2 GBs for the destination paths /usr/dest,
/usr/rel, each.

Norman