Skip to content

Instantly share code, notes, and snippets.

@pgaskin
Last active April 4, 2026 05:05
Show Gist options
  • Select an option

  • Save pgaskin/548486d7cbfff8475f6913c1095419b7 to your computer and use it in GitHub Desktop.

Select an option

Save pgaskin/548486d7cbfff8475f6913c1095419b7 to your computer and use it in GitHub Desktop.
Documenting all nvmet configfs options (WIP).
// as of linux v7.0
discovery_nqn="nqn.2014-08.org.nvmexpress.discovery" // string < 256, must not have the same nqn as any subsystem
subsystem/nqn/
attr_allow_any_host=true // cannot set attr_allow_any_host=false if have allowed_host (EINVAL)
attr_version="1.3" // nvme version X.Y or X.Y.Z (EINVAL); cannot set once discovered (EINVAL); ignored and cannot set if passthru.enable (EINVAL); default 2.1.0
attr_serial="" // ascii (0x20 <= c <= 0x7e), len <= 20 (EINVAL); cannot set once discovered (EINVAL); default random
attr_model="" // ascii (0x20 <= c <= 0x7e), len <= 40 (EINVAL); cannot set once discovered (EINVAL); default "Linux"
attr_firmware="" // ascii (0x20 <= c <= 0x7e), len <= 8 (EINVAL); cannot set once discovered (EINVAL); default UTS_RELEASE
attr_ieee_oui=0x000000 // uint32 (x <= 0xFFFFFF) (EINVAL); cannot set once discovered (EINVAL); default 0x000000
attr_vendor_id=0 // uint16 (EINVAL); applied when subsystem added to a pci-epf port
attr_subsys_vendor_id=0 // uint16 (EINVAL); applied when subsystem added to a pci-epf port
attr_cntlid_min=1 // uint16 (id > 0) (EINVAL); doesn't affect existing controllers; default 1
attr_cntlid_max=0xffef // uint16 (id > 0) (EINVAL); must be >= attr_cntlid_min when set (EINVAL); doesn't affect existing controllers; default 0xffef
attr_qid_max=128 // uint16 (1 <= n <= 128) (EINVAL); forces all controllers to reconnect when set; default 128
attr_pi_enable=false // requires CONFIG_BLK_DEV_INTEGRITY (ENOENT); applied when connected to (currently rdma trtype only)
passthru/
enable=false // bool (EINVAL); writes to dmesg and returns an error if there's a problem enabling it (or if it's already enabled); disables when set to false
device_path= // string != 0 (EINVAL); cannot set if enable=true (EBUSY)
admin_timeout= // uint (EINVAL); none if 0; applies for all future operations
io_timeout= // uint (EINVAL); none if 0; applies for all future operations
clear_ids= // bool (EINVAL); zeroes out IDs from the underlying device; applies for all future operations
namespaces/0/ // uint32 < 0xFFFFFFFF (EINVAL)
enable=
device_path=
device_uuid=
device_nguid=
ana_grpid=
buffered_io=
revalidate_size=
resv_enable=
p2pmem=
allowed_hosts/nqn... // link, cannot create if attr_allow_any_host=true
ports/0/
addr_trtype=
addr_adrfam=
addr_traddr=
addr_trsvcid=
addr_treq=
addr_tsas=
param_inline_data_size=
param_max_queue_size=
param_pi_enable=
subsystems/nqn...
referrals/name/
enable=
addr_adrfam=
addr_portid=
addr_treq=
addr_traddr=
addr_trsvcid=
addr_trtype=
ana_group/1/
state=
hosts/nqn/
dhchap_key=
dhchap_ctrl_key=
dhchap_hash=
dhchap_dhgroup=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment