Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
NDA(4)		       FreeBSD Kernel Interfaces Manual			NDA(4)

     nda -- NVMe Direct	Access device driver

     device nvme
     device scbus

     The nda driver provides support for direct	access devices,	implementing
     the NVMe command protocol,	that are attached to the system	through	a host
     adapter supported by the CAM subsystem.

     The following variables are available as both sysctl(8) variables and
     loader(8) tunables:

	 The nvme(4) driver will create	nda device nodes for block storage
	 when set to 0.	 Create	nvd(4) device nodes for	block storage when set
	 to 1.	See nvd(4) when	set to 1.
	 When set to 1,	nvd(4) aliases will be created for all nda devices,
	 including partitions and other	geom(4)	providers that take their
	 names from the	disk's name.  nvd devices will not, however, be	re-
	 ported	in the kern.disks sysctl(8).
	 This variable determines whether the software queued entries are
	 sorted	in LBA order or	not.  Sorting is almost	always a waste of
	 time.	The default is to not sort.
	 This variable determines if the nda devices participate in the
	 speedup protocol.  When the device participates in the	speedup, then
	 when the upper	layers send a BIO_SPEEDUP, all current BIO_DELETE re-
	 quests	not yet	sent to	the hardware are completed successfully	imme-
	 diate without sending them to the hardware.  Used in low disk space
	 scenarios when	the filesystem encounters a critical shortage and
	 needs blocks immediately.  Since trims	have maximum benefit when the
	 LBA is	unused for a long time,	skipping the trim when space is	needed
	 for immediate writes results in little	to no excess wear.  When par-
	 ticipation is disabled, BIO_SPEEDUP requests are ignored.
	 The maximum number of LBA ranges to be	collected together for each
	 DSM trims send	to the hardware.  Defaults to 256, which is the	maxi-
	 mum number of ranges the protocol supports.  Sometimes	poor trim per-
	 formance can be mitigated by limiting the number of ranges sent to
	 the device.  This value must be between 1 and 256 inclusive.

     The following report per-device settings, and are read-only unless	other-
     wise indicated.  Replace N	with the device	unit number.
	 This variable reports whether the storage volume is spinning or
	 flash.	 Its value is hard coded to 0 indicating flash.
	 This variable reports whether the nda driver accepts unmapped I/O for
	 this unit.
	 This variable reports the current flags.

	     The device	is open.

	     Set when a	write to the drive is scheduled.  Cleared after	flush

	     Internal flag set after sysctl(8) nodes have been created.
	 Same as the	tunable.
	 Writable.  When greater than zero, hold trims for up to this many
	 ticks before sending to the drive.  Sometimes waiting a little	bit to
	 collect more trims to send at one time	improves trim performance.
	 When 0, no delaying of	trims are done.
	 Writable.  When delaying a bit	to collect multiple trims, send	the
	 accumulated DSM TRIM to the drive.
	 Total number of LBAs that have	been trimmed.
	 Total number of LBA ranges that have been trimmed.
	 Total number of trims sent to the hardware.
	 Total number of BIO_DELETE requests queued to the device.

     Each nvme(4) drive	has one	or more	namespaces associated with it.	One
     instance of the nda driver	will be	created	for each of the	namespaces on
     the drive.	 All the nda nodes for a nvme(4) device	are at target 0.  How-
     ever, the namespace ID maps to the	CAM lun, as reported in	kernel mes-
     sages and in the devlist sub command of camcontrol(8).

     Namespaces	are managed with the ns	sub command of nvmecontrol(8).	Not
     all drives	support	namespace management, but all drives support at	least
     one namespace.  Device nodes for nda will be created and destroyed	dynam-
     ically as namespaces are activated	or detached.

     /dev/nda*	NVMe storage device nodes

     cam(4), geom(4), nvd(4), nvme(4), gpart(8)

     The nda driver first appeared in FreeBSD 12.0.

     Warner Losh <>

FreeBSD	13.0			 June 6, 2020			  FreeBSD 13.0


Want to link to this manual page? Use this URL:

home | help