nvm_vblk¶
NVM Virtual Block (nvm_vblk_*) -- Ver { major(0), minor(1), patch(5) }
Erase, write, and read virtual blocks
Usage:
nvm_vblk erase dev_path 0xADDR [-h] [-v]
nvm_vblk write dev_path 0xADDR [-h] [-v] [-i FILE]
nvm_vblk read dev_path 0xADDR [-h] [-v] [-o FILE]
nvm_vblk pad dev_path 0xADDR [-h] [-v]
nvm_vblk copy dev_path 0xSRC 0xDST [-h] [-v]
nvm_vblk set_erase dev_path 0xADDR [0xADDR...] [-h] [-v]
nvm_vblk set_write dev_path 0xADDR [0xADDR...] [-h] [-v] [-i FILE]
nvm_vblk set_read dev_path 0xADDR [0xADDR...] [-h] [-v] [-o FILE]
nvm_vblk set_pad dev_path 0xADDR [0xADDR...] [-h] [-v]
nvm_vblk line_erase dev_path ch_bgn ch_end lun_bgn lun_end blk [-h] [-v]
nvm_vblk line_write dev_path ch_bgn ch_end lun_bgn lun_end blk [-h] [-v] [-i FILE]
nvm_vblk line_read dev_path ch_bgn ch_end lun_bgn lun_end blk [-h] [-v] [-o FILE]
nvm_vblk line_pread dev_path ch_bgn ch_end lun_bgn lun_end blk count offset [-h] [-v] [-o FILE]
nvm_vblk line_pad dev_path ch_bgn ch_end lun_bgn lun_end blk [-h] [-v]
Options:
-h Print usage
-v Dump CLI state to stdout
-i FILE Path to input file
-o FILE Path to output file
See: http://lightnvm.io/liblightnvm/cli/ for usage examples
A virtual block consists, at a minimum, of the physical blocks at a given block address across all planes in a LUN. The minimum construction encapsulates managing address-construction across planes and setting plane hints. See section Plane Span.
Increased utilization of parallel units in a device is achieved by constructing a virtual block as either a Block Set or a Block Line.
The write operation by default uses a synthetically constructed payload, use
the -i FILE
option to provide a payload from file. Payloads can likewise be
dumped to file system when read using the -o FILE
option.
Tip
See section Environment Variables for a full list of environment variables modifying command behavior
See also
See nvm_addr on how to construct the 0xADDR
parameter
Plane Span¶
Construct a virtual block providing the address of block 42 in LUN 5 on channel 2:
nvm_addr s20_to_gen /dev/nvme0n1 4 2 142 0
naddrs: 1
addrs:
- {val: 0x0402008e00000000, pugrp: 04, punit: 02, chunk: 0142, sectr: 0000}
Erase¶
nvm_vblk erase /dev/nvme0n1 0x0402008e00000000
vblk:
dev: {pmode: 'SNGL'}
nblks: 1
nmbytes: 24
pos_write: 0
pos_read: 0
flags: 0x08c8
naddrs: 1
addrs:
- {val: 0x0402008e00000000, pugrp: 04, punit: 02, chunk: 0142, sectr: 0000}
nvm_vblk_erase: {elapsed: 0.0050, mb: 24.00, mbsec: 4795.30}
Write¶
nvm_vblk write /dev/nvme0n1 0x0402008e00000000
vblk:
dev: {pmode: 'SNGL'}
nblks: 1
nmbytes: 24
pos_write: 0
pos_read: 0
flags: 0x08c8
naddrs: 1
addrs:
- {val: 0x0402008e00000000, pugrp: 04, punit: 02, chunk: 0142, sectr: 0000}
nvm_buf_alloc: {elapsed: 0.000004}
nvm_buf_fill: {elapsed: 0.023793}
nvm_vblk_write: {elapsed: 0.8323, mb: 24.00, mbsec: 28.84}
Read¶
nvm_vblk read /dev/nvme0n1 0x0402008e00000000
vblk:
dev: {pmode: 'SNGL'}
nblks: 1
nmbytes: 24
pos_write: 0
pos_read: 0
flags: 0x08c8
naddrs: 1
addrs:
- {val: 0x0402008e00000000, pugrp: 04, punit: 02, chunk: 0142, sectr: 0000}
nvm_buf_alloc: {elapsed: 0.000017}
nvm_buf_fill: {elapsed: 0.015120}
nvm_vblk_read: {elapsed: 0.1971, mb: 24.00, mbsec: 121.79}
Block Set¶
Construct a virtual block using an arbitrary set of physical block addresses. E.g. construct a virtual block spanning the physical blocks:
(0x0000000000000002){ ch(00), lun(00), pl(0), blk(0002), pg(000), sec(0) }
(0x0a0700000000014d){ ch(10), lun(07), pl(0), blk(0333), pg(000), sec(0) }
(0x0301000000000014){ ch(03), lun(01), pl(0), blk(0020), pg(000), sec(0) }
(0x0500000000000190){ ch(05), lun(00), pl(0), blk(0400), pg(000), sec(0) }
Erase¶
nvm_vblk set_erase /dev/nvme0n1 0x0000008e00000000 0x0100008e00000000 0x0200008e00000000 0x0300008e00000000
vblk:
dev: {pmode: 'SNGL'}
nblks: 4
nmbytes: 96
pos_write: 0
pos_read: 0
flags: 0x08c8
naddrs: 4
addrs:
- {val: 0x0000008e00000000, pugrp: 00, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0100008e00000000, pugrp: 01, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0200008e00000000, pugrp: 02, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0300008e00000000, pugrp: 03, punit: 00, chunk: 0142, sectr: 0000}
nvm_vblk_erase: {elapsed: 0.0051, mb: 96.00, mbsec: 18757.74}
Write¶
nvm_vblk set_write /dev/nvme0n1 0x0000008e00000000 0x0100008e00000000 0x0200008e00000000 0x0300008e00000000
vblk:
dev: {pmode: 'SNGL'}
nblks: 4
nmbytes: 96
pos_write: 0
pos_read: 0
flags: 0x08c8
naddrs: 4
addrs:
- {val: 0x0000008e00000000, pugrp: 00, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0100008e00000000, pugrp: 01, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0200008e00000000, pugrp: 02, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0300008e00000000, pugrp: 03, punit: 00, chunk: 0142, sectr: 0000}
nvm_buf_alloc: {elapsed: 0.000011}
nvm_buf_fill: {elapsed: 0.062939}
nvm_vblk_write: {elapsed: 0.8687, mb: 96.00, mbsec: 110.52}
Read¶
nvm_vblk set_read /dev/nvme0n1 0x0000008e00000000 0x0100008e00000000 0x0200008e00000000 0x0300008e00000000
vblk:
dev: {pmode: 'SNGL'}
nblks: 4
nmbytes: 96
pos_write: 0
pos_read: 0
flags: 0x08c8
naddrs: 4
addrs:
- {val: 0x0000008e00000000, pugrp: 00, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0100008e00000000, pugrp: 01, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0200008e00000000, pugrp: 02, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0300008e00000000, pugrp: 03, punit: 00, chunk: 0142, sectr: 0000}
nvm_buf_alloc: {elapsed: 0.000018}
nvm_buf_fill: {elapsed: 0.047538}
nvm_vblk_read: {elapsed: 0.1788, mb: 96.00, mbsec: 536.84}
Block Line¶
Construct a virtual block using block 10 in the ranges channel[0,0] and LUN[0,3]. That is, Block ten in the first four LUNs of channel 0.
Erase¶
nvm_vblk line_erase /dev/nvme0n1 0 4 0 2 142
vblk:
dev: {pmode: 'SNGL'}
nblks: 15
nmbytes: 360
pos_write: 0
pos_read: 0
flags: 0x08c8
naddrs: 15
addrs:
- {val: 0x0000008e00000000, pugrp: 00, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0100008e00000000, pugrp: 01, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0200008e00000000, pugrp: 02, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0300008e00000000, pugrp: 03, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0400008e00000000, pugrp: 04, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0001008e00000000, pugrp: 00, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0101008e00000000, pugrp: 01, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0201008e00000000, pugrp: 02, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0301008e00000000, pugrp: 03, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0401008e00000000, pugrp: 04, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0002008e00000000, pugrp: 00, punit: 02, chunk: 0142, sectr: 0000}
- {val: 0x0102008e00000000, pugrp: 01, punit: 02, chunk: 0142, sectr: 0000}
- {val: 0x0202008e00000000, pugrp: 02, punit: 02, chunk: 0142, sectr: 0000}
- {val: 0x0302008e00000000, pugrp: 03, punit: 02, chunk: 0142, sectr: 0000}
- {val: 0x0402008e00000000, pugrp: 04, punit: 02, chunk: 0142, sectr: 0000}
nvm_vblk_erase: {elapsed: 0.0052, mb: 360.00, mbsec: 69453.86}
Write¶
nvm_vblk line_write /dev/nvme0n1 0 4 0 2 142
vblk:
dev: {pmode: 'SNGL'}
nblks: 15
nmbytes: 360
pos_write: 0
pos_read: 0
flags: 0x08c8
naddrs: 15
addrs:
- {val: 0x0000008e00000000, pugrp: 00, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0100008e00000000, pugrp: 01, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0200008e00000000, pugrp: 02, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0300008e00000000, pugrp: 03, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0400008e00000000, pugrp: 04, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0001008e00000000, pugrp: 00, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0101008e00000000, pugrp: 01, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0201008e00000000, pugrp: 02, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0301008e00000000, pugrp: 03, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0401008e00000000, pugrp: 04, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0002008e00000000, pugrp: 00, punit: 02, chunk: 0142, sectr: 0000}
- {val: 0x0102008e00000000, pugrp: 01, punit: 02, chunk: 0142, sectr: 0000}
- {val: 0x0202008e00000000, pugrp: 02, punit: 02, chunk: 0142, sectr: 0000}
- {val: 0x0302008e00000000, pugrp: 03, punit: 02, chunk: 0142, sectr: 0000}
- {val: 0x0402008e00000000, pugrp: 04, punit: 02, chunk: 0142, sectr: 0000}
nvm_buf_alloc: {elapsed: 0.000015}
nvm_buf_fill: {elapsed: 0.200353}
nvm_vblk_write: {elapsed: 0.8798, mb: 360.00, mbsec: 409.19}
Read¶
nvm_vblk line_read /dev/nvme0n1 0 4 0 2 142
vblk:
dev: {pmode: 'SNGL'}
nblks: 15
nmbytes: 360
pos_write: 0
pos_read: 0
flags: 0x08c8
naddrs: 15
addrs:
- {val: 0x0000008e00000000, pugrp: 00, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0100008e00000000, pugrp: 01, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0200008e00000000, pugrp: 02, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0300008e00000000, pugrp: 03, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0400008e00000000, pugrp: 04, punit: 00, chunk: 0142, sectr: 0000}
- {val: 0x0001008e00000000, pugrp: 00, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0101008e00000000, pugrp: 01, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0201008e00000000, pugrp: 02, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0301008e00000000, pugrp: 03, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0401008e00000000, pugrp: 04, punit: 01, chunk: 0142, sectr: 0000}
- {val: 0x0002008e00000000, pugrp: 00, punit: 02, chunk: 0142, sectr: 0000}
- {val: 0x0102008e00000000, pugrp: 01, punit: 02, chunk: 0142, sectr: 0000}
- {val: 0x0202008e00000000, pugrp: 02, punit: 02, chunk: 0142, sectr: 0000}
- {val: 0x0302008e00000000, pugrp: 03, punit: 02, chunk: 0142, sectr: 0000}
- {val: 0x0402008e00000000, pugrp: 04, punit: 02, chunk: 0142, sectr: 0000}
nvm_buf_alloc: {elapsed: 0.000008}
nvm_buf_fill: {elapsed: 0.162975}
nvm_vblk_read: {elapsed: 0.2652, mb: 360.00, mbsec: 1357.63}