lblk#
Usage: lblk <command> [<args>]
Where <command> is one of:
enum | Enumerate Logical Block Namespaces on the system
info | Retrieve derived information for the given URI
idfy | Identify the namespace for the given URI
dir-send | Directive send for the given URI
dir-receive | Directive receive for the given URI
read | Read data and optionally metadata
write | Writes data and optionally metadata
write-zeros | Set a range of logical blocks to zero
write-uncor | Mark a range of logical blocks as invalid
write-dir | Writes directive specific data and optionally metadata
write-read-pi | Writes and then read with protection information
compare | Compare data and optionally metadata
See 'lblk <command> --help' for the description of [<args>]
Logical Block Namespace Utility -- ver: {major: 0, minor: 7, patch: 5}
Enumerate Logical Block Namespaces#
Enumerate namespaces:
lblk enum --help
Usage: lblk enum [<args>]
Enumerate Logical Block Namespaces on the system
Where <args> include:
[ --uri uri ] ; System URI e.g. '10.9.8.1:8888'
[ --flags 0xNUM ] ; Command flags
With <args> for backend:
[ --subnqn STRING ] ; Subsystem NQN of the NVMe over Fabrics endpoint e.g. 'nqn.2022-06.io.xnvme:ctrlnode1'
[ --hostnqn STRING ] ; The host NQN to use when connecting to NVMe over Fabrics controllers
[ --be STRING ] ; xNVMe backend, e.g. 'linux', 'spdk', 'fbsd', 'macos', 'posix', 'windows'
[ --help ] ; Show usage / help
See 'lblk --help' for other commands
Logical Block Namespace Utility -- ver: {major: 0, minor: 7, patch: 5}
Device Information#
Device information:
lblk info /dev/nvme0n1
xnvme_dev:
xnvme_ident:
uri: '/dev/nvme0n1'
dtype: 0x2
nsid: 0x1
csi: 0x0
subnqn: 'nqn.2019-08.org.qemu:deadbeef'
xnvme_be:
admin: {id: 'nvme'}
sync: {id: 'nvme'}
async: {id: 'emu'}
attr: {name: 'linux'}
xnvme_opts:
be: 'linux'
mem: 'posix'
dev: 'FIX-ID-VS-MIXIN-NAME'
admin: 'nvme'
sync: 'nvme'
async: 'emu'
xnvme_geo:
type: XNVME_GEO_CONVENTIONAL
npugrp: 1
npunit: 1
nzone: 1
nsect: 2097152
nbytes: 4096
nbytes_oob: 0
tbytes: 8589934592
mdts_nbytes: 520192
lba_nbytes: 4096
lba_extended: 0
ssw: 12
pi_type: 0
pi_loc: 0
pi_format: 0
Namespace Identification#
Namespace identification:
lblk idfy --help
Usage: lblk idfy <uri> [<args>]
Identify the namespace for the given URI
Positional arguments:
uri ; Device URI e.g. '/dev/nvme0n1', '0000:01:00.1', '10.9.8.1.8888', '\\.\PhysicalDrive1'
Where <args> include:
[ --nsid 0xNUM ] ; Namespace Identifier for Command Construction
[ --data-output FILE ] ; Path to data output-file
With <args> for backend:
[ --subnqn STRING ] ; Subsystem NQN of the NVMe over Fabrics endpoint e.g. 'nqn.2022-06.io.xnvme:ctrlnode1'
[ --hostnqn STRING ] ; The host NQN to use when connecting to NVMe over Fabrics controllers
[ --be STRING ] ; xNVMe backend, e.g. 'linux', 'spdk', 'fbsd', 'macos', 'posix', 'windows'
[ --dev-nsid 0xNUM ] ; Namespace Identifier for Device Handle
[ --admin STRING ] ; xNVMe admin. command-interface, e.g. 'nvme', 'block'
[ --mem STRING ] ; xNVMe buffer/memory manager
[ --direct NUM ] ; Bypass layers
[ --help ] ; Show usage / help
See 'lblk --help' for other commands
Logical Block Namespace Utility -- ver: {major: 0, minor: 7, patch: 5}
IO: Reading#
Reading:
lblk read --help
Usage: lblk read <uri> [<args>]
Read data and optionally metadata
Positional arguments:
uri ; Device URI e.g. '/dev/nvme0n1', '0000:01:00.1', '10.9.8.1.8888', '\\.\PhysicalDrive1'
Where <args> include:
--slba 0xNUM ; Start Logical Block Address
--nlb NUM ; Number of LBAs (NOTE: zero-based value)
[ --nsid 0xNUM ] ; Namespace Identifier for Command Construction
[ --data-output FILE ] ; Path to data output-file
[ --meta-output FILE ] ; Path to meta output-file
With <args> for backend:
[ --subnqn STRING ] ; Subsystem NQN of the NVMe over Fabrics endpoint e.g. 'nqn.2022-06.io.xnvme:ctrlnode1'
[ --hostnqn STRING ] ; The host NQN to use when connecting to NVMe over Fabrics controllers
[ --be STRING ] ; xNVMe backend, e.g. 'linux', 'spdk', 'fbsd', 'macos', 'posix', 'windows'
[ --dev-nsid 0xNUM ] ; Namespace Identifier for Device Handle
[ --admin STRING ] ; xNVMe admin. command-interface, e.g. 'nvme', 'block'
[ --mem STRING ] ; xNVMe buffer/memory manager
[ --direct NUM ] ; Bypass layers
[ --sync STRING ] ; xNVMe sync. command-interface, e.g. 'nvme', 'block'
[ --help ] ; Show usage / help
See 'lblk --help' for other commands
Logical Block Namespace Utility -- ver: {major: 0, minor: 7, patch: 5}
IO: Writing#
Writing:
lblk write --help
Usage: lblk write <uri> [<args>]
Writes data and optionally metadata
Positional arguments:
uri ; Device URI e.g. '/dev/nvme0n1', '0000:01:00.1', '10.9.8.1.8888', '\\.\PhysicalDrive1'
Where <args> include:
--slba 0xNUM ; Start Logical Block Address
--nlb NUM ; Number of LBAs (NOTE: zero-based value)
[ --nsid 0xNUM ] ; Namespace Identifier for Command Construction
[ --data-input FILE ] ; Path to data input-file
[ --meta-input FILE ] ; Path to meta input-file
With <args> for backend:
[ --subnqn STRING ] ; Subsystem NQN of the NVMe over Fabrics endpoint e.g. 'nqn.2022-06.io.xnvme:ctrlnode1'
[ --hostnqn STRING ] ; The host NQN to use when connecting to NVMe over Fabrics controllers
[ --be STRING ] ; xNVMe backend, e.g. 'linux', 'spdk', 'fbsd', 'macos', 'posix', 'windows'
[ --dev-nsid 0xNUM ] ; Namespace Identifier for Device Handle
[ --admin STRING ] ; xNVMe admin. command-interface, e.g. 'nvme', 'block'
[ --mem STRING ] ; xNVMe buffer/memory manager
[ --direct NUM ] ; Bypass layers
[ --sync STRING ] ; xNVMe sync. command-interface, e.g. 'nvme', 'block'
[ --help ] ; Show usage / help
See 'lblk --help' for other commands
Logical Block Namespace Utility -- ver: {major: 0, minor: 7, patch: 5}