Replaced a ZFS disk - however, name is now ada6, instead of gptid/<something>?

victorhooi

Contributor
Joined
Mar 16, 2012
Messages
184
I recently had to replace a failed disk on my FreeNAS 11.2 system. The disk was throwing up multiple SMART errors constantly, so I physically removed it from the powered-off system, and put in a new disk.

I then did a ZFS replace from the CLI - basically following the steps here.

https://wobblynetworks.wordpress.com/2014/12/16/how-to-replace-a-drive-in-a-zfs-pool/

Code:
root@freenas[~]# zpool status
  pool: bhyve-vms
 state: ONLINE
  scan: scrub repaired 0 in 0 days 00:01:14 with 0 errors on Sun Jun 23 00:01:14 2019
config:

    NAME                                          STATE     READ WRITE CKSUM
    bhyve-vms                                     ONLINE       0     0     0
      gptid/23aa0022-78f1-11e9-bb8f-ac1f6b4072fc  ONLINE       0     0     0

errors: No known data errors

  pool: freenas-boot
 state: ONLINE
  scan: scrub repaired 0 in 0 days 00:00:51 with 0 errors on Wed Jul 10 03:45:51 2019
config:

    NAME        STATE     READ WRITE CKSUM
    freenas-boot  ONLINE       0     0     0
      da0p2     ONLINE       0     0     0

errors: No known data errors

  pool: naulty-datastore
 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 1 days 00:46:22 with 0 errors on Mon Jun  3 00:46:25 2019
config:

    NAME                                            STATE     READ WRITE CKSUM
    naulty-datastore                                DEGRADED     0     0     0
      raidz1-0                                      DEGRADED     0     0     0
        gptid/1f335dba-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0
        gptid/22682cff-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0
        gptid/259baf96-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0
        gptid/28cd6540-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0
        gptid/2bfb1f24-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0
        17686874223424878254                        UNAVAIL      0     0     0  was /dev/gptid/2f332199-665a-11e9-a056-ac1f6b4072fc
        gptid/327a1be9-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0
        gptid/35b92bc9-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0

errors: No known data errors
root@freenas[~]# zpool offline naulty-datastore 17686874223424878254
root@freenas[~]# zpool replace naulty-datastore /dev/gptid/2f332199-665a-11e9-a056-ac1f6b4072fc /dev/ada6


However, one issue is that the name of the new disk is now "ada6", instead of a similar format to the other disks:

Code:
  pool: naulty-datastore
 state: ONLINE
  scan: resilvered 4.04T in 0 days 16:19:50 with 0 errors on Wed Jul 10 23:02:22 2019
config:

    NAME                                            STATE     READ WRITE CKSUM
    naulty-datastore                                ONLINE       0     0     0
      raidz1-0                                      ONLINE       0     0     0
        gptid/1f335dba-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0
        gptid/22682cff-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0
        gptid/259baf96-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0
        gptid/28cd6540-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0
        gptid/2bfb1f24-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0
        ada6                                        ONLINE       0     0     0
        gptid/327a1be9-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0
        gptid/35b92bc9-665a-11e9-a056-ac1f6b4072fc  ONLINE       0     0     0


Was there something wrong in my syntax? Are there some issues with a name like ada6?

Any way to fix up the naming?
 
Joined
Jul 3, 2015
Messages
926
Its because you did it from the CLI. Why did you not use the GUI?
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I then did a ZFS replace from the CLI - basically following the steps here.
Why did you follow a random blog post rather than the manual?
 

victorhooi

Contributor
Joined
Mar 16, 2012
Messages
184
At the time, the FreeNAS web UI was behaving very strangely - for example, I would try to view the Users page, and it would just spin indefinitely, before timing out (and then it gave me a FreeNAS branded screen, that said to check if NAS was available). Or pages simply would not load

I did check top, but I couldn’t see anything hogging CPU/memory - there were just a lot of Python processes (which I assume are simply related to the web UI).

I didn’t know if it was somehow related to the disk being unavailable - but I just needed to get the pool back in a healthy state ASAP. Hence, I figured the ZFS CLI would be robust and hasn’t changed much over time, so should work.

I understand that the GUI is the preferred way of interacting with FreeNAS - it’s just sometimes, if the GUI is acting up, and you need to fix something urgently or diagnose something, having a CLI is good to have.

Is there any way to rename the disk itself? Or get it consistent with the other disks?
 
Joined
Oct 18, 2018
Messages
969
Is there any way to rename the disk itself? Or get it consistent with the other disks?
Have you tried offline-ing the offending drive, wiping the drive, then marking as replace, choosing the same drive and letting it resilver? If you use the GUI to replace the drive it should give you the correct name. Of course, you've got a RAIDZ1 pool with 8 disks so if one fails while you're resilvering or if you encounter any other error you may risk your pool. This would be a situation where having a backup would be useful. :)
 
Top