# (auto)ZFS on root: how do I label the ZFS partition?



## mrjayviper (Oct 29, 2018)

I have been running FreeBSD (using *UFS* on root) off a USB3 stick connected to the USB3 port of my AMD A85-based motherboard. I had an initial problem where the device names would change after installation (was installing from another USB stick). This caused the fstab not finding the partitions. but I fixed this by using labels (http://www.wonkity.com/~wblock/docs/html/labels.html).

Any ideas on how to do this on ZFS on root? Thanks


----------



## phoenix (Oct 29, 2018)

You don't label filesystems in zfs. Instead, you label the devices/partitions that you will be adding to the zfs pool. And zfs does the rest.


----------



## Phishfry (Oct 29, 2018)

Good article on using the serial number as the label.
https://blog.haraschak.com/from-dev-to-label/


----------



## mrjayviper (Oct 29, 2018)

phoenix said:


> You don't label filesystems in zfs. Instead, you label the devices/partitions that you will be adding to the zfs pool. And zfs does the rest.


The way I read you're reply it's seems I cannot use auto ZFS if I want to use labels? Correct? Thanks again


----------



## phoenix (Oct 29, 2018)

mrjayviper said:


> The way I read you're reply it's seems I cannot use auto ZFS if I want to use labels? Correct? Thanks again



To be honest, I don't know.  I've never done an "auto partition" setup ever, on any system, on any OS, regardless of the filesystem.    It's always been manual partitioning, whether it's DOS, Windows, Debian, Ubuntu, RedHat, FreeBSD, OpenBSD, etc.

And, for ZFS-based systems, I've tended to do it from the shell in the installer, as I've been running ZFS-on-root from before the installer had support for it (or I've upgraded/migrated systems from root-on-UFS-on-USB to root-on-ZFS).  Mainly because I like to use labels everywhere, from UFS labels, to GEOM-based labels (glabel), to GPT-based labels.


----------

