Unable to replace drive in encrypted volume

afmiller

Contributor
Joined
Dec 11, 2013
Messages
106
I offlined a bad drive, sent it out, I have the new drive today and trying to replace current one that shows offline. I am getting "Disk is not clean, partitions were found" error. Below is a pastebin of the full error. I've tried to force it as well with no luck. I must be missing something somewhere. Any help would be appreciated, Thanks!

 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
This just means you need to blank the drive: gpart destroy -F da6.
 

afmiller

Contributor
Joined
Dec 11, 2013
Messages
106
This just means you need to blank the drive: gpart destroy -F da6.

after I rebooted it, it went to da23.

got this error in the command line

root@freenas[~]# gpart destroy -F da23
gpart: Input/output error

The drive doesn't even show under gpart list. But shows under /dev/da23
 
Last edited:

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
OK, try gpart show da23. Then for each partition listed, try gpart delete -i<index of partition> da23. Once all the partitions are gone, try gpart destroy -F da23 again.
 

afmiller

Contributor
Joined
Dec 11, 2013
Messages
106
OK, try gpart show da23. Then for each partition listed, try gpart delete -i<index of partition> da23. Once all the partitions are gone, try gpart destroy -F da23 again.

root@freenas[~]# gpart show da23
=> 0 2441609216 da23 (none) (9.1T)
0 2441609216 - free - (9.1T)

and

root@freenas[~]# gpart delete -i 2441609216 da23
gpart: index '2441609216': Invalid argument
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
OK, so there aren't any partitions on the drive. You'll have to pull this drive and wipe the GPT partition table in another system. In Windows, you can do this from an admin Command Prompt to run diskpart, and then select this drive, and convert it to MBR. Then, bring the drive back to FreeNAS, and run dd if=/dev/zero of=/dev/da23 bs=512 count=1 to erase the MBR. Then this will be a completely blank disk suitable for usage in ZFS.
 
Top