Command syntax for format

chickennuggets

Dabbler
Joined
Jun 20, 2020
Messages
26
I want to format one of my empty drives that is currently not part of any pools. What is the correct syntax in the shell for formatting the disk? I tried
format /dev/ada

This is not the right syntax and I can't find a reference to this command.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
AFAIK, drives are prepared when they are added to a pool. For what purpose do you want to format this empty drive?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
In what way do you want to format it? As its own ZFS pool, or in some other way? In general, the process to "format" a hard disk would be:
  • Create a partition table on the disk
  • Create a partition of the appropriate type for the filesystem you want to use
  • Create a filesystem on that partition
If you're using CORE, this would be a good place to start:
 

chickennuggets

Dabbler
Joined
Jun 20, 2020
Messages
26
I bought a used samsung ssd pm863a and it has "ERRORMOD" on the firmware info. The ssd is not recognized or usable. However, I still see it as a connected device in Truenas. I searched for a working solution and someone had done a format command in Freebsd to reset the ssd to a working state, without "ERRORMOD" showing anymore with everything showing normal in smartctl.
 

chickennuggets

Dabbler
Joined
Jun 20, 2020
Messages
26
In what way do you want to format it? As its own ZFS pool, or in some other way? In general, the process to "format" a hard disk would be:
  • Create a partition table on the disk
  • Create a partition of the appropriate type for the filesystem you want to use
  • Create a filesystem on that partition
If you're using CORE, this would be a good place to start:
I just went through the freebsd docs in your post and didn't contain anything that I was looking for. I'm not looking to partition the drive. I trying to figure out if there's an easy way to reset the drive so I don't have to go hunting for impossible to find firmware.
 

chickennuggets

Dabbler
Joined
Jun 20, 2020
Messages
26
AFAIK, drives are prepared when they are added to a pool. For what purpose do you want to format this empty drive?
You just gave me an idea. I wonder if I could just create a new pool with that one bad drive and see if that will fix it....
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399

chickennuggets

Dabbler
Joined
Jun 20, 2020
Messages
26

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
In TrueNAS Core, you would use camcontrol fwdownload to reflash the firmware.
 

chickennuggets

Dabbler
Joined
Jun 20, 2020
Messages
26
No, don't do that. This appears to be a known firmware bug with these SSDs that corrupts itself. See https://support.lenovo.com/us/en/so...and-pm883-data-miscompare-issue-lenovo-server.

To fix, you'll need to reflash the firmware using something like this:


or

That's what I was trying to avoid. I understand his method but I am having a hard time finding the firmware.

Someone did some kind of format command here and got it working without getting a firmware.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Unfortunately, that command only appears to work with NVMe SSDs, which is a different access technology than SATA, which is what your PM863a drive is. nvmecontrol won't work on your drive, even though it is available in TrueNAS.
 

chickennuggets

Dabbler
Joined
Jun 20, 2020
Messages
26
Unfortunately, that command only appears to work with NVMe SSDs, which is a different access technology than SATA, which is what your PM863a drive is. nvmecontrol won't work on your drive, even though it is available in TrueNAS.
I might be out of luck on this one, Thank you for your efforts to help, despite this being borderline out of scope of Truenas. I appreciate it!
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399

chickennuggets

Dabbler
Joined
Jun 20, 2020
Messages
26
A search for PM863a firmware leads to this Dell site: https://www.dell.com/support/home/en-us/drivers/driversdetails?driverid=p2yrj&lwp=rt. If the model numbers match your PM863a, you may be able to extract the GC5B_NF.fwh firmware file to run the procedure from [mju:]wave. The file size is 1048880 bytes, or 304 bytes of prefix in front of the 1048576 bytes of the actual firmware.
This was the one I was looking at earlier, but the last few digits are off. It was close though! The one I have is MZ7LM3T8HMLP-00005
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
It's worth a shot. the [mju:]wave blog post said his was off in the last few digits too, but it still worked.
 

chickennuggets

Dabbler
Joined
Jun 20, 2020
Messages
26
It's worth a shot. the [mju:]wave blog post said his was off in the last few digits too, but it still worked.
I'll play around with this and see!
 
Top