What does this Identifier Mean/Where does it come from?

NASbox

Guru
Joined
May 8, 2012
Messages
650
This line comes from zpool history:
2023-03-16.13:19:16 zpool replace TANK 8677756399001668740 /dev/gptid/a739be20-c41e-11ed-abb3-001517d2677a
Can someone please tell me what 8677756399001668740 is/represents/Where it comes from?
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Hmmm, no idea but when I look for zpool replace in history I get 5 zpool replaces and they all have a long number attached
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
When a disk fails, the device name is replaced with the ZFS internal disk ID - which is what you see in zpool status and subsequently use in zpool replace.
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
When a disk fails, the device name is replaced with the ZFS internal disk ID - which is what you see in zpool status and subsequently use in zpool replace.
@Patrick M. Hausen Thanks for the reply. When you say device name do you mean daX, or do you mean the gptid?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
In the context of TrueNAS the GPTID. In general it could be the device name as well in ZFS.

So disk /dev/something fails - completely. It's gone for good. How should ZFS know what device that was? Devices can be reshuffled at will and the pool will continue to function because ZFS uses internal IDs to identify devices. So after the disk is gone you can refer to the "phantom disk" that needs to be replaced by its ZFS ID.

Never seen a zpool status output after a disk failure? That's where you get the ID you need for replacement.

EDIT: if you did all your replacement operations in the UI, all of this is of course hidden from you. Get it now, probably that's where the confusion comes from.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
If you look at the output from zdb -U /data/zfs/zpool.cache, you will possibly see it as the guid of one of your disks.

You will also see in that same output the "path" showing the gptid of the involved partitions for the disks.
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
Never seen a zpool status output after a disk failure? That's where you get the ID you need for replacement.

EDIT: if you did all your replacement operations in the UI, all of this is of course hidden from you. Get it now, probably that's where the confusion comes from.
Thanks @Patrick M. Hausen very much for the detailed explanation, that makes things much clearer.
I have always used the GUI for disk replacements because I didn't want to confuse FreeNAS/TrueNAS or risk messing things up. I don't remember seeing that on the zpool status output - but I wasn't looking for it, so it went unnoticed. But now that you mention it, I think I do remember seeing those numbers. I was wondering how they related to the gptid. I assume that there is no mathematical relationship between the guid and the gptid, that they are both sort of psudorandomly generated by some sort of prescribed algorithm. IIRC even windows uses the gptid.

If you look at the output from zdb -U /data/zfs/zpool.cache, you will possibly see it as the guid of one of your disks.

You will also see in that same output the "path" showing the gptid of the involved partitions for the disks.
@sretalla that's and interesting command. I see what you mean.
Code:
guid: 8337748198021967169
path: '/dev/gptid/9d392f8b-336a-11eb-a1d1-001517d2677a'
phys_path: 'id1,enc@n3061686369656d30/type@0/slot@6/elmdesc@Slot_05/p2'
 
Top