SOLVED Why "ada1" disk renamed "/dev/ada1" after replacement ?

scott.rdl

Cadet
Joined
Jun 1, 2023
Messages
2
Hello,

I've installed a PC with 5 x 16TB HDDs (Seagate Exos) mounted in RAIDZ1 (POOL1).

To test the loss of a disk, I took the ada1 disk out, and formatted it before reconnecting it to the NAS.
As expected, the volume POOL1 became DEGRADED.

To replace the disk, in shell, I entered the command :
Code:
> zpool replace POOL1 gptid/0f1fe483... ada1
which was executed successfully.

But now the ada1 disk is displayed as /dev/ada1

disks2.JPG


And in the list of disks it is displayed N/A instead of POOL1

disks.JPG


Everything in ONLINE and seems to be working correctly, but could this cause me problems later on ?
Is there anything I can do to get back to the correct configuration ?

Thanks in advance for your help.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
To replace the disk, in shell, I entered the command :
Code:
> zpool replace POOL1 gptid/0f1fe483... ada1

which was executed successfully.

Hello @scott.rdl

We recommend using the GUI process for disk replacement as outlined in the TrueNAS docs - this will ensure that the middleware is updated, and the partitions on the disks remain identical.


In your case, you may be able to correct the device name in the pool by exporting the pool (without destroying data, of course) and re-importing it again.


Cheers!
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
Remove the drive again, and replace it using the GUI. This will ensure that the drive is properly inserted and identified by gptid, not by device name.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
zpool replace POOL1 gptid/0f1fe483... ada1
Never do this. You must create a partition table and use the GPTID of the ZFS partition to refer to the device. Either use the UI for replacement which will do everything the correct way autmatically or

1. Copy partition table from a used disk to the replacement disk: gpart backup <old-disk> | gpart restore <new-disk>
2. Show partition table of replacement disk: gpart list <new-disk>
3. Find and copy the rawuuid field of the ZFS partition in the output
4. Replace the disk: zpool replace <pool> gptid/<id-of-old-disk> gptid/<id-of-new-disk>

In your case, you may be able to correct the device name in the pool by exporting the pool (without destroying data, of course) and re-importing it again.
Unfortunately not. He replaced a ZFS partition referred to by GPTID with a complete raw device without any partition table.
 

scott.rdl

Cadet
Joined
Jun 1, 2023
Messages
2
Thank you very much for this information, I now understand a little better.

For clarification I had used the shell because when I put the disk back (without partition) using the UI, it was impossible. I had a series of error messages, even if I checked "force" or wiped the disk beforehand.

Problem solved
I backed up the few important pieces of data on another NAS, then put the disk in OFFLINE mode. I then wiped the disk and replaced the disk in the pool (no error this time using the UI).
 
Top