Problem creating vdev from disks used in RAID enclosure

freenas2017

Cadet
Joined
Oct 2, 2017
Messages
3
I am trying to create a new mirror vdev using disks previously used in a RAID enclosure.

In the create pool screen the drive show up with type "unknown".

I can initialize and format the drives in Windows. But Truenas does not recognize them properly. ada3 is one of the drives affected. da3 is a drive in one of the working pools. The RAID enclosure "added" the physical path and seems to have modified the cylinders and heads counts. I think the physical path is causing the problem but I don't know how to restore the disks to the original values. Any suggestions will be appreciated.

root@verger:~ # diskinfo -v ada3
ada3
512 # sectorsize
3000592982016 # mediasize in bytes (2.7T)
5860533168 # mediasize in sectors
4096 # stripesize
0 # stripeoffset
5814021 # Cylinders according to firmware.
16 # Heads according to firmware.

63 # Sectors according to firmware.
WDC WD30EFRX-68AX9N0 # Disk descr.
WD-WMC1T2265657 # Disk ident.
id1,enc@n3061686369656d30/type@0/slot@6/elmdesc@Slot_05 # Physical path
No # TRIM/UNMAP support
Unknown # Rotation rate in RPM
Not_Zoned # Zone Mode


root@verger:~ # diskinfo -v da3
da3
512 # sectorsize
3000592982016 # mediasize in bytes (2.7T)
5860533168 # mediasize in sectors
4096 # stripesize
0 # stripeoffset
364801 # Cylinders according to firmware.
255 # Heads according to firmware.

63 # Sectors according to firmware.
ATA WDC WD30EFRX-68A # Disk descr.
WD-WMC1T0527160 # Disk ident.
No # TRIM/UNMAP support
Unknown # Rotation rate in RPM
Not_Zoned # Zone Mode

System information:

TrueNAS-12.0-U2
Mainboard: ASRock Z77 Extreme 4
CPU: Intel Core i5-3550
RAM: 32 GB
data pool1: RAIDZ1: 3 x WD Red 3TB WD30EFRX
data pool2: RAIDZ1: 3 x WD Red 4TB WD40EFRX
data pool3: RAIDZ1: 3 x WD Red 6TB WD60EFRX + 3 x WD Red 3 TB WD30EFRX
boot pool: 2 x SanDisk 120G SSD
Storage controllers: 2 x IBM M1015
 

wolfman

Dabbler
Joined
Apr 11, 2018
Messages
13
Maybe worth a try - not sure if it fixes the problem. Connect the disk to another system boot with SysResCd (or another live-distro of your choice) and try the following with the disk:
Code:
sgdisk --zap-all /dev/sdX

Additionally you could overwrite the whole drive with zeros:
Code:
shred -v -n 0 -z /dev/sdX
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
I was thinking the same thing, if the drives were used in a RAID before, they probably have formatting data still on the drive. You would need to wipe the first and last sectors of the hard drive, typically it's easier (but more time consuming) to wipe the entire drive.
 

freenas2017

Cadet
Joined
Oct 2, 2017
Messages
3
Thanks for the suggestions. I will give this a try. I did delete and recreate the partition table but it did not help.
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,903
I did delete and recreate the partition table but it did not help.
That is not the same as wiping the drive.

Please check you signature, it appears the opening [spoiler] is missing.
 

freenas2017

Cadet
Joined
Oct 2, 2017
Messages
3
Maybe worth a try - not sure if it fixes the problem. Connect the disk to another system boot with SysResCd (or another live-distro of your choice) and try the following with the disk:
Code:
sgdisk --zap-all /dev/sdX

Additionally you could overwrite the whole drive with zeros:
Code:
shred -v -n 0 -z /dev/sdX

Hi wolfman and joeschmuck,

I ran both the sgdisk command and the shred command. TrueNAS still won't allow the drives to be added a pool. And the line

id1,enc@n3061686369656d30/type@0/slot@6/elmdesc@Slot_05 # Physical path

is still present on the diskinfo output and the cylinder and head counts are still different from my other "working" WD Red 3TB. I have open a problem on the Western Digital support site. Hopefully they will have something to suggest. Not that I was impressed when I contacted them in the past for drive defects but it's worth a try. Thanks again for your suggestions.
 

wolfman

Dabbler
Joined
Apr 11, 2018
Messages
13
is still present on the diskinfo output and the cylinder and head counts are still different from my other "working" WD Red 3TB.
German IT magazine c't just released an article (german & paywall) in it's latest issue, that it is not uncommon for Western Digital to have different hardware under the same model number.

It is however weird that even after shredding them you can't use them. I assume that the drives are otherwise OK (smartctl).

Is SATA-hot-plugging activated in the BIOS? From adaX and daX i assume that you use onboard-SATA and a additional controller!? Have you tried both with the disk?
 
Top