Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Error: [MiddlewareError: Unable to GPT format the disk "ada0"]

Joined
Nov 4, 2011
Messages
3
Thanks
0
#1
I keep getting this error in the GUI. I've tried to use dd and gpart (as per the FAQ) but I can't get it to work. I'm confused as to why dd isn't working. Any insight would be greatly appreciated. The only thing about this drive is that it's on a separate controller but that shouldn't matter, especially considering it shows up.

Code:
[root@nas01] ~# ls /dev/ada
ada0%   ada1%   ada1p1% ada1p2% ada2%   ada2p1% ada2p2% ada3%   ada3p1% ada3p2% ada4%   ada4p1% ada4p2% 
[root@nas01] ~# ls /dev/ada0
/dev/ada0
[root@nas01] ~# file /dev/ada0
/dev/ada0: character special
[root@nas01] ~# file /dev/ada1
/dev/ada1: character special
[root@nas01] ~# gpart show ada0
gpart: No such geom: ada0.
[root@nas01] ~# gpart show ada1
=>        34  1465149101  ada1  GPT  (699G)
          34          94        - free -  (47K)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  1460954703     2  freebsd-zfs  (697G)

[root@nas01] ~# dd if=/dev/zero of=/dev/ada0 bs=1M count=10
dd: /dev/ada0: Operation not permitted
 

ProtoSD

FreeNAS Guru
Joined
Jul 1, 2011
Messages
3,353
Thanks
16
#2
I've noticed this happening to a few people here in the forums.

What does dmesg show for ada0?

What version of FreeNAS are you using etc.?

What kind of disk / controller are you using?
 
Joined
Nov 4, 2011
Messages
3
Thanks
0
#3
FreeNAS Build:
Code:
FreeNAS-8.0.2-RELEASE-amd64 (8288)


dmesg:
Code:
[root@nas01] ~# dmesg | grep ada0
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <WDC WD5000AADS-00S9B0 01.00A01> ATA-8da0 at umass-sim0 bus 0 scbus9 target 0 lun 0
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytescd1 at umass-sim1 bus 1 scbus10 target 0 lun 1
ada0: Command Queueing enabled
ada0: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C)


And controller:
Code:
Marvell 88SE912x AHCI SATA controller
 

William Grzybowski

FreeNAS Guru
iXsystems
Joined
May 27, 2011
Messages
1,745
Thanks
70
#4
This happens because what we call GEOM is holding the disks from some reason, it is because they are currently in use by _something_.
Something could be a geom mirror/stripe/raid3, zpool, whatever...

I suggest you first to try use Auto Import to import anything the GUI can detect, and then Destroy it, be clicking in "Export Volume" and then check the box to erase the disks...
If that doesnt work:
# sysctl kern.geom.debugflags=16

and only then "dd" the disks and reboot
 
Joined
Nov 4, 2011
Messages
3
Thanks
0
#5
Turns out the disk was somehow (maybe from some ancient FreeBSD installation) part of a gmirror config. Anyway, here's what I did and now it works great. I was able to make a volume with it in the GUI. Thanks for your helps guys!

Code:
[root@nas01] ~# gmirror status
      Name    Status  Components
mirror/gm1  DEGRADED  ada0 (ACTIVE)
[root@nas01] ~# gmirror remove -v gm1 /dev/ada0
gmirror: Not all disks connected. Try 'forget' command first.
[root@nas01] ~# gmirror forget gm1
[root@nas01] ~# gmirror remove -v gm1 /dev/ada0
Done.
[root@nas01] ~# gmirror status
[root@nas01] ~# 
 

ShinobiX9X

FreeNAS Experienced
Joined
Mar 6, 2013
Messages
141
Thanks
5
#6
hello, i kind of have the same. I want to add L2ARC, the SSD is on a separate controller (adaptec)

this is what i got:
Code:
[root@freenas ~]# dmesg | grep ada0                                           
ada0 at mvsch0 bus 0 scbus0 target 0 lun 0                                     
ada0: <KINGSTON SV300S37A60G 505ABBF0> ATA-8 SATA 3.x device                   
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)                   
ada0: Command Queueing enabled                                                 
ada0: 57241MB (117231408 512 byte sectors: 16H 63S/T 16383C)                   
ada0: Previously was known as ad4                                             
GEOM_RAID: DDF-LE: Disk ada0 state changed from NONE to ACTIVE.               
GEOM_RAID: DDF-LE: Subdisk SimpleVol:0-ada0 state changed from NONE to ACTIVE. 
[root@freenas ~]#  


What should i do?
 
Joined
May 19, 2017
Messages
4
Thanks
0
#7
This happens because what we call GEOM is holding the disks from some reason, it is because they are currently in use by _something_.
Something could be a geom mirror/stripe/raid3, zpool, whatever...

I suggest you first to try use Auto Import to import anything the GUI can detect, and then Destroy it, be clicking in "Export Volume" and then check the box to erase the disks...
If that doesnt work:
# sysctl kern.geom.debugflags=16

and only then "dd" the disks and reboot
I am a total noob and I just want to say this command
Code:
 sysctl kern.geom.debugflags=16
were the keys to the kingdom for me..

After about a week of struggling to create a volume (I ad used the dd command w/o your CL, to delete the first 512 bytes of 8 disks in my array, even used GPARTED to delete any partitions I found and mark the disk as "clean" ie no filesystem. Nothing seemed to help - I was tearing out my grey hair!

Today I booted up my FreeNAS box to try your suggestion, thinking I'd have to use the dd command to del the secondary GPT too. On a lark, I logged into the GUI and noticed my user was gone (no big deal), but I successfully created my Volume across 6 8TB drives.

So THANK YOU... you made my week!
 
Top