Earlier I created a new partition with FSTYPE zfs_member
, and (I think) I set the GPT partition label to the new name of the ZFS pool, and then created the ZFS pool in this partition (zpool create ... /dev/disk/by-partuuid/...
). That looks like:
$ lsblk --output NAME,FSTYPE,MODEL,LABEL,PTTYPE,SIZE -e 7
NAME FSTYPE MODEL LABEL PTTYPE SIZE
sda Samsung_SSD_860_QVO_1TB gpt 931,5G
└─sda1 zfs_member my-zfs-pool gpt 931,5G
I read in a couple of places that using a GPT partition for ZFS should be fine. In the old Sun ZFS documentation, there was a recommendation at some point to use the whole disk, but this seems to be long outdated, and esp not relevant for ZFS-on-Linux. (Some discussion about this topic: e.g. here)
Now I read that ZFS-on-Linux anyway would automatically partition the disk with GPT, if you pass a whole disk to zpool create
. (Here is an issue for an option to actually disable that auto-partition behavior.)
Note that in any case, I want to have some GPT partitioning. Because e.g. maybe I want to shrink the partition later and put other partitions on it. Or whatever. I don't think there is any good reason not to have a GPT partition table on the disk.
So I thought that the auto partitioning might be better. Maybe ZFS partitions it slightly different, for whatever clever reason, and that is maybe better. So I did that on another new disk (zpool create ... /dev/disk/by-id/...(whole-disk)
).
However, that looks like this now:
$ lsblk --output NAME,FSTYPE,MODEL,LABEL,PTTYPE,SIZE -e 7
NAME FSTYPE MODEL LABEL PTTYPE SIZE
sdb WDC_WD60EZAZ-00ZGHB0 gpt 5,5T
├─sdb1 gpt 5,5T
└─sdb9 gpt 8M
So, ZFS indeed created a GPT partition table as I wanted. However, it did not set the FSTYPE
on the partitions, nor did it set a GPT partition label.
So, now to my actual questions:
Why did it not set the FSTYPE, nor the GPT partition label?
Is it safe to set the FSTYPE afterwards? E.g. to zfs_member
?
Is it safe to set the GPT partition label afterwards? E.g. to the name of the zpool?
lsblk
,gparted
, whatever) can show me the FS type. Or maybe when I later put this disk into a new PC, and maybe I forgot what FS I had put there. Such information would be useful, I guess.