0

A ZFS is mounted in my system on /mnt/zfs.

zfs list prints:

NAME          USED  AVAIL     REFER  MOUNTPOINT
my-zfs-pool   523G   376G      523G  /mnt/zfs

I.e. this is the ZFS pool my-zfs-pool.

zpool status prints:

  pool: my-zfs-pool
 state: ONLINE
  scan: scrub repaired 0B in 0 days 00:15:03 with 0 errors on Sun Jul 12 00:39:04 2020
config:
    NAME                                    STATE     READ WRITE CKSUM
    my-zfs-pool                             ONLINE       0     0     0
      791b9bbf-a779-2a49-8648-08461ec13df7  ONLINE       0     0     0

errors: No known data errors

lsblk -f lists:

NAME        FSTYPE     LABEL             UUID                                 FSAVAIL FSUSE% MOUNTPOINT
...
sda                                                                                          
└─sda1      zfs_member my-zfs-pool       4642836688446740704                                 
...

So there I found a ZFS partition with a label my-zfs-pool, so I assume /mnt/zfs is mounted from sda1. But how do I really know?

What exactly is this identifier 791b9bbf-a779-2a49-8648-08461ec13df7? Is this an partition UUID? I cannot really find it anywhere else. The UUID of sda1 is different.

Compared to other such output from other people, e.g. here, it prints sth like ada0p3 or wwn-0x50014ee20b8b7ba0-part3, i.e. the identifier of the partition.

Albert
  • 699

1 Answers1

0

I have just looked badly. Under /dev/disk/by-partuuid/, I find 791b9bbf-a779-2a49-8648-08461ec13df7.

Now I just wonder, when this vdev / physical dev (on the partition) was created, was it a bad choice to use the partuuid as identifier? Should I have used the UUID instead?

The difference of PARTUUID vs UUID is explained here:

UUID is a filesystem-level UUID, which is retrieved from the filesystem metadata inside the partition. It can only be read if the filesystem type is known and readable.

PARTUUID is a partition-table-level UUID for the partition, a standard feature for all partitions on GPT-partitioned disks. Since it is retrieved from the partition table, ...

So it sounds like PARTUUID is probably a good choice.

lsblk --output NAME,PARTUUID,FSTYPE,LABEL,UUID,SIZE,FSAVAIL,FSUSE%,MOUNTPOINT /dev/sda shows:

NAME   PARTUUID                             FSTYPE     LABEL       UUID                                   SIZE FSAVAIL FSUSE% MOUNTPOINT
sda                                                                                                     931,5G                
└─sda1 791b9bbf-a779-2a49-8648-08461ec13df7 zfs_member my-zfs-pool 4642836688446740704                  931,5G                

How can I make lsblk show the ZFS mount point (/mnt/zfs)?

Albert
  • 699