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

Discussion in 'Bug Reporting' started by flakblas, Nov 4, 2011.

  1. flakblas New Member

    Member Since:
    Nov 4, 2011
    Message Count:
    3
    Likes Received:
    0
    Trophy Points:
    0
    flakblas, Nov 4, 2011

    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 (text):
    1. [root@nas01] ~# ls /dev/ada
    2. ada0%   ada1%   ada1p1% ada1p2% ada2%   ada2p1% ada2p2% ada3%   ada3p1% ada3p2% ada4%   ada4p1% ada4p2%
    3. [root@nas01] ~# ls /dev/ada0
    4. /dev/ada0
    5. [root@nas01] ~# file /dev/ada0
    6. /dev/ada0: character special
    7. [root@nas01] ~# file /dev/ada1
    8. /dev/ada1: character special
    9. [root@nas01] ~# gpart show ada0
    10. gpart: No such geom: ada0.
    11. [root@nas01] ~# gpart show ada1
    12. =>        34  1465149101  ada1  GPT  (699G)
    13.           34          94        - free -  (47K)
    14.          128     4194304     1  freebsd-swap  (2.0G)
    15.      4194432  1460954703     2  freebsd-zfs  (697G)
    16.  
    17. [root@nas01] ~# dd if=/dev/zero of=/dev/ada0 bs=1M count=10
    18. dd: /dev/ada0: Operation not permitted
  2. ProtoSD Active Member

    Member Since:
    Jul 1, 2011
    Message Count:
    3,359
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Nov 4, 2011

    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?
  3. flakblas New Member

    Member Since:
    Nov 4, 2011
    Message Count:
    3
    Likes Received:
    0
    Trophy Points:
    0
    flakblas, Nov 4, 2011

    FreeNAS Build:
    Code (text):
    1. FreeNAS-8.0.2-RELEASE-amd64 (8288)
    dmesg:
    Code (text):
    1. [root@nas01] ~# dmesg | grep ada0
    2. ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
    3. ada0: <WDC WD5000AADS-00S9B0 01.00A01> ATA-8da0 at umass-sim0 bus 0 scbus9 target 0 lun 0
    4. ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytescd1 at umass-sim1 bus 1 scbus10 target 0 lun 1
    5. ada0: Command Queueing enabled
    6. ada0: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C)
    And controller:
    Code (text):
    1. Marvell 88SE912x AHCI SATA controller
  4. William Grzybowski Active Member

    Member Since:
    May 27, 2011
    Message Count:
    1,657
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    Curitiba, Brazil
    William Grzybowski, Nov 4, 2011

    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
  5. flakblas New Member

    Member Since:
    Nov 4, 2011
    Message Count:
    3
    Likes Received:
    0
    Trophy Points:
    0
    flakblas, Nov 4, 2011

    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 (text):
    1. [root@nas01] ~# gmirror status
    2.       Name    Status  Components
    3. mirror/gm1  DEGRADED  ada0 (ACTIVE)
    4. [root@nas01] ~# gmirror remove -v gm1 /dev/ada0
    5. gmirror: Not all disks connected. Try 'forget' command first.
    6. [root@nas01] ~# gmirror forget gm1
    7. [root@nas01] ~# gmirror remove -v gm1 /dev/ada0
    8. Done.
    9. [root@nas01] ~# gmirror status
    10. [root@nas01] ~#
    11.  
  6. ShinobiX9X Member

    Member Since:
    Mar 6, 2013
    Message Count:
    85
    Likes Received:
    4
    Trophy Points:
    8
    ShinobiX9X, Jul 11, 2013

    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 (text):
    1. [root@freenas ~]# dmesg | grep ada0                                          
    2. ada0 at mvsch0 bus 0 scbus0 target 0 lun 0                                    
    3. ada0: <KINGSTON SV300S37A60G 505ABBF0> ATA-8 SATA 3.x device                  
    4. ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)                  
    5. ada0: Command Queueing enabled                                                
    6. ada0: 57241MB (117231408 512 byte sectors: 16H 63S/T 16383C)                  
    7. ada0: Previously was known as ad4                                            
    8. GEOM_RAID: DDF-LE: Disk ada0 state changed from NONE to ACTIVE.              
    9. GEOM_RAID: DDF-LE: Subdisk SimpleVol:0-ada0 state changed from NONE to ACTIVE.
    10. [root@freenas ~]#  
    What should i do?

Share This Page