'replace disk' button doesn't seem to work in truenas core 13.0-release

AlVal

Dabbler
Joined
Feb 16, 2012
Messages
15
I'm replacing a disk, have done it many times before on previous freenas and truenas versions.

now after upgrade to 13.0-release, when I hit the replace disk button, regardless of whether force is ticked, it's as if the button doesn't do anything. see video capture below:

 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Have you done a forced reload of the GUI in the browser? (usually shift+ Refresh/Reload)
 

techexec

Cadet
Joined
Aug 21, 2017
Messages
5
I have run into this same problem with TRUENAS 13-RELEASE. After selecting the defective drive and choose the replacement drive device name with force activated, nothing happens. No response at all. Reloading GUI has no effect. Re-starting server, doing a manual WIPE of the replacement device and performing the same test has no effect either. On the same system, as a test (I know not recommended), if you go to the command line and issue the replace manually there, it will work and re-silvering happens, however as expected you lose the proper formatting that happens when replace is done from the GUI. I also have a test platform with TRUENAS SCALE 22-release version and performed this same test and all is well there.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
if you go to the command line and issue the replace manually there, it will work and re-silvering happens, however as expected you lose the proper formatting that happens when replace is done from the GUI
You can quite easily recreate that formatting (assuming you are talking about the swap partition and the use of /dev/gptid/<UUID> for the disk device) on the command line.

Code:
gpart backup <existing-healthy-disk> | gpart restore <new-disk>
gpart list <new-disk>
# copy the "rawuuid" field of partition number 2
zpool replace <pool> <id-of-failed-disk> gptid/<uuid-from-above>
 

AlVal

Dabbler
Joined
Feb 16, 2012
Messages
15
You can quite easily recreate that formatting (assuming you are talking about the swap partition and the use of /dev/gptid/<UUID> for the disk device) on the command line.

Code:
gpart backup <existing-healthy-disk> | gpart restore <new-disk>
gpart list <new-disk>
# copy the "rawuuid" field of partition number 2
zpool replace <pool> <id-of-failed-disk> gptid/<uuid-from-above>
Thanks so much, but how does this apply in a scenario where I've removed a drive with read errors and have a new one (/dev/da14) sitting in its slot? I'd happily do the replace on command line if I knew what extra things truenas does other than the replace command. Where you say existing healthy disk, could I take that from any good disk in the pool? (they're all the same drive type)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Where you say existing healthy disk, could I take that from any good disk in the pool? (they're all the same drive type)
Yes. The point is to copy the partition table over, so your new disk gets the exact same partition layout as the UI would create.

So if da13 is present and of the same type, that's gpart backup da13 | gpart restore da14 to write proper partition table to your replacement disk. If the new disk is not factory new but contains some data, you need to use gpart restore -F da14 ...

Then you can use gptid/<rawuuid-of-partition-2> (output of gpart list da14) of the new disk.
For the old disk you are replacing zpool status will show you what to use. Most of the time it's just a single long number.

So that's zpool replace poolname 12345678901234567890 gptid/12345678-abcd-ef12-3456-1234567890ab in the end.

This can easily be deferred by looking at the output of zpool status and of gpart list ... :wink:
 

ValleyGeek

Cadet
Joined
Aug 28, 2022
Messages
1
I had this same issue, found another similar thread that led me to the answer:
Samuel Tai said:
Go to Storage->Disks, and select the new disk. Then click the Wipe button. A quick wipe will overwrite any existing partition table. You should be able to run the replacement procedure afterwards.

It seemed odd to me this was needed since it was a factory new disk. It would also be great to have some error or output generated noting why the button is unresponsive.

Hopefully this helps anyone else who stumbles into this.
 
Top