FreeNAS – Identifying Failed Drive in zpool

truenaszfs

I have a failed drive in a FreeNas server hosted at OVH. I need to get the drive swapped, but i'm extremely conscious of them pulling the wrong drive.

FreeNas isn't reporting any serial numbers in it's GUI. I have done the below so far, I don't know how to either get the drive serial, or better yet blink the LED?

    pool: vol0
     state: DEGRADED
    status: One or more devices could not be opened.  Sufficient replicas exist for
        the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
       see: http://illumos.org/msg/ZFS-8000-2Q
      scan: scrub repaired 0 in 15h23m with 0 errors on Sun Jul  9 23:23:55 2017
config:

    NAME                                            STATE     READ WRITE CKSUM
    vol0                                            DEGRADED     0     0     0
      mirror-0                                      DEGRADED     0     0     0
        4720622759705179538                         UNAVAIL      0    64     0  was /dev/gptid/2a4bad04-4573-11e7-bd76-001e67cb3c7a
        gptid/2af09f67-4573-11e7-bd76-001e67cb3c7a  ONLINE       0     0     0
      mirror-1                                      ONLINE       0     0     0
        gptid/2b9ad3ca-4573-11e7-bd76-001e67cb3c7a  ONLINE       0     0     0
        gptid/2c440267-4573-11e7-bd76-001e67cb3c7a  ONLINE       0     0     0
      mirror-2                                      ONLINE       0     0     0
        gptid/2ce91024-4573-11e7-bd76-001e67cb3c7a  ONLINE       0     0     0
        gptid/2d8f9a88-4573-11e7-bd76-001e67cb3c7a  ONLINE       0     0     0
      mirror-3                                      ONLINE       0     0     0
        gptid/2e376cc0-4573-11e7-bd76-001e67cb3c7a  ONLINE       0     0     0
        gptid/2edb2c23-4573-11e7-bd76-001e67cb3c7a  ONLINE       0     0     0
      mirror-4                                      ONLINE       0     0     0
        gptid/2f8402f6-4573-11e7-bd76-001e67cb3c7a  ONLINE       0     0     0
        gptid/302bfda0-4573-11e7-bd76-001e67cb3c7a  ONLINE       0     0     0
      mirror-5                                      ONLINE       0     0     0
        gptid/30d274f0-4573-11e7-bd76-001e67cb3c7a  ONLINE       0     0     0
        gptid/317ad2a6-4573-11e7-bd76-001e67cb3c7a  ONLINE       0     0     0
    logs
      gptid/cd56ac86-4576-11e7-bd76-001e67cb3c7a    ONLINE       0     0     0

Using glabel to get the device:

#glabel status | grep 2af09f67-4573-11e7-bd76-001e67cb3c7a
gptid/2af09f67-4573-11e7-bd76-001e67cb3c7a     N/A  mfisyspd5p2

What's next?

Updates:

Further reading shows that this problem would be simple if the drives were not attached to a raid controller (all be it in passthrough mode), as then smartctl would provide the information required. Using mfiutil:

#mfiutil show drives
mfi0 Physical Drives:
 9 ( 5589G) JBOD <HGST HUS726060ALS640 A2D0 serial=1EJ48KYH> SCSI-6 E1:S5
10 ( 5589G) JBOD <HGST HUS726060ALS640 A2D0 serial=1EJ49TKH> SCSI-6 E1:S2
11 ( 5589G) JBOD <HGST HUS726060ALS640 A2D0 serial=1EJ48EMH> SCSI-6 E1:S6
12 ( 5589G) JBOD <HGST HUS726060ALS640 A2D0 serial=1EJ4AS6H> SCSI-6 E1:S8
13 ( 5589G) JBOD <HGST HUS726060ALS640 A2D0 serial=1EJ49HWH> SCSI-6 E1:S9
14 ( 5589G) JBOD <HGST HUS726060ALS640 A2D0 serial=1EJ48RDH> SCSI-6 E1:S10
15 ( 5589G) JBOD <HGST HUS726060ALS640 A2D0 serial=1EJ48NVH> SCSI-6 E1:S1
16 ( 5589G) JBOD <HGST HUS726060ALS640 A2D0 serial=1EJ49T1H> SCSI-6 E1:S11
17 ( 5589G) JBOD <HGST HUS726060ALS640 A2D0 serial=1EJ48T9H> SCSI-6 E1:S4
18 ( 5589G) JBOD <HGST HUS726060ALS640 A2D0 serial=1EJ4BAMH> SCSI-6 E1:S7
19 ( 5589G) JBOD <HGST HUS726060ALS640 A2D0 serial=1EJ4A0JH> SCSI-6 E1:S3
20 ( 5589G) JBOD <HGST HUS726060ALS640 A2D0 serial=1EJ4AX8H> SCSI-6 E1:S0
21 (  149G) JBOD <INTEL SSDSC2BB16 0370 serial=BTWL340106TD160MGN> SATA E2:S4

I now have serial numbers and devices, how do i map the two together?

Best Answer

You have an LSI MegaRaid (or similar) if it's using the mfi driver. Use mfiutil:

mfiuti show drives

mfiutil locate drive on
should light the corresponding drive if possible.

FreeBSD mfiutil man page