Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVMe status: INVALID_OPCODE: The associated command opcode field in not valid(0x6001) #627

Closed
danarellano opened this issue Dec 9, 2019 · 8 comments

Comments

@danarellano
Copy link

danarellano commented Dec 9, 2019

Version: nvme-1.9.143.g525a

sudo nvme format -s1 /dev/nvme0n1
NVMe status: INVALID_OPCODE: The associated command opcode field in not valid(0x6001)

sudo systemctl -i suspend
sudo nvme format -s1 /dev/nvme0n1
NVMe status: INVALID_OPCODE: The associated command opcode field in not valid(0x6001)

Any suggestions?

@keithbusch
Copy link
Contributor

Your device is not correctly implementing the nvme protocol. There's nothing tooling can do about this, you can only complain to your vendor, or just purchase a more compliant drive.

@keithbusch
Copy link
Contributor

Eh, it could still be compliant since Format NVM is listed as an optional command. Check 'nvme id-ctrl | grep oacs' and see if bit 1 is set to confirm the device supports the command. If it is not set, then the device is correctly announcing that it doesn't support any type of format, and your only recourse is still to contact your vendor if you want this command implemented.

@danarellano
Copy link
Author

sudo nvme id-ctrl /dev/nvme0n1 | grep oacs
result in:
oacs : 0x17

0x 1 7
Does this confirm the devices supports the command?

@keithbusch
Copy link
Contributor

Yes, that says format is supported. Sounds like a firmware bug to me. Either it needs to unset the bit or we shouldn't see that error status.

@maximbaz
Copy link

If your drive is made by Samsung, there is a known bug that results in this error, the workaround is to suspend your computer first (systemctl suspend), then resume, then try formatting again.

@deepakagrawal
Copy link

I also get

sudo nvme id-ctrl /dev/nvme0n1 | grep oacs
result in:
oacs : 0x17

You mentioned Either it needs to unset the bit or we shouldn't see that error status. How do I do that? I tried suspending the system as well but no success.

@deepakagrawal
Copy link

sudo nvme id-ctrl /dev/nvme0n1 | grep oacs
result in:
oacs : 0x17

0x 1 7
Does this confirm the devices supports the command?

Were you able to solve this problem @danarellano

@keithbusch
Copy link
Contributor

You mentioned Either it needs to unset the bit or we shouldn't see that error status. How do I do that? I tried suspending the system as well but no success.

You don't do that. The vendor is supposed to do that because their implementation is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants