ZFS gpt and zfs

Should I run a gpart create -s gpt [I]disk[/I] if the disk is going into ZFS? And by that I mean the whole disk. I'm not about to use a partition on the disk for ZFS.
 
Last edited by a moderator:
That recommendation is slightly outdated. Time was partitioning a disk to use in a ZFS pool interfered with with the ARC mechanism, and that was the only reason for not creating partitions. That's no longer the case, so the major downside of partitioning a disk is gone. (And good thing, too, or root-on-ZFS would be impossible).

Now I can't recall where, but I read somewhere that without that major downside, it's actually preferable to partition the disks. Doing so guarantees that all data on every disk in a pool is physically aligned on the disks properly. If someone knows better than I do, then I'd be glad to be corrected.

SUPER LATE EDIT: To be clear about my second point there, the idea is that aligned partitions matter when mixing different brands and models of disk, which can have different physical layouts and almost certainly have different numbers of actual blocks/sectors. Putting partitions on the disks ensures that the data is written within sectors rather than across them, and ensures that the head of each disk operates within the same physical boundaries regardless of each disk's physical layout. All disks thereby act the same, ensuring that no one disk can serve as a performance bottleneck on the rest of the pool. But again, I have no idea where I saw that. I might be crazy.
 
But again, I have no idea where I saw that. I might be crazy.
I encountered a very funny joke with ZFS on entire disk once. When 1 of the disks in my ZFS array failed, I tried to replace it with a disk from another manufacture, but with the same capacity untill I get normal spare. To my surprise, disk from another manufacture was several Mb less! ZFS was very unhappy and me too. So, now I leave some space at the end free.
 
  • Thanks
Reactions: Oko
Hello,

For a modern x86/amd64 system usually partitions are needed only for the system to boot.

The partition itself is a very basic volume manager and ZFS is much more advanced volume manager. It does not make sense to put one volume manager on top of another right?

I agree that partitions are good for alignment when you are building RAID array, but otherwise unless you boot form these disks it makes no sense to put partitions.

And also keep in mind that partition table is one more layer that can experience corruption. Corrupted partition table leads to lost partitions which leads to lost ZFS providers.
 
Back
Top