Comments (29)
I owned 2 laptops with Samsung PM951 and PM961 SSDs and both had the same issue: oacs shows support but the format command returns INVALID_OPCODE(2001).
For both machines, the fix is to put to laptop to sleep, then resume it. After resume, the Samsung SSD accepts the command.
from nvme-cli.
@nama08 To perform a low-level format on Lenovo Thinkpad machines (both SATA and NVME), you have to use the Lenovo EFI application which allows to reset the cryptographic key and erase the drive: https://support.lenovo.com/be/fr/downloads/ds019026
This tool works with all generations of Thinkpad machines including the most recent ones.
from nvme-cli.
You need to have a Thinkpad machine listed on the Lenovo tool page. I personally own a T480S with a Samsung NVME drive (model MZVLB256, exactly the same as yours) and I can confirm the tool works with this drive (and I could not use nvme format
with it either). The Lenovo tool is a bootable USB key image (UEFI application) so the installed OS is irrelevant. After you use the tool, your drive will be wiped clean and you can then install any OS, including Linux.
I was also able to upgrade the firmware of the Samsung drive directly from Linux using the nvme
command line tool, by identifying the proper file in the Windows zip archive and following these instructions.
from nvme-cli.
That doesn't sound right since format is not an optional command to support for any device. It's required. Perhaps the device's status is incorrect, and maybe it doesn't like using the "all namespaces". Do you get the same error from running:
# nvme format /dev/nvme0 -n 1
?
from nvme-cli.
Yes, same error.
from nvme-cli.
Okay, in this case, I recommend forwarding the error to the controller vendor. It sounds like they require something not defined in the specification, or they simply don't support the nvme format admin command.
from nvme-cli.
Closing; this appears to be a device side issue.
from nvme-cli.
from nvme-cli.
Samsung PM961 128G responds with NVME Admin command error:8193 when nvme_format_ns /dev/nvme0n1 is sent on ASrock Taichi Z270 running CentOS 7.3.1611.el7.
Same SSD/same command/same OS issued on ASUS Maximus Gene VII Z97 completes successfully. Please advise possible problem(s) on Z270 system.
from nvme-cli.
That looks like you're using an older version of this tool, so I'm going to assume 8193 is in decimal. That's 2001 in hex, and according to the spec, that's an invalid opcode error. Supporting the format opcode is optional, so it sounds like controller chose not to support it, and that's okay from a specification standpoint.
from nvme-cli.
from nvme-cli.
If you want to verify if your controller supports the Format NVM command, run nvme id-ctrl /dev/nvme0 | grep oacs
. If value does not have bit 1 set, your controller doesn't support the command, and there's nothing wrong with that from an implementation compliance standpoint.
from nvme-cli.
Both Z270 and Z97 systems yield oacs : 0x7. I suspect OP_CODE is modified by Z270 versus Z97. Comments will be appreciated.
Samsung_format_Z270.txt
from nvme-cli.
An oacs of 7 is advertising support for format nvm. If it's not working, you should take this issue to your vendor.
from nvme-cli.
from nvme-cli.
Just confirming that putting the machine to sleep has also resolved this issue for me.
from nvme-cli.
I know it's closed but I'm just adding that I had the same problem and the same solution (suspend + resume) worked. Laptop with Intel HM175 Express Chipset and Samsung SM961 512GB.
from nvme-cli.
That sounds like a firmware bug.
In any case, I hope everyone running this command is aware it obliterates your data. :)
from nvme-cli.
Almost a year later, and Samsung NVMEs are still behaving in the same way.
$> sudo nvme format /dev/nvme0n1
NVME Admin command error:INVALID_OPCODE(2001)
$> systemctl suspend
$> sudo nvme format /dev/nvme0n1
Success formatting namespace:1
from nvme-cli.
It's not working for me if I boot on an usb key to format it.
[liveuser@localhost ~]$ sudo nvme list
Node SN Model Namespace Usage Format FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1 S308NAAH500323 SAMSUNG MZSLW1T0HMLH-000L1 1 220.14 GB / 1.02 TB 512 B + 0 B 3L0QCXY7
[liveuser@localhost ~]$ sudo nvme format -s1 /dev/nvme0n1
NVME Admin command error:INVALID_OPCODE(2001)
[liveuser@localhost ~]$ systemctl suspend
[liveuser@localhost ~]$ sudo nvme format -s1 /dev/nvme0n1
NVME Admin command error:INVALID_OPCODE(2001)
from nvme-cli.
Hi everyone,
I've just tested the nvme format command and it worked with a live debian/gnome on a Samsung 970 EVO.
I did not had to enter in a sleep state.
from nvme-cli.
Hi,
I am having challenges with NVME format on Samsung drive (MZVLB256HAHQ).
Error: NVME Admin command error:INVALID_OPCODE(2001)
Note: I have been contacting Samsung support, and they weren't able to help because this particular NVMe drive was OEM. When contacted Lenovo /OEM, but no luck there as well as they do not provide support for these drives.
from nvme-cli.
@nama08 To perform a low-level format on Lenovo Thinkpad machines (both SATA and NVME), you have to use the Lenovo EFI application which allows to reset the cryptographic key and erase the drive: https://support.lenovo.com/be/fr/downloads/ds019026
This tool works with all generations of Thinkpad machines including the most recent ones.
Hi and thanks for your valuable reply. I will check this out. As mentioned earlier, I was in contact with Samsung support and they weren't able to help.
By the way is this process is NIST compliant?
Support for Linux based environment?
from nvme-cli.
Hi,
I have now checked the EFI shell, and it worked just fine.
However, I wasn't able to save the output (proof that disk is wiped securely). Is there a way to save the output /log?
from nvme-cli.
I have wd sn 750 1TB, nvme format gives error first,(change block size from 512 to 4096, got error code 0x4001, I'm not sure). then I tried supend/resume and it helped me
from nvme-cli.
Same drive as @comicfans (model number WDBRPG0010BNC-WRSN). On a brand new never touched drive, just running
sudo nvme format /dev/nvme0n1
returned
NVMe status: INVALID_FORMAT: The LBA Format specified is not supported. This may be due to various conditions(0x410a)
Suspend and resume fixed the issue, with the original command running succesfully after resume. So bizarre.
from nvme-cli.
Just so @trourance doesn't feel he's not the only one.
I have a Dell XPS 9360 which came with this Samsung PM961 NVMe 512GB drive...
P/N: MZVLW512HMJP - 000D1
Model: MZ - VLW512A
DP/N: 068V6F
Firmware: CXY74D1Q (which is a Dell firmware, fwupd/LVFS doesn't know of anything newer... unless someone knows of one?)
Using the latest nvme-cli version 2.7.1 via the AppImage (and I tried compiling manually too) I get this...
root@trisquel:/# ./nvme-cli-latest-x86_64.AppImage id-ctrl /dev/nvme0n1 | grep oacs
oacs : 0x17
root@trisquel:/# ./nvme-cli-latest-x86_64.AppImage list
Node Generic SN Model Namespace Usage Format FW Rev
--------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
/dev/nvme0n1 /dev/ng0n1 S33YNX0J302237 PM961 NVMe SAMSUNG 512GB 0x1 462.32 GB / 512.11 GB 512 B + 0 B CXY74D1Q
root@trisquel:/# ./nvme-cli-latest-x86_64.AppImage format -f -s1 /dev/nvme0n1
NVMe status: Invalid Command Opcode: A reserved coded value or an unsupported value in the command opcode field(0x2001)
root@trisquel:/# systemctl suspend
root@trisquel:/# ./nvme-cli-latest-x86_64.AppImage format -f -s1 /dev/nvme0n1
NVMe status: Invalid Command Opcode: A reserved coded value or an unsupported value in the command opcode field(0x2001)
root@trisquel:/# ./nvme-cli-latest-x86_64.AppImage security-recv /dev/nvme0n1 -t 16 -p 0xef -n 0 -x 16
NVME Security Receive Command Success:0
0 1 2 3 4 5 6 7 8 9 a b c d e f
0000: 00 0e 00 01 00 01 ff fe 00 29 00 00 00 00 00 00 "........)....."
So I guess bit 9 being 29 means it's still frozen... despite me issuing a command to suspend.
The only other things I've seen is this Wiki article from Thomas-Krenn-Wiki.pl which says a BIOS update to their Supermicro fixed it for them... but there are no further BIOS updates for this XPS 9360... it's on the latest.
from nvme-cli.
In the end I've found that the Dell BIOS supports a 'data wipe' and it's managed to issue the command instead... the SSD was wiped in only a handful of seconds.
But then that does mean there isn't a problem with the device... so the issue must be how nvme-cli communicates with it?
Should this issue be reopened?
from nvme-cli.
The Dell BIOS is more than likely performing some kind of vendor unique sequence to unlock this operation. There's nothing wrong with the nvme-cli tooling from the protocol perspective, but we don't inherently know vendor specific magic. We'd need to know what command sequence the special BIOS updater is doing in order to script up an equivalent with this tool.
from nvme-cli.
Related Issues (20)
- Supported Log Pages crashed when using json output HOT 1
- Not a issue but a unexpected behaviour on different firmware on nvme ns size HOT 6
- [bug report]blktests nvme/029 failed from v2.7 on s390x HOT 5
- RFE: Perform actual discovery in discover_from_nbft() HOT 6
- nvme wdc cap-diag /dev/nvme0 - Decode HOT 3
- Fabrics connect for large number of connections too slow with v2.8 HOT 67
- Commands fail on nvme-cli 2.x when nvme_core module isn't loaded, regression from nvme-cli 1.x HOT 2
- nvme format fails HOT 6
- Wrong capacity for drive under usage with nvme-cli 2.8. HOT 8
- rpmb_program_auth_key does not request the result of key programming HOT 2
- can nvme discover a target which listen on a AF_IB(gid) address? HOT 1
- Samsung SSD 980 1TB: can't download firmware HOT 41
- nvme-cli 2.8 unable to use plugin function HOT 2
- nvme get-property/set-property shows Invalid Command Opcode (0x6001) HOT 1
- 2.9: build fails HOT 5
- -- EDIT: mistakenly opened issue, please delete
- No output logs in fw-download HOT 7
- Network dropped connection on reset HOT 5
- `nvme connect` with TLS enabled is unstable HOT 2
- cannot create new ns after removing old one HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvme-cli.