SN750 - Cannot format using the nvme command

I’ve bought 2 SN750, one is 250GB and the other is 500GB. When I checked if they support 4096 bytes sectors, I was happy to see that they were (even if they are 512B formated by default). But when I tried to format the namespace, I’ve got an error, each time the same :

# nvme format --lbaf=1 -s 1 -f /dev/nvme0n1
NVMe status: INVALID_FORMAT: The LBA Format specified is not supported. This may be due to various conditions(0x410a)

It happens with both the ssd, with different OS and computers.

Any clue ?

Why do you add the -s 1 option?

-s , –ses=

Secure Erase Settings: This field specifies whether a secure erase should be performed as part of the format and the type of the secure erase operation. The erase applies to all user data, regardless of location (e.g., within an exposed LBA, within a cache, within deallocated LBAs, etc). Defaults to 0.

1 = User Data Erase: All user data shall be erased, contents of the user data after the erase is indeterminate (e.g., the user data may be zero filled, one filled, etc). The controller may perform a cryptographic erase when a User Data Erase is requested if all user data is encrypted.

Do you have an encrypted disk? If not then try removing the -s 1 option.

One more thing, before you try to low-level format it, unmount the filesystem on the NMVe drive first.

Try this:

$ sudo unmount /dev/nvme0n1

$ sudo nvme format /dev/nvme0n1 --lbaf= 1 --reset

(See this posting for determining the correct device/namespace and LBA Format index number.)

I tried with and without the -s option. I doesn’t work whatever which one I choose.

I don’t have to unmount anything as there is nothing on the ssd yet. Not even partitions. It is blank.

If I try your command (that’s the correct namespace, disk and LBA format :

# nvme format /dev/nvme0n1 --lbaf=1 --reset -f
NVMe status: INVALID_FORMAT: The LBA Format specified is not supported. This may be due to various conditions(0x410a)

Nothing seems to work.

Maybe you should attempt a self test of the drive and error readout.
If you are working off a Linux live CD then you’ll have to install the tool first with:

$ sudo apt-get install smartmontools

After that you can retrieve diagnostic information by running:

$ sudo smartctl -a /dev/nvme0

Can you post all output here, so we can have a look at it?

I happen to have the same issue with both ssd, which are not the same (250GB and 500GB versions). I don’t think it’s an issue with the disks. I also tested from my Debian unstable, but also from a live usb with Fedora 32. That’s always the same error. I tried with and without secure boot, just in case, same thing.

Here is the output of the smartctl command :

# smartctl -a /dev/nvme0
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.7.0-2-amd64] (local build)
Copyright © 2002-19, Bruce Allen, Christian Franke,

Model Number: WDS500G3X0C-00SJG0
Serial Number: 2019AXXXXXXX
Firmware Version: 111110WD
PCI Vendor/Subsystem ID: 0x15b7
IEEE OUI Identifier: 0x001b44
Total NVM Capacity: 500 107 862 016 [500 GB]
Unallocated NVM Capacity: 0
Controller ID: 8215
Number of Namespaces: 1
Namespace 1 Size/Capacity: 500 107 862 016 [500 GB]
Namespace 1 Formatted LBA Size: 512
Namespace 1 IEEE EUI-64: 001b44 8b46250d54
Local Time is: Tue Jul 28 14:29:34 2020 CEST
Firmware Updates (0x14): 2 Slots, no Reset required
Optional Admin Commands (0x0017): Security Format Frmw_DL Self_Test
Optional NVM Commands (0x005f): Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp
Maximum Data Transfer Size: 128 Pages
Warning Comp. Temp. Threshold: 84 Celsius
Critical Comp. Temp. Threshold: 88 Celsius
Namespace 1 Features (0x02): NA_Fields

Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 5.50W - - 0 0 0 0 0 0
1 + 3.50W - - 1 1 1 1 0 0
2 + 3.00W - - 2 2 2 2 0 0
3 - 0.0700W - - 3 3 3 3 4000 10000
4 - 0.0025W - - 4 4 4 4 4000 40000

Supported LBA Sizes (NSID 0x1)
Id Fmt Data Metadt Rel_Perf
0 + 512 0 2
1 - 4096 0 1

SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 46 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 0%
Data Units Read: 182 [93,1 MB]
Data Units Written: 0
Host Read Commands: 3 477
Host Write Commands: 0
Controller Busy Time: 0
Power Cycles: 11
Power On Hours: 39
Unsafe Shutdowns: 1
Media and Data Integrity Errors: 0
Error Information Log Entries: 1
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0

Error Information (NVMe Log 0x01, max 256 entries)
No Errors Logged

Thanks again for your help

The drive is currently low-level formatted to 512 B physical sector size (lbaf index 0).
4096 B LBA size indeed has lbaf index 1, so your format command was correct (I’d lose the -f (force) option, before you know what you’re dealing with).
The SMART self test passed okay and there are no error log entries in the drive. It’s running a bit hot for an idle drive, although that’s nothing to worry about yet.
I do see:

Are you sure that there’s nothing on the drive? All space is reported as allocated, whereas I observed with my own drive (SN550) that all space was unallocated, when it was brand new.
Maybe look through your BIOS / UEFI pages to look for weird protection options?

Yes, I’m sure there is nothing on the drive. Not even partitions, as I said.

I also tried a sanitize command, without any luck :

# nvme sanitize /dev/nvme0n1 -a 0x02
NVMe status: ACCESS_DENIED: Access to the namespace and/or LBA range is denied due to lack of access rights(0x4286)

Do you think it can be a uefi protection ? On 2 different computers ? And the format command works really well with other ssd.

It’s my best guess at this point.

It looks like your system has a security feature that’s locked the drive. Security implementation is vendor specific (not defined by NVMe). nvme-cli doesn’t have device specific unlocking capabilities.

Look for a secure erase ability in the UEFI/bios itself. Have a close look under advanced.

Furthermore you could search if WD has special utility software for your drive, that can perform a secure erase.

And you were right !
I finally found what was the issue. The drives were locked by both the computers. For one of them, I put the computer to sleep and then, after resume, the lock was released and the format command was ok. For the second one, the suspend trick did not work. I used a pci-e to m.2 adapter and format it with the other computer.

Thanks for your ideas.

I’m glad you found the solution.

One thing I noticed on Intel NUCs: if Modern Standby is enabled in BIOS, nvme format doesn’t work. If you disable it, nvme format works afterwards (might require you to put the NUC to sleep first).

I don’t know why you want to change it and what is the overall profit of this change, but below you will find some background information:

NVM Express specifications =link to website
NVM Express tutorial presentation =pdf-download

Have a look here.

If it ain’t broke, don’t fix it.

Better and leaner error correction, more storage space, a longer life-time and improved speed are not for everyone. :stuck_out_tongue_winking_eye:

True … not for everyone.
It’s just to keep it working in older systems too.

Does anyone had success with formating 4k? i have a sn750 and nothing works so far. i tried also with suspend system and format etc. im on it since couple day and no success. On a other nvme from Toshiba i had no problem, it worked for the first time perfectly.

The WD SN750 has a sector size of 512 / 512e.
512e is the advanced format in which the physical sector size is 4,096 bytes, but the logical sector size emulates 512 bytes sector size.