ZFS Creating a mirror zpool, good practice

Hello,

Quick question about the creation of a zfs mirror pool on the 2 new disks I just received.
I'm asking because I have read opposite opinions :

I just got two WD Ultrastar 8To disks.
Should I use the whole disks and create my pool with :
zpool create mypool mirror /dev/ada1 /dev/ada2

Or should I create GPT partition tables on each disk, with a ZFS slice on each disk and then create a pool with those 2 ZFS slices ?

I don't plan to replace those disks with something else than the same model, in case of failure.

I tend to think that using the whole disks with ZFS could be more simple.

Thanks.
 
There are indeed different opinions.

Use full disks is simpler (well, just a very little), but as you may guess there is a drawback (at least).
Most softwares (I mean disk related ones) do not understand ZFS, but all know what a GPT partition is.
Create a partition (and not a slice, beware of the words you use) is a means to protect your pool from softwares intrusion.
 
  • Like
Reactions: mer
I don't plan to replace those disks with something else than the same model, in case of failure.
The WD Ultrastar 8TB has a 5 year limited warranty, assumed the disks you have last longer than the warranty, or even they fail during warranty, you can't be sure the same model is available, or even if available, has the same size.

A slightly negative difference in size would refuse the pool to accept the disk, unless it can be forced.

IMO, the best practice is to create a GPT partition to make sure the partition size is at least the same size. If the size is larger it wouldn't be a problem.
 
So, in case of failure of 1 disk, if I replace it with a 12 GB, it will be fine if I use the whole disks.
But then, if I want to replace the other 8GB disk with a 12 GB, will I be able to expand the pool to use 12 GB ?
 
The size of a mirror is always the size of the smallest partition, so:
8T + 8T = 8T, your start situation
8T + 12T = 8T, when you replace one with a 12T drive
12T + 12T = 12T , when you replace the second 8T with another 12T

I'd recommend to create one GPT partition for each drive over the full size, with partition labels. Then create the pool over the lables, not the physical partitions, nor the drives.
This is slightly a bit more complicated (you need to read 10 minutes about it, and have two additional commands more in the shell for creating two partitions, duh!) but it will pay off when you need to replace or add drives!
 
Back
Top