linux-nvme / nvme-cli

NVMe management command line interface.

Home Page:https://nvmexpress.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nvme set-feature quietly fails to set the power mode

eosolid opened this issue · comments

In the past I was able to use nvme-cli to set the different power modes allowed by the nvme device. Latest version of nvme-cli seems to be working fine and commands are running successfully, but they don't take effect. Last tested working version was on 2.2.1.
I tried this same procedure on version 2.6 and on master ( as today) and still fails to update the power mode of the nvme device.

Working version 2.2.1
fio_PS_0_nvme2-2-1
fio_PS_2_nvme2-2-1

Failing to set the correct power mode on 2.6
PS_2_nvme_6-1_no_effect

Failing to set the correct power mode on master ( tested today as 2/6/24 )
fio_PS_0_nvme_master
fio_PS_2_nvme_master

Because some of the short parameters got hijacked for other purposes... The '-v' parameter now means "verbose" instead of "value". If you want it to work again, you'll need to replace your '-v' option with '--value' or use capital '-V'.

Yes, I know these types of changes are annoying and harm confidence in consistency. I cautioned against changing args because of the destruction to backward compatibility, and @igaw agreed in a different thread that we won't be doing such changes anymore.

When in doubt, run --help:

$ ./.build/nvme set-feature --help
Usage: nvme set-feature <device> [OPTIONS]

Options:
  [  --verbose, -v ]                    --- Increase output verbosity
...
  [  --value=<IONUM>, -V <IONUM> ]      --- new value of feature (required)

fio_PS_2_nvme_master_works

I did notice the verbosity when setting the value but I was under the impression that it was something expected since I move from 2.2.1 to 2.6 and then 2.7...

it works as intended w/ the correct argument 😊 thanks.