UFS is this manual partition table optimal?

Code:
$ df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ada0p2    3.9G    276M    3.3G     8%      /
devfs               1.0K    1.0K      0B        100%  /dev
/dev/ada0p5    3.9G     32M    3.5G     1%      /tmp
/dev/ada0p6    260G    7.2G    232G    3%     /usr
/dev/ada0p4    5.8G    562M    4.8G    10%    /var
Can someone look at this and tell me if this is ridiculous or not? I just took the sizes in the handbook and increased them a bit for each partition. It's basically a single user system for my own personal use. The values are rounded down/up slightly.
(4GB root /, 6GB /var, 4GB /tmp, and the rest in /usr) I have 8GB of RAM and made my swap file 16GB. Is this good or should I reinstall / re-partition with another layout?
 
Last edited by a moderator:
There is no need for separating tmp, usr, var.

This is what bsdinstall did installing 13.1-RELEASE on my laptop:
Code:
> gpart show ada0
=>       40  124243888  ada0  GPT  (59G)
         40       1024     1  freebsd-boot  (512K)
       1064  117439488     2  freebsd-ufs  (56G)
  117440552    6211584     3  freebsd-swap  (3.0G)
  123652136     591792        - free -  (289M)
 
There is no need for separating tmp, usr, var.

Hmm. I thought I'd get better performance not doing one root / partition.

For booting GPT needs either a /freebsd-boot directory or EFI partition.

Oh it's already installed / running. ->
Code:
$ gpart show ada0
=>       40  625142368  ada0  GPT  (298G)
         40       1024     1  freebsd-boot  (512K)
       1064    8387584     2  freebsd-ufs  (4.0G)
    8388648   33554432     3  freebsd-swap  (16G)
   41943080   12582912     4  freebsd-ufs  (6.0G)
   54525992    8388608     5  freebsd-ufs  (4.0G)
   62914600  562036736     6  freebsd-ufs  (268G)
  624951336     191072        - free -  (93M)
 
Last edited by a moderator:
IMHO there is not much point any more in multiple filesystems on the same disk. You're probably better off with a single zpool and do zfs create for specific datasets. That way you can use all of the space. What I have on one of my machines:

Code:
=>       40  976773088  nvd0  GPT  (466G)
         40     409600     1  efi  (200M)
     409640       1024     2  freebsd-boot  (512K)
     410664        984        - free -  (492K)
     411648    4194304     3  freebsd-swap  (2.0G)
    4605952  972167168     4  freebsd-zfs  (464G)
  976773120          8        - free -  (4.0K)
I probably should've used a larger swap space (at least as large as RAM) so that I could do core dumps.
 
Last edited by a moderator:
Hmm. I thought I'd get better performance not doing one root / partition.
Not really. With UFS, you may constrain the size of separate file systems (like those with logs). That was once considered useful to prevent run-away growth.

However, separate file systems lose you flexibility in space allocation, with the constant need to "rob Peter to pay Paul".

These days, with UFS, most people put the operating system (root, /usr, /var, /tmp, etc.) into a single file system, allowing for a single shared pool of spare space.

If you choose to use ZFS, separate file systems sharing a common pool of spare space within a pool (e.g. zroot) is part of the design, and you can apply arbitrary size limits to each file system within each pool as desired. For this reason, the default ZFS builds have lots of file systems in the zroot (many more than is usual with UFS).
 
Back
Top