Manual partitioning

You can always get a cheap $25 SSD with a 256 GB capacity to swap in and play around. Or are you not confident in your ability to do a simple hardware swap? ?
And 2TB stuff is falling in price - it's $175 on Amazon if you bother to look. FreeBSD doesn't even need that much (2TB) room, it will be happy in a 64 GB SSD.

You can do your homework all you want, it's your hardware and your money. But -
Pointing me (or anybody else) to wikipedia article is a very bad idea, I don't like it at all, is not polite (to send client to pastry to ask how is the pork-tenderloin), sorry!
Pointing people to wikipedia is the standard thing to do on these forums. We do it all the time, newbie, there's a tremendous upside to that that you're missing out on.
If you (or anybody else here) cannot tell me how to remove efi-boot-loader (safely) from first MiB of disk without damaging the disk same for using this same disk as file-storage or to use it with another OS (installing another OS on it),
If you wanna clean up the 2TB disk for FreeBSD, you can always use your Linux skills to boot a rescue disk (there's even a specialty distro called GParted for that chore :P ). Frankly, no need for that, FreeBSD 13-RELEASE makes very good use of the EFI bootloader.
 
You can always get a cheap $25 SSD with a 256 GB capacity to swap in and play around. Or are you not confident in your ability to do a simple hardware swap? ?
And 2TB stuff is falling in price - it's $175 on Amazon if you bother to look. FreeBSD doesn't even need that much (2TB) room, it will be happy in a 64 GB SSD.
Have you, this forum or wikipedia a list of manufacturer and models of NVMe using native 4k-sectors or at least let you switch the disk (the controller on those disks) to 4k?
10 years after all manufacturer sing 4k specifications... is this not strange?
I know at least one manufacturer that have such disks and one that don't have such disks but, I will not make any advertisement like you.
Pointing people to wikipedia is the standard thing to do on these forums. We do it all the time, newbie, there's a tremendous upside to that that you're missing out on.
This is an insult to anyone's intelligence that this forum is reading and, I will not comment on it further. Especially not according to all the evidence I have provided.
If you wanna clean up the 2TB disk for FreeBSD, you can always use your Linux skills to boot a rescue disk (there's even a specialty distro called GParted for that chore :p ). Frankly, no need for that, FreeBSD 13-RELEASE makes very good use of the EFI bootloader.
Parted, with GUI or not, don't understand 4k at all. All those, parted apps/program, state beginning of disk at 1024 or 2048 sector and not at 256 even by reading 4k disks.
Here and now you have proved to yourself the origin and quality of your knowledge. There is no need for further comment or proof on my part.
 
The freebsd installer for zfs is not friendly. But nor are linux installers for zfs.
My five cent, Install FreeBSD on ufs, experiment with zpool&zfs, build knowledge. Google,reddit,whatever.
PS: don't be too fixated on 4K.
 
Have you, this forum or wikipedia a list of manufacturer and models of NVMe using native 4k-sectors or at least let you switch the disk (the controller on those disks) to 4k?
I meant pull the 2TB SSD out of the case, and put in a different one. Or are you the kind who's scared of a simple hardware swap like that? I bet you can't jack up your RAM, either, and would drive for 5 hours to a Best Buy just for that chore, and blow $200 on a 4GB stick installed by a Best Buy tech who will also fish porn out of your iphone.


10 years after all manufacturer sing 4k specifications...
Any partitioning software worth its salt will let you specify 4k boundaries in software. Never gave a toot about 4k boundaries being in hardware, and got better results than you. If you're so smart, you'll know how to do the homework yourself. On these forums, we help each other do exactly that. In my case, I would have never found klarasystems.com and its treasure trove of FreeBSD-related info if somebody on these forums didn't give me a link.
 
The freebsd installer for zfs is not friendly. But nor are linux installers for zfs.
I was hoping to find out the opposite but, you're right.
My five cent, Install FreeBSD on ufs, experiment with zpool&zfs, build knowledge. Google,reddit,whatever.
I wanted to install the OS on native ZFS and not just experiment a bit with ZFS. For small experiments I can install FreNAS on USB-stick and there I have not to flickering around with the CLI.
The post #23 and wiki/manpage of bsdinstaller demonstrate the absent ability to make proper partitions-boundaries/-delimitation (KB, MB, GB instead of KiB, MiB, GiB).
This have impact on 512, 512e & 4096 and I'm stunned (as FreeBSD-newbie) to discover it.

Of course, I can make proper partitions-boundaries with sgdisk under Linux (see code-table and if it's possible at all) and modify or create BSD-installer-script but...
at this point, I can make a script, with which I am somewhat familiar, and install Linux on ZFS not starting from scratch with BSD or writing my own OS.

sgdisk partitions-code for BSD-ZFS


a501 FreeBSD boot
a504 FreeBSD ZFS
a502 FreeBSD swap
# other BSD-partitions
a503 FreeBSD UFS

PS: don't be too fixated on 4K.
Do you propose to switch my 4k-native (that has existed for 10 years) NVMe back to 30-35 years old 512?
Note: The speed of all data-carrier is specified at 4k.

Please don't get me wrong, I have nothing against you or this forum (except wikipedia links), well/only I have had greater expectations from BSD.

I thought I could do a perfect partitioning (of boot, zfs and swap) and a formatting of the boot and swap and, from this point on, the bsd-installer could take over (as with the GUI installer of Linux).

I was definitely wrong and I'm sorry to have stressed you out.

I also understand that you don't make a (real) difference between partition delimitation and formatting, but that doesn't help any of us.

I have less understanding for the use of marketing gags ("sizes" or "dimensions") such as KB, MB and GB, but that doesn't help us either.

But... i think I can guess why (the upcoming) "TrueNAS Scale" is based on Debian/Devuan. It is (apparently) easier to implement a Linux in ZFS than to eliminate all the old camels (with every kernel release).

P.S.: I need an OS to work and enjoy without SystemD with ZFS, and not to experiment or repair an OS. Not to mention the reactions of programs or desktop environments such as Dolphin or KDE5. For this I was willing to make and accept a few small changes. But, as I said, I was wrong.

I would like to thank all those who tried to help me.
 
I thought I could do a perfect partitioning (of boot, zfs and swap) and a formatting of the boot and swap and, from this point on, the bsd-installer could take over (as with the GUI installer of Linux).
That's not quite how ZFS really works. It's much easier to just let the installer use ZFS for everything. The (Boot, filesystem, swap area) idea is a Linux thing. Nothing wrong with it, but with with FreeBSD, the very design is different. There's nothing wrong with trying to swap Ext4 filesystem for ZFS, and a lot of Linux distros have put in the effort to include ZFS as an option.

FWIW, you can do the math, and specify the size of ZFS datasets to be exactly a multiple of 4k. The nice thing about ZFS is that you can do that post-install, and adjust that at any time. I'm not aware of any other filesystem that can do THAT. ZFS is a very different beast than any other filesystem. If you get a good handle on ZFS, you can recover from mistakes as easy as collapsing a fishing rod.

FreeBSD has no SystemD, it does have ZFS (In fact it was there before any Linux distro even caught wind of ZFS), and it's possible to do the whole install on just plain ZFS, no swap needed.
 
The code inside pmbr doesn't agree with that. It's really mandatory because freebsd-boot partition is loaded in x86 real-mode and you have less than 1 MiB of memory...

Code:
next_boot:    incl (%si)             # Next LBA
              adcl $0,4(%si)
              mov %es,%ax            # Adjust segment for next
              addw $SECSIZE/16,%ax   #  sector
              cmp $0x9000,%ax        # Don't load past 0x90000,
              jae err_big            #  545k should be enough for
              mov %ax,%es            #  any boot code. :)
              jmp load_boot

I remember I had 64k reserved for legacy boot, then 128k, and for 13.x it seems we need to have 128k+ (I've created 256k for a good measure).

But this code made me realize (yeah, I know this information is not something new) system won't legacy boot on native 4Kn disk (i.e. excluding 512e). I know I could use EFI or, if HW doesn't support it, other means of booting (usb,pxe..).
But still, I found it interesting, however irrelevant for this case.
 
… some experience with Linux. …

I see you using sgdisk(8).

Probably overlapping with this topic: GPT fdisk (gdisk(8)) and gpart(8) | The FreeBSD Forums tl;dr I find things such as gdisk easier to use than gpart.

Do you recommend an encrypted swap?

Yes.

Do I need an L2ARC and/or ZIL for such amount of RAM and SWAP on NVMe?

Without knowing your use case: it's hard to tell, however I imagine that with so much fast primary storage, benefits from L2ARC (on a separate device?) might be negligible.

I usually get great benefits from low-end L2ARC (two or three old USB flash drives) however my hardware is vastly inferior to yours.

OpenZFS: L2ARC: CACHE vdev devices : freebsd

My hit ratio at the time of writing is unusually low:

Code:
% date ; uptime
Sat 13 Nov 2021 07:47:58 GMT
 7:47a.m.  up 2 days,  3:13, 7 users, load averages: 0.98, 0.98, 0.86
% zpool iostat -v
                         capacity     operations     bandwidth
pool                   alloc   free   read  write   read  write
---------------------  -----  -----  -----  -----  -----  -----
Transcend               290G   174G     23      4  3.02M   536K
  gpt/Transcend         290G   174G     23      4  3.02M   536K
cache                      -      -      -      -      -      -
  gpt/cache-transcend  14.3G   198M      4      2   308K   237K
---------------------  -----  -----  -----  -----  -----  -----
august                  290G   622G     29     17  1.11M   486K
  ada0p3.eli            290G   622G     29     17  1.11M   486K
cache                      -      -      -      -      -      -
  gpt/cache-august      805M  28.0G      3      0   149K  41.0K
  gpt/duracell         2.51G  12.9G     17      0   541K  62.1K
---------------------  -----  -----  -----  -----  -----  -----
% zfs-stats -L

------------------------------------------------------------------------
ZFS Subsystem Report                            Sat Nov 13 07:48:09 2021
------------------------------------------------------------------------

L2 ARC Summary: (DEGRADED)
        Low Memory Aborts:                      3.17    k
        Free on Write:                          68.35   k
        R/W Clashes:                            32
        Bad Checksums:                          83.81   k
        IO Errors:                              3

L2 ARC Size: (Adaptive)                         17.54   GiB
        Decompressed Data Size:                 34.55   GiB
        Compression Factor:                     1.97
        Header Size:                    0.10%   36.95   MiB

L2 ARC Evicts:
        Lock Retries:                           27
        Upon Reading:                           7

L2 ARC Breakdown:                               10.75   m
        Hit Ratio:                      37.57%  4.04    m
        Miss Ratio:                     62.43%  6.71    m
        Feeds:                                  150.30  k

L2 ARC Writes:
        Writes Sent:                    100.00% 31.43   k

------------------------------------------------------------------------

% zpool status -x
all pools are healthy
% zpool status
  pool: Transcend
 state: ONLINE
  scan: scrub repaired 0B in 04:01:49 with 0 errors on Thu Sep 16 07:05:21 2021
config:

        NAME                   STATE     READ WRITE CKSUM
        Transcend              ONLINE       0     0     0
          gpt/Transcend        ONLINE       0     0     0
        cache
          gpt/cache-transcend  ONLINE       0     0     0

errors: No known data errors

  pool: august
 state: ONLINE
  scan: scrub repaired 0B in 02:45:23 with 0 errors on Thu Sep 16 05:48:48 2021
config:

        NAME                STATE     READ WRITE CKSUM
        august              ONLINE       0     0     0
          ada0p3.eli        ONLINE       0     0     0
        cache
          gpt/cache-august  ONLINE       0     0     0
          gpt/duracell      ONLINE       0     0     0

errors: No known data errors
%

Sometimes: I have no idea why an amount used drops so low, for example (above) 805 M of 28.0 G; this particular cache device was brought online more than six hours ago.

Other times: I reckon, it's simply FreeBSD not working as well as I'd like with USB. It can be quite pernickety, compared to other OSes.

Code:
% lsblk
DEVICE         MAJ:MIN SIZE TYPE                                          LABEL MOUNT
ada0             0:124 932G GPT                                               - -
  ada0p1         0:126 260M efi                                    gpt/efiboot0 -
  <FREE>         -:-   1.0M -                                                 - -
  ada0p2         0:128  16G freebsd-swap                              gpt/swap0 SWAP
  ada0p2.eli     2:68   16G freebsd-swap                                      - SWAP
  ada0p3         0:130 915G freebsd-zfs                                gpt/zfs0 <ZFS>
  ada0p3.eli     0:136 915G -                                                 - -
  <FREE>         -:-   708K -                                                 - -
da0              2:37   14G GPT                                               - -
  <FREE>         -:-   1.0M -                                                 - -
  da0p1          2:74   14G freebsd-zfs                     gpt/cache-transcend <ZFS>
da1              2:97   15G GPT                                               - -
  <FREE>         -:-   1.0M -                                                 - -
  da1p1          2:98   15G freebsd-zfs                            gpt/duracell <ZFS>
da2              2:95   29G GPT                                               - -
  da2p1          2:144  29G freebsd-zfs                        gpt/cache-august <ZFS>
da3              2:183 466G GPT                                               - -
  <FREE>         -:-   1.0M -                                                 - -
  da3p1          2:186 466G freebsd-zfs                           gpt/Transcend <ZFS>
% geom disk list da1
Geom name: da1
Providers:
1. Name: da1
   Mediasize: 16567500800 (15G)
   Sectorsize: 512
   Mode: r1w1e3
   descr: Generic Flash Disk
   ident: YTAI0012080818233298
   rotationrate: unknown
   fwsectors: 63
   fwheads: 255

% geom disk list da2
Geom name: da2
Providers:
1. Name: da2
   Mediasize: 30943995904 (29G)
   Sectorsize: 512
   Mode: r1w1e3
   descr: Kingston DataTraveler 3.0
   ident: E0D55EA1C84FF390A9500FDA
   rotationrate: unknown
   fwsectors: 63
   fwheads: 255

%

At the office, this installation of FreeBSD seems to be entirely reliable with the Kingston device in side ports of an HP 2012 120W Advanced Docking Station. With an identical dock at home, I learnt to not use the Kingston device in those ports; instead I habitually use the left rearmost port of the EliteBook 8570p.

Code:
root@mowa219-gjp4-8570p-freebsd:~ # date ; uptime ; hw-probe -all -upload
Sat Nov 13 08:07:10 GMT 2021
 8:07AM  up 2 days,  3:32, 6 users, load averages: 0.31, 0.63, 0.72
Probe for hardware ... Ok
Reading logs ... Ok
Uploaded to DB, Thank you!

Probe URL: https://bsd-hardware.info/?probe=ea51e03be6
root@mowa219-gjp4-8570p-freebsd:~ #

▶ <https://bsd-hardware.info/?probe=ea51e03be6>

… I set 1.5*RAM as swap …

Smart. I chose 16 GB swap, just rarely I wish that I had chosen more.

Code:
% sysctl hw.physmem hw.usermem vm.swap_total
hw.physmem: 17055141888
hw.usermem: 11022512128
vm.swap_total: 17179869184
%

deskutils/sysctlview may be of interest.

More generally, looking ahead:


 
Back
Top