NVME-SET-FEATURE(1)

πŸ’… nvme-set-feature β€” the NVMe Manual page you actually wanna read

okay so bestie, welcome to nvme-set-feature(1) from the NVMe Manual ✨ this is the page where we set a feature on your NVMe drive and it tells you what happened. buckle up, we're doing this together 🫢


🌸 NAME 🌸

nvme-set-feature β€” Sets an NVMe feature, returns applicable results πŸ’–


✨ SYNOPSIS ✨

nvme [<global-options>] set-feature <device>
                        [--namespace-id=<nsid> | -n <nsid>]
                        [--feature-id=<fid> | -f <fid>]
                        [--value=<value> | -V <value>]
                        [--uuid-index=<uuid-index> | -U <uuid_index>]
                        [--data-len=<data-len> | -l <data-len>]
                        [--data=<data-file> | -d <data-file>]
                        [--save | -s]
                        [--cdw12=<cdw12> | -c <cdw12>]

like, copy-paste it, it's fine, I won't tell anyone πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

So what does this lil command actually do? It submits an NVMe Set Feature admin command and hands you back the applicable results. and by "applicable results" we mean it might be just the feature's value β€” or it might also include a whole feature structure if that feature is the type that requires one (ex: LBA Range Type). some features are extra like that, no cap πŸ’…

The <device> parameter is mandatory β€” you literally cannot skip it β€” and it can be either the NVMe character device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1). either one slaps, pick whichever one you've got πŸ’–

On success, the value sent to the device is displayed. that's the little reward for a job well done, periodt ✨


🌈 OPTIONS 🌈

here's where the fun stuff lives. every single flag, right here, none skipped 🫢

  • -n <nsid>, --namespace-id=<nsid> β€” Sets the feature for the given nsid. this one's optional, and tbh most features don't even use this value. also you can pass the broadcast value 0xffffffff as all or -1. yes, literally the words all or -1, go off king πŸ‘‘

more coming, bestie β€” don't go anywhere 🧚

  • -f <fid>, --feature-id=<fid> β€” this is the which feature are we even talking about knob πŸ’… you hand it a feature id and it goes in the command, simple as that. Heads up tho: the value you pass should be in hex πŸ”₯ (that's literally what the page says, so fr fr, hex it up).

Ok bestie, here's the full vibe-check menu of feature ids β€” this is the whole list, no skips, no cuts πŸ‘‘:

  • 0x01 | arbitration β€” Arbitration
  • 0x02 | power-mgmt β€” Power Management
  • 0x03 | lba-range β€” LBA Range Type
  • 0x04 | temp-thresh β€” Temperature Threshold
  • 0x05 | err-recovery β€” Error Recovery
  • 0x06 | volatile-wc β€” Volatile Write Cache
  • 0x07 | num-queues β€” Number of Queues
  • 0x08 | irq-coalesce β€” Interrupt Coalescing
  • 0x09 | irq-config β€” Interrupt Vector Configuration
  • 0x0a | write-atomic β€” Write Atomicity Normal
  • 0x0b | async-event β€” Asynchronous Event Configuration
  • 0x0c | auto-pst β€” Autonomous Power State Transition
  • 0x0d | host-mem-buf β€” Host Memory Buffer
  • 0x0e | timestamp β€” Timestamp
  • 0x0f | kato β€” Keep Alive Timer
  • 0x10 | hctm β€” Host Controlled Thermal Management
  • 0x11 | nopsc β€” Non-Operational Power State Config
  • 0x12 | rrl β€” Read Recovery Level Config
  • 0x13 | plm-config β€” Predictable Latency Mode Config
  • 0x14 | plm-window β€” Predictable Latency Mode Window
  • 0x15 | lba-sts-interval β€” LBA Status Information Report Interval
  • 0x16 | host-behavior β€” Host Behavior Support
  • 0x17 | sanitize β€” Sanitize Config
  • 0x18 | endurance-evt-cfg β€” Endurance Group Event Configuration
  • 0x19 | iocs-profile β€” I/O Command Set Profile
  • 0x1a | spinup-control β€” Spinup Control
  • 0x1b | power-loss-signal β€” Power Loss Signaling Config
  • 0x1c | perf-characteristics β€” Performance Characteristics
  • 0x1d | fdp β€” Flexible Data Placement
  • 0x1e | fdp-events β€” FDP Events
  • 0x1f | ns-admin-label β€” Namespace Admin Label
  • 0x20 | key-value β€” Key Value Configuration
  • 0x21 | ctrl-data-queue β€” Controller Data Queue
  • 0x78 | emb-mgmt-ctrl-addr β€” Embedded Management Controller Address
  • 0x79 | host-mgmt-agent-addr β€” Host Management Agent Address
  • 0x7d | enh-ctrl-metadata β€” Enhanced Controller Metadata
  • 0x7e | ctrl-metadata β€” Controller Metadata
  • 0x7f | ns-metadata β€” Namespace Metadata
  • 0x80 | sw-progress β€” Software Progress Marker
  • 0x81 | host-id β€” Host Identifier

✨ that's all 41 of them, bestie, every single one, right there. no gatekeeping 🫢

  • 0x82 / resv-mask β€” Reservation Notification Mask πŸ’…
  • 0x83 / resv-persist β€” Reservation Persistence
  • 0x84 / write-protect β€” Namespace Write Protection Config
  • 0x85 / bp-write-protect β€” Boot Partition Write Protection Config

okay and now the actual flags for this bad boy πŸ‘‡

  • -l <data-len>, --data-len=<data-len> β€” the data length for the buffer you're submitting for this feature. ngl most of the known features just don't use this value at all. the exceptions are LBA Range Type and host identifier 🫢
  • -d <data-file>, --data=<data-file> β€” the data file for the buffer submitted for this feature. again, most known features don't touch this one. the exception is LBA Range Type and host identifier. it defaults to STDIN so you can pipe files and echo straight into it, iconic behavior honestly ✨
  • -V <value>, --value=<value> β€” the value for command dword 11, aka the value you want to set the feature to. this is the main character right here πŸ‘‘
  • -s, --save β€” save the attribute so it persists through all power states and resets. yes bestie, it survives the reboot πŸ’Ύ
  • -U <uuid-index>, --uuid-index=<uuid-index> β€” UUID Index of the feature
  • -c <cdw12>, --cdw12=<cdw12> β€” the value for command dword 12, if applicable.

🌈 GLOBAL OPTIONS 🌈

these ones live at the top-level nvme command and they're available to this subcommand too, so you get them for free, no cap πŸ’–

  • --dry-run β€” print the command that would be executed, but don't actually execute it. peek at it first, girlies, it's giving look-before-you-leap πŸ™ˆ
  • --no-ioctl-probing β€” disable probing for 64-bit IOCTL support.
  • --no-retries β€” disable retry logic on transient errors.
  • -o <fmt>, --output-format=<fmt> β€” set the reporting format to normal, tabular, 'json, or binary. only one output format at a time please, we don't do chaos 🌸
  • --output-format-version=<version> β€” select the output format version. version 1 uses the original field naming, while version 2 (the default) provides more consistent and script-friendly field names. other versions? rejected. blocked. not on my watch πŸ’€
  • --quiet β€” suppress informational messages. errors are still reported, and --quiet cancels any --verbose for the library log level. shhh era 🀫
  • --set-options=<key=value>[,<key=value>...] β€” set libnvme library options for this invocation. supported keys are force-4k, mi-probe-enabled, test-base-dir and test-sysfs-dir πŸŽ€
  • --timeout=<ms> β€” set the timeout for the command in milliseconds. infinite or -1 waits without a time limit (0xffffffff). literally forever, she's patient πŸ’œ
  • -v, --verbose β€” increase the level of detail in the output. you can specify it multiple times to further increase verbosity. stack 'em up 🧚
these options can also be set as machine-wide defaults in nvme-cli.conf(5). a command-line flag always overrides the file β€” flags stay winning πŸ‘‘

πŸ¦‹ EXAMPLES πŸ¦‹

  • sets the Power State (PS) to 1 in feature id 2:
# nvme set-feature /dev/nvme0 -f 2 /dev/nvme0n1 -V 0x1
  • sets the host id to the ascii string.
# echo "abcdefgh" | nvme set-feature /dev/nvme0 -f 0x81 -l 8
nvme set-feature /dev/nvme0 -f 0x81 -l 8 -U 0x1

🌟 NVME 🌟

part of the nvme-user suite. that's the whole vibe 🫢


and that's the page bestie, we ate and left zero crumbs πŸ’…βœ¨ this one's NVMe, dated 10/30/2026, filed under NVME-SET-FEATURE(1) β€” go set some features, ily, bye πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from