Unable to format disk

Status
Not open for further replies.

weymouthba

Dabbler
Joined
Jun 30, 2016
Messages
11
Hi all -

I have an ESXI 6.0 server with a Dell LSI2008 in IT mode mapped to my FreeNAS VM for testing. I am attempting to create a volume using a 4 bay SAS enclosure with 4x 300GB Dell 15k 2.5" HDDs. When the machine boots I get the following errors:

Code:
(da12:mps1:0:5:0): READ(10). CDB: 28 00 22 ec b2 5b 00 00 01 00
(da12:mps1:0:5:0): CAM status: SCSI Status Error
(da12:mps1:0:5:0): SCSI status: Check Condition
(da12:mps1:0:5:0): SCSI sense: ILLEGAL REQUEST asc:20,0 (Invalid command operation code)
(da12:mps1:0:5:0): Error 22, Unretryable error


When attempting to add the disk to a new volume I get:

Code:
GEOM: da12: the secondary GPT table is corrupt or invalid.
GEOM: da12: using the primary only -- recovery suggested.


When attempting to wipe the disk I get an Operation Not Permitted error.

I can map the RAID controller to my Windows 10 and Ubuntu VMs and format the disk without any issues (NFTS / EXT4). I have wiped it using the disk utility in Ubuntu and still no luck. Does anyone have any tips on how to get this disk recognized and added to a volume?
 
Last edited by a moderator:

weymouthba

Dabbler
Joined
Jun 30, 2016
Messages
11
Mapped? Do you mean Pass-Through?

I used the colloquial term, I am utilizing DirectPath I/O to give my different virtual machines direct access to the HBA card.

I can mount the disk in my Ubuntu and Win10 VMs and write to it no problem (create / delete folders, move files in out, etc) but for whatever reason FreeNAS can't. I even created a new FreeNAS VM from scratch and the problem persisted.
 
Last edited:

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
So presuming the drive(s) do show up in FreeNAS, are you able to wipe them first?

*** Assuming that you are just setting this up and don't have any vital data on the drive(s)...

Using gpart ( gpart destroy /dev/%disk%)?

Example for da12: gpart destroy /dev/da12
 

weymouthba

Dabbler
Joined
Jun 30, 2016
Messages
11
So presuming the drive(s) do show up in FreeNAS, are you able to wipe them first?

*** Assuming that you are just setting this up and don't have any vital data on the drive(s)...

Using gpart ( gpart destroy /dev/%disk%)?

Example for da12: gpart destroy /dev/da12

I get the following error when attempting to run that command:

gpart: arg0 'da12': Invalid argument
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
da12 needs to be what you're drives are. What are your drive ids?

Sent from my Nexus 5X using Tapatalk
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215

weymouthba

Dabbler
Joined
Jun 30, 2016
Messages
11
Try it without the "/dev", like gpart destroy da12.

Again making sure that da12 is the drive you are wanting to destroy...

There isn't anything on the disk so destroying it isn't a problem. Removing /dev/ gives me a similar error:

gpart: arg0 'da12': Invalid argument
 

weymouthba

Dabbler
Joined
Jun 30, 2016
Messages
11
Opps... forgot the "-F"...
gpart destroy -F /dev/%disk%

Still getting an error, I tested on one of my other disks (da11) and the command ran successfully:

Code:
[root@xxx] ~# gpart destroy -F /dev/da12

gpart: arg0 'da12': Invalid argument
 
Last edited by a moderator:

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
That drive seems funky... Is it the same make/model as the others? Might want to connect it to a Windows machine and use "DiskPart" (and then "Clean" command) to see if you can wipe it there. Just be careful with DiskPart since choosing the incorrect disk will lead to you wiping the wrong drive and loss of data...

For example here is me wiping a USB Stick (which is a 64GB PNY) on a Win 7 Machine:
upload_2016-10-8_9-14-54.png
 

weymouthba

Dabbler
Joined
Jun 30, 2016
Messages
11
That drive seems funky... Is it the same make/model as the others? Might want to connect it to a Windows machine and use "DiskPart" (and then "Clean" command) to see if you can wipe it there. Just be careful with DiskPart since choosing the incorrect disk will lead to you wiping the wrong drive and loss of data...

For example here is me wiping a USB Stick (which is a 64GB PNY) on a Win 7 Machine:
View attachment 14074

It's different in that the old disk failed and this is the replacement. I'm sure the part # isn't the same as the other three disks but it's still a 300GB 15k SAS drive. I cleaned it but that doesn't seem to have made a difference as I still get a 'Unable to GPT partition the disk' error when attempting to add it to a volume.
 

Attachments

  • Screen Shot 2016-10-08 at 10.34.32 AM.png
    Screen Shot 2016-10-08 at 10.34.32 AM.png
    18.6 KB · Views: 843

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Got a few things for you to try in order to try an isolate the problem and a few questions as well...

1) You have never told us which version of FreeNAS you are using, so what is it?
2) Can you move the hard drive to another bay and try again?
3) Looks like you have four 300GB drives, two of which have zero free. Can you explain that?
4) Create a FreeBSD 10.3 VM and try that drive again. You already know other OS's seem to work, is it FreeNAS or FreeBSD?
5) What is the hard drive models for the failed and good drives?
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Still getting an error, I tested on one of my other disks (da11) and the command ran successfully:

[root@xxx] ~# gpart destroy -F /dev/da12

gpart: arg0 'da12': Invalid argument

I think I've seen an issue like this on the forum before. In the end the poster solved it by formatting under Windows.
 

weymouthba

Dabbler
Joined
Jun 30, 2016
Messages
11
Got a few things for you to try in order to try an isolate the problem and a few questions as well...

1) You have never told us which version of FreeNAS you are using, so what is it?
2) Can you move the hard drive to another bay and try again?
3) Looks like you have four 300GB drives, two of which have zero free. Can you explain that?
4) Create a FreeBSD 10.3 VM and try that drive again. You already know other OS's seem to work, is it FreeNAS or FreeBSD?
5) What is the hard drive models for the failed and good drives?

1) FreeNAS-9.10.1-U2
2) The problem persists
3) I tested running gpart destroy -f /dev/da11 on 3rd of the 300GB disks to make sure it worked, disk 4 is the one I am having issues with
4) Testing now
5) See attached for the devices and their model #s:

Screen Shot 2016-10-10 at 12.52.45 PM.png
 
Last edited:

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
You have one very odd problem because it appears you might have one problem dealing with the fact that the drive doesn't want to take certain commands from FreeNAS, and the second is it doesn't appear to be clearing the GPT.

One other thing to try is to run BadBlocks on the drive using the -w option (destructive test) and I'd use Ubuntu since you know that works and just see what happens. This will certainly clear the drive of all data and test the drive out at the same time.

I'm still curious if the FreeBSD 10.3 VM works or fails.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
Sorry, I have not been watching in detail, but a couple of notes:
gpart takes either path (/dev/da12) or just device name (da12).
gpart will only delete partitioning schemes if one already exists on the disk.

A GPT partitioning scheme has partition tables at the start and end of the disk. MBR partitioning only has a single table at the start of the disk. So if the GPT tables are not erased before an MBR is written, things can get interesting. The leftover backup GPT table makes a difference to tools that look for it, like gpart. The easiest way to remove that is to destroy the MBR partition, then recover the GPT partitioning, then destroy that.
 
Last edited:
Status
Not open for further replies.
Top