Question about SSD partitioning?

Hello,

Coming from the world of GNU/Linux Debian...

I would like to know if this way of partitioning disks for FreeBSD is correct:

1st Disk 256 GB (NVMe SSD):
EFI/ESP Partition
/ : 256 GB minus the ESP partition (ZFS)

2nd Disk 1 TB (NVMe SSD):
swap : 32 GB max? (because 32 GB of RAM)
/var : 100 GB.
/tmp : 100 GB.
/home : What is left of the 1 TB.

Or Will I use "Auto-ZFS" by selecting both SSDs?

Thanks in advance.
 
If you are doing "root on ZFS" you really want the installer to create the correct setup to take advantage of Boot Environments.
/tmp doesn't matter
/var does
/home does not matter
I would use the second device as ZFS vdev for /home, you could partition for swap on it, but let the installer handle /var and /tmp.

With ZFS it's trivial to add an extra pool and datasets to have /home on the second device.
 
I will use the first disk (256 GB) only in auto ZFS (EFI). You will have the default zfs datasets setup and a standard swap partition. That's enough for all, except if you want to put large data (video and so on).

On the second disk, you can create a freebsd-zfs partition and make a zfs pool for your data.
 
is correct
'correct' may not be the right term - what suits (you) best was better.

Besides those 'old, classic' partition schemes are mostly obsolote, today, especially in one, or two drive systems (I presume it's a laptop we're talking here; otherwise you may reconsider VladiBG's advice, add more drives, and do raid), you may more consider how to partitioning about backups, and migration of partitions to another, successor system, which will be primarily /home, or anything you extra create for storing your data, like /mydata, /pictures, /cider_recipes... whathaveyou.
- separate data from your system, physically, means separate drives -
I agree with mer that I would use your second 1T device for /home, and leave the rest -the system- on the first 256G drive.
/home contains your data, that's what valuable. The system is 'throw away'.

100G for /var in my eyes is overkill; 20...30 would be way more than sufficient.
But personally on that system I don't see no real benefit to create an etxra /var partition anyway. If you'd gave it its own drive, okay. Anyway I would leave \var always on the fastest drive, which I presume was your 1st 256G nda0.

I also would not do an extra partition for /tmp; if you don't keep very large amounts of data in that (within normal usage /tmp on my machine uses some M at the max, hardly 1G), you may consider to use tmpfs, move your /tmp into RAM, which is done by simply add
Code:
tmpfs                   /tmp            tmpfs   rw,mode=777     0       0
to your /etc/fstab
and
Code:
tmpfs_load="YES"
to your
/boot/loader.conf

To just give you an idea how my 256G main nda looks (I guess one silent part of the question is "how much storage capacity is to be expected to use (for what)?"):
Code:
=>       40  488397088  nda0  GPT  (233G)
         40     532480     1  efi  (260M)
     532520       1024     2  freebsd-boot  (512K)
     533544        984        - free -  (492K)
     534528   33554432     3  freebsd-swap  (16G)
   34088960  454307840     4  freebsd-zfs  (217G)
  488396800        328        - free -  (164K)
On 4 is my whole system /, /usr, and /var
While my whole system uses ~70G, and there are ~140G left free (Okay, I don't run a large DE like KDE Plasma; but even then 200G for the system (most will be in /usr) was sufficient.

32G for swap is by far way more than sufficient; I almost always chose the predefined 16G (I have 64G RAM - way too much for what I'm doing), and yet I never used any swap space at all so far. But, okay, others may tell other storys - depends on what you're going to do.
In my eyes swap is emergency reserve. If your system swaps a lot you simply have too few RAM for what your doing with the machine (The 90s with slide-show Windows, and HDDs begging for mercy are over 😁.)
 
I agree with mer that I would use your second 1T device for /home, and leave the rest -the system- on the first 256G drive.
/home contains your data, that's what valuable. The rest is 'throw away'.
I have been following this for a long time. /home on separate device from system (starting with UFS), migrated to ZFS then ZFS mirror, then swapping in bigger devices on the mirror. I think I started this around FreeBSD V5.x
 
Back
Top