Spare not being added to pool upon degredation
Description
Problem/Justification
Impact
relates to
Activity
Ryan MoellerJuly 20, 2021 at 6:39 PM
Jeff reported that everything went smoothly when he tried again using a set of matched disks for the pool and spare.
It would be nice to see middleware do the partitioning the same for both sector sizes so that a 4k native disk can replace a 4k/512b disk of the same size, but that would mean partitioning the 4k/512b disks differently, then they wouldn't be able to replace an identical disk, which is worse.
Ryan MoellerJuly 20, 2021 at 6:01 PM
Assuming the removed drive is identical to its mirror:
root@tn02a[~]# glabel status
Name Status Components
gptid/e48415f2-e8a6-11eb-9222-3cfdfe4f81c8 N/A nvd0p1
gptid/8e9f2c5e-e8ba-11eb-81b5-3cfdfe4f81c8 N/A da23p1
gptid/0fbe3ab0-e972-11eb-81b5-3cfdfe4f81c8 N/A da3p1
gptid/880b67dd-e972-11eb-81b5-3cfdfe4f81c8 N/A da4p1
gptid/88132d5e-e972-11eb-81b5-3cfdfe4f81c8 N/A da5p1
gptid/ad8b3095-e972-11eb-81b5-3cfdfe4f81c8 N/A da6p1
root@tn02a[~]# gpart show da6
=> 6 1953506635 da6 GPT (7.3T)
6 122 - free - (488K)
128 1953506513 1 freebsd-zfs (7.3T)
root@tn02a[~]# gpart show da3
=> 40 15628053088 da3 GPT (7.3T)
40 88 - free - (44K)
128 15628053000 1 freebsd-zfs (7.3T)
da3 is the remaining drive in mirror-0, da6 is the spare. They have been partitioned differently, even though they are the same size in bytes:
root@tn02a[~]# diskinfo -v da3
da3
512 # sectorsize
8001563222016 # mediasize in bytes (7.3T)
15628053168 # mediasize in sectors
4096 # stripesize
0 # stripeoffset
972801 # Cylinders according to firmware.
255 # Heads according to firmware.
63 # Sectors according to firmware.
HGST HUH728080AL5200 # Disk descr.
2EKJL84X # Disk ident.
id1,enc@n5b0bd6d1a303ecbd/type@0/slot@4/elmdesc@slot03_______ # Physical path
No # TRIM/UNMAP support
7200 # Rotation rate in RPM
Not_Zoned # Zone Mode
root@tn02a[~]# diskinfo -v da6da6
4096 # sectorsize
8001563222016 # mediasize in bytes (7.3T)
1953506646 # mediasize in sectors
0 # stripesize
0 # stripeoffset
121600 # Cylinders according to firmware.
255 # Heads according to firmware.
63 # Sectors according to firmware.
HGST HUH721008AL4205 # Disk descr.
7SHP1G9W # Disk ident.
id1,enc@n5b0bd6d1a303ecbd/type@0/slot@7/elmdesc@slot06_______ # Physical path
No # TRIM/UNMAP support
7200 # Rotation rate in RPM
Not_Zoned # Zone Mode
Different sector size is the likely culprit, but ideally we should be partitioning in a way that is tolerant to this.
Ryan MoellerJuly 20, 2021 at 4:42 PMEdited
zfsd says the spare is too small to replace the device:
root@tn02a[~]# grep zfsd /var/log/messages
Jul 20 08:57:08 tn02a 1 2021-07-20T15:57:08.036051+00:00 tn02a.qe.ixsystems.net zfsd 1191 - - Replace vdev(test1/16676033406322047726): cannot replace 16676033406322047726 with /dev/gptid/ad8b3095-e972-11eb-81b5-3cfdfe4f81c8: device is too small
TrueNAS-12.0-INTERNAL-199
Pulled drive from mirrored pool (with spare). Pool degrades, but spare never gets activated/used as a part of the pool. See screenshots.