Error: Unable to GPT format the disk "da0"

DeWebDude

Explorer
Joined
Nov 2, 2015
Messages
52
Hello All,

I have seen this error in a few places on the forum, but not really seen an answer to get around it.
I figure there could be something unique in each case so I will provide some details in hoping to resolve the issue.

Setup an HP DL160 G6 with an LSI 9211-4i using 4 x 3TB HGST SAS Drives, the server happens to also have the model SE316M1 which is the same as the DL160.
In the process of preparing the volume for FreeNAS I receive the dreaded Error: Unable to GPT format the disk "da0"

Any pointers would be appreciated!
 
Last edited by a moderator:

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
I found a bug today that might be related. Was there GPT formatting on that disk before this use?
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
Sometimes manufacturers have test data on a drive, but never mind that now.

Is there any data on the system yet? Or can we try something?
 

CraigD

Patron
Joined
Mar 8, 2016
Messages
343
I had this error in the past

I just put the drives in my windows machine, and deleted the partitions

Have Fun
 

DeWebDude

Explorer
Joined
Nov 2, 2015
Messages
52
I can't even get the drive to do anything at the freebsd level.

Her is what I see, this is blank is it not? (more of a linux and fdisk person)
Code:
[root@freenas] ~# gpart show da0
=>		 0  5860533168  da0  (none)  (2.7T)
		   0  5860533168	   - free -  (2.7T)

I try to create partition and I get this:
Code:
[root@freenas] ~# gpart create -s gpt da0
gpart: Invalid argument
 
Last edited by a moderator:

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
No, that is not quite blank. But please answer the question in post #4. And please use code tags around screen output as shown below.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
Excellent! Please post the output of diskinfo -v /dev/da0. This can be run from the Shell mode of the installer.
 

DeWebDude

Explorer
Joined
Nov 2, 2015
Messages
52
Here is the result for the 4 Disks, thanks for working with me!
Code:
[root@freenas] ~# diskinfo -v /dev/da0
/dev/da0
		512			 # sectorsize
		3000592982016   # mediasize in bytes (2.7T)
		5860533168	  # mediasize in sectors
		0			   # stripesize
		0			   # stripeoffset
		364801		  # Cylinders according to firmware.
		255			 # Heads according to firmware.
		63			  # Sectors according to firmware.
				YVGYJB0K		# Disk ident.

[root@freenas] ~# diskinfo -v /dev/da1
/dev/da1
		512			 # sectorsize
		3000592982016   # mediasize in bytes (2.7T)
		5860533168	  # mediasize in sectors
		0			   # stripesize
		0			   # stripeoffset
		364801		  # Cylinders according to firmware.
		255			 # Heads according to firmware.
		63			  # Sectors according to firmware.
				YVGLP72D		# Disk ident.

[root@freenas] ~# diskinfo -v /dev/da2
/dev/da2
		512			 # sectorsize
		3000592982016   # mediasize in bytes (2.7T)
		5860533168	  # mediasize in sectors
		0			   # stripesize
		0			   # stripeoffset
		364801		  # Cylinders according to firmware.
		255			 # Heads according to firmware.
		63			  # Sectors according to firmware.
				YVHW5H4D		# Disk ident.

[root@freenas] ~# diskinfo -v /dev/da3
/dev/da3
		512			 # sectorsize
		3000592982016   # mediasize in bytes (2.7T)
		5860533168	  # mediasize in sectors
		0			   # stripesize
		0			   # stripeoffset
		364801		  # Cylinders according to firmware.
		255			 # Heads according to firmware.
		63			  # Sectors according to firmware.
				YVH762PD		# Disk ident.

 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
No boot device? Well, we'll do the math for these. The FreeNAS routine that erases old bootcode erases the first and last 32M of the disk.

Erasing the first 32M:
dd if=/dev/zero of=/dev/da0 bs=1m count=32

Erasing the last requires that math: (3000592982016 bytes / 1048576 bytes per megabyte) = 286158.846093 megabytes. Not a round number, interesting. Now subtract 32 megabytes to find the starting point: 286158 - 32 = 286126.

Now write zeros to that drive, starting there, but we'll write 33 megabytes to make sure the last fraction of a megabyte is written:
dd if=/dev/zero of=/dev/da0 bs=1m count=33 oseek=286126

Repeat this for all of these drives. Also for the boot device, but re-do the math for it.
 

DeWebDude

Explorer
Joined
Nov 2, 2015
Messages
52
No luck, still getting errors in respect to the commands:
Code:

[root@freenas] ~# dd if=/dev/zero of=/dev/da0 bs=1m count=32
dd: /dev/da0: Invalid argument
1+0 records in
0+0 records out
0 bytes transferred in 0.102663 secs (0 bytes/sec)


This happens for all drives as well as the below:
Code:
[root@freenas] ~# dd if=/dev/zero of=/dev/da0 bs=1m count=33 oseek=286126
dd: /dev/da0: Invalid argument
1+0 records in
0+0 records out
0 bytes transferred in 0.096258 secs (0 bytes/sec)

 

DeWebDude

Explorer
Joined
Nov 2, 2015
Messages
52
I thought about it and when in red hat/centos we tend to give the whole path, I tried the below:
Code:
[root@freenas] ~# dd if=/dev/zero of=da0 bs=1m count=32
32+0 records in
32+0 records out
33554432 bytes transferred in 0.019857 secs (1689809672 bytes/sec)
[root@freenas] ~# dd if=/dev/zero of=da1 bs=1m count=32
32+0 records in
32+0 records out
33554432 bytes transferred in 0.013127 secs (2556121404 bytes/sec)
[root@freenas] ~# dd if=/dev/zero of=da2 bs=1m count=32
32+0 records in
32+0 records out
33554432 bytes transferred in 0.012487 secs (2687163256 bytes/sec)
[root@freenas] ~# dd if=/dev/zero of=da3 bs=1m count=32
32+0 records in
32+0 records out
33554432 bytes transferred in 0.012379 secs (2710608200 bytes/sec)



Then:
Code:
[root@freenas] ~# dd if=/dev/zero of=da0 bs=1m count=33 oseek=286126
33+0 records in
33+0 records out
34603008 bytes transferred in 0.013598 secs (2544719551 bytes/sec)
[root@freenas] ~# dd if=/dev/zero of=da1 bs=1m count=33 oseek=286126
33+0 records in
33+0 records out
34603008 bytes transferred in 0.012593 secs (2747790281 bytes/sec)
[root@freenas] ~# dd if=/dev/zero of=da2 bs=1m count=33 oseek=286126
33+0 records in
33+0 records out
34603008 bytes transferred in 0.028114 secs (1230817474 bytes/sec)
[root@freenas] ~# dd if=/dev/zero of=da3 bs=1m count=33 oseek=286126
33+0 records in
33+0 records out
34603008 bytes transferred in 0.012618 secs (2742390546 bytes/sec)



But in the end, the same error...

Also this is the result of diskinfo after the above:
Code:
diskinfo -v /dev/da0
/dev/da0
		512			 # sectorsize
		3000592982016   # mediasize in bytes (2.7T)
		5860533168	  # mediasize in sectors
		0			   # stripesize
		0			   # stripeoffset
		364801		  # Cylinders according to firmware.
		255			 # Heads according to firmware.
		63			  # Sectors according to firmware.
				YVGYJB0K		# Disk ident.

 
Last edited:

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
No luck, still getting errors in respect to the commands:
Code:
[root@freenas] ~# dd if=/dev/zero of=/dev/da0 bs=1m count=32
dd: /dev/da0: Invalid argument
That's... odd. Do the drives still show up in ls /dev/da*?

I thought about it and when in red hat/centos we tend to give the whole path, I tried the below:
Code:
[root@freenas] ~# dd if=/dev/zero of=da0 bs=1m count=32
This is just writing a file named da0. It will not write anything to the drive, just to that file in the current directory.
All right, one more thing to test before pulling out the really brute-force tools:
gpart show da0
gpart destroy -F da0
gpart show da0
 

DeWebDude

Explorer
Joined
Nov 2, 2015
Messages
52
I had done those steps based on other FreeBSD and notes I found on the web leading me back to here.
At the moment I had invested a lot of time into this before posting and it seems like I just couldn't break the barrier.

I decided to download xpenology which I used on a smaller box before and everything took the first try.
I'm not sure for a SAN if I would try that over FreeNAS, I believe FreeNAS performance would be superior, but this is for a backup NAS, so I'm playing with this for a couple of days.

I appreciate your help!

My other box is running HPDL180 G6, 48GB, FreeNAS and I think 10 x SAS 2TB Drives, works great, good performance all via iSCSI with 2 x 10GB ports, that's used purely as a SAN, so I thought this would be a similar install / setup but hit the glitch.
 
Last edited by a moderator:

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
There was a reason I asked those questions in that order, because the drive situation might have changed, but oh well. We'll never know now.
 

ayyEve

Dabbler
Joined
Apr 21, 2020
Messages
11
There was a reason I asked those questions in that order, because the drive situation might have changed, but oh well. We'll never know now.

Sorry to necro an old post but I'm having the exact same error, these drives don't seem to exist even though they're listed.
I've been at this for a few hours and I don't know what to do now.

I have 12x900gb hitachi sas drives in a das connected to a p822 (running in hba mode)
I'm trying to build a raid z3 pool but the gui gives me this:
1587512113675.png


Here's the screenshots from the commands you asked for in previous posts, I do not care about any data on these drives, they are 2nd hand
1587511805242.png

1587511841910.png

1587511857109.png
 

Attachments

  • 1587511781058.png
    1587511781058.png
    19.9 KB · Views: 308

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
Welcome to the forums.

Use the search box at the top of the page and look for P822. Many posts describing bad experiences nd background with P822. What you need is a real HBA to replace the P822.

Edit: BTW - your issue not the same as the OP's in this thread. If you want more discussion after looking at past threads, maybe better to start a new thread topic with your specific questions or patch on an existing thread with a P822 reference that's "close".
 
Last edited:

ayyEve

Dabbler
Joined
Apr 21, 2020
Messages
11
Thank you for the welcome!

My mistake, in my flustered and dramatic state it seemed to me we had the exact same issue. I thought about making a new thread after posting that but it was too late

I'm not familiar with this stuff at all, would this hba work correctly? https://www.ebay.ca/itm/123884149778

Thank you!
 
Top