From: Matias Bjørling Date: Thu, 2 Jun 2016 14:17:51 +0000 (+0200) Subject: Add documentation for LightNVMcommands X-Git-Tag: v0.8~43^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=880e46c4f5cebd325ade8a9e47138a091bd4e277;p=users%2Fsagi%2Fnvme-cli.git Add documentation for LightNVMcommands Adds detailed documentation on each of these commands: - lnvm-list - lnvm-info - lnvm-id-ns - lnvm-init - lnvm-create - lnvm-remove - lnvm-factory - lnvm-diag-bbtbl - lnvm-diag-set-bbtbl --- diff --git a/Documentation/nvme-lnvm-create.txt b/Documentation/nvme-lnvm-create.txt new file mode 100644 index 00000000..3c9109dd --- /dev/null +++ b/Documentation/nvme-lnvm-create.txt @@ -0,0 +1,60 @@ +nvme-lnvm-create(1) +=================== + +NAME +---- +nvme-lnvm-create - Instantiate a target on top of a LightNVM enabled device + +SYNOPSIS +-------- +[verse] +'nvme lnvm-create' [--device-name= | -d ] + [--target-name= | -n ] + [--target-type= | -t ] + [--lun-begin | -b ] + [--lun-end | -e ] + +DESCRIPTION +----------- +Instantiate a target on top of a LightNVM enabled device. This exposes the +physical for the user to use. + +The target name is the name of which the media is exposed as in +/dev/ + +The target type is the target to be instantiated. Typically pblk or rrpc. + +LUN begin and end defines the range of LUNs to use for a target instantiation. + +OPTIONS +------- +--device-name=:: +-d :: + Device name to initialize. + +--target-name=:: +-n :: + Target name of the device to initialize. For example: target0. + +--target-type=:: +-t :: + Target type of the device to use. For example: pblk + +--lun-begin :: +-b :: + Begin LUN id offset to use for target + +--lun-end :: +-e :: + End LUN id offset to use for target + +EXAMPLES +-------- +* Initialize nvme0n1 with pblk target with 64 LUNs. +------------ +# nvme lnvm-create -d nvme0n1 -t pblk -n target0 -b 0 -e 63 +------------ + +NVME +---- +Part of the nvme-user suite diff --git a/Documentation/nvme-lnvm-diag-bbtbl.txt b/Documentation/nvme-lnvm-diag-bbtbl.txt new file mode 100644 index 00000000..7324807c --- /dev/null +++ b/Documentation/nvme-lnvm-diag-bbtbl.txt @@ -0,0 +1,65 @@ +nvme-lnvm-diag-bbtbl(1) +======================= + +NAME +---- +nvme-lnvm-diag-bbtbl - Diagnose the bad block table + +SYNOPSIS +-------- +[verse] +'nvme lnvm-diag-bbtbl' [--namespace-id= | -n ] + [--channel-id= | -c ] + [--lun-id= | -l ] + [--raw-binary | -b] + +DESCRIPTION +----------- +Retrieve the bad block table for a given channel and lun. + +The statistics will be shown in the default case, and the actual output bad +block information can be retrieved when --raw-binary is passed. + +The raw binary output follows this format: + +Channel 0, LUN0 (Dual plane flash) + +Byte 0 -> Plane 0, Block 0 +Byte 1 -> Plane 1, Block 0 +Byte 2 -> Plane 0, Block 1 +... + +OPTIONS +------- +--namespace-id=:: +-n :: + Namespace id to use + +--channel-id=:: +-c:: + Channel id + +--lun-id=:: +-l:: + LUN id + +--raw-binary:: +-b:: + Returns the bad block table in binary form without statistics. + +EXAMPLES +-------- +* Retrieve bad block table statistics for physical device nvme0, channel 0, and +lun 0: +------------ +# nvme lnvm-diag-bbtbl /dev/nvme0 -c 0 -n 0 +------------ + +* Display the bad block table in raw form without statistics for same query: +------------ +# nvme lnvm-diag-bbtbl /dev/nvme0 -c 0 -n 0 -b | hexdump +------------ + +NVME +---- +Part of the nvme-user suite diff --git a/Documentation/nvme-lnvm-diag-set-bbtbl.txt b/Documentation/nvme-lnvm-diag-set-bbtbl.txt new file mode 100644 index 00000000..f5dd0040 --- /dev/null +++ b/Documentation/nvme-lnvm-diag-set-bbtbl.txt @@ -0,0 +1,63 @@ +nvme-lnvm-diag-set-bbtbl(1) +=========================== + +NAME +---- +nvme-lnvm-diag-set-bbtbl - Set a block state in the bad block table + +SYNOPSIS +-------- +[verse] +'nvme lnvm-diag-set-bbtbl' [--namespace-id= | -n ] + [--channel-id= | -c ] + [--lun-id= | -l ] + [--plane-id= | -p ] + [--block-id= | -b ] + [--value= | -v ] + +DESCRIPTION +----------- +Set the bad block table for a given channel, lun, plane and block with value v. + +For each block available, the status byte is read as follows: + +0: Good block +1: Bad block +2: Grown bad block +4: Device reserved block +8: Host-side reserved block +16: Media managed reserved block + +OPTIONS +------- +--namespace-id=:: +-n :: + Namespace id to use + +--channel-id:: +-c:: + Channel id + +--lun-id:: +-l:: + LUN id + +--plane-id:: +-p:: + Plane id + +--block-id:: +-b:: + Block id + +EXAMPLES +-------- +* Set channel 0, lun 0, plane 0, block 10 to bad block value 2 (grown bad) + on physical device /dev/nvme0 +------------ +# nvme lnvm-diag-set-bbtbl /dev/nvme0 -c 0 -l 0 -p 0 -b 10 -v 2 +------------ + +NVME +---- +Part of the nvme-user suite diff --git a/Documentation/nvme-lnvm-factory.txt b/Documentation/nvme-lnvm-factory.txt new file mode 100644 index 00000000..baa7a691 --- /dev/null +++ b/Documentation/nvme-lnvm-factory.txt @@ -0,0 +1,54 @@ +nvme-lnvm-factory(1) +==================== + +NAME +---- +nvme-lnvm-factory - Factory reset a LightNVM device + +SYNOPSIS +-------- +[verse] +'nvme lnvm-factory' [--device-name= | -d ] + [--erase-only-marked | -e] + [--clear-host-side-blks | -s] + [--clear-bb-blks | -b] + +DESCRIPTION +----------- +Instantiate a target on top of a LightNVM enabled device. This exposes the +physical for the user to use. + +OPTIONS +------- +--device-name=:: +-d :: + Device name to factory initialize + +--erase-only-marked:: +-e:: + Erases only blocks that are marked in the bad block list + +--clear-host-side-blks:: +-s:: + Remove host-side bad block marks. This clear the media manager + registration + +--clear-bb-blks:: +-b:: + Removes the grown bad block marks. Allowing them to be rediscovered. + +EXAMPLES +-------- +* Factory reset of device nvme0n1 +------------ +# nvme lnvm-factory -d nvme0n1 +------------ + +* Complete factory reset of device nvme0n1 +------------ +# nvme lnvm-factory -d nvme0n1 -s -b +------------ + +NVME +---- +Part of the nvme-user suite diff --git a/Documentation/nvme-lnvm-id-ns.txt b/Documentation/nvme-lnvm-id-ns.txt new file mode 100644 index 00000000..1a3565fb --- /dev/null +++ b/Documentation/nvme-lnvm-id-ns.txt @@ -0,0 +1,49 @@ +nvme-lnvm-id-ns(1) +================== + +NAME +---- +nvme-lnvm-id-ns - Identify Geometry for LightNVM NVMe device + +SYNOPSIS +-------- +[verse] +'nvme lnvm-id-ns' [--namespace-id= | -n ] + [--force | -f] + [--raw-binary | -b] + [--human-readable | -H] + +DESCRIPTION +----------- +Send an Identify Geometry command to the given LightNVM device, returns +properties of the specified namespace in either human-readable or binary +format. + +OPTIONS +------- +--namespace-id=:: +-n :: + Retrieve the geometry from the selected namespace. + +--force:: +-f:: + Try to read the data and assume it is a LightNVM device + +--raw-binary:: +-b:: + Output the raw output + +--human-readable:: +-H:: + Output the status in human readable format + +EXAMPLES +-------- +* Retrieve the geometry from nvme0 +------------ +# nvme lnvm-id-ns /dev/nvme0 -n 1 +------------ + +NVME +---- +Part of the nvme-user suite diff --git a/Documentation/nvme-lnvm-info.txt b/Documentation/nvme-lnvm-info.txt new file mode 100644 index 00000000..e755c9c4 --- /dev/null +++ b/Documentation/nvme-lnvm-info.txt @@ -0,0 +1,27 @@ +nvme-lnvm-info(1) +================= + +NAME +---- +nvme-lnvm-info - Show general information and registered target types with LightNVM + +SYNOPSIS +-------- +[verse] +'nvme lnvm-info' + +DESCRIPTION +----------- +Show general information and registered target types with LightNVM. + +OPTIONS +------- +No options yet. + +EXAMPLES +-------- +No examples yet. + +NVME +---- +Part of the nvme-user suite diff --git a/Documentation/nvme-lnvm-init.txt b/Documentation/nvme-lnvm-init.txt new file mode 100644 index 00000000..0d922a98 --- /dev/null +++ b/Documentation/nvme-lnvm-init.txt @@ -0,0 +1,44 @@ +nvme-lnvm-init(1) +================= + +NAME +---- +nvme-lnvm-init - Initialize LightNVM device with media manager + +SYNOPSIS +-------- +[verse] +'nvme lnvm-init' [--device-name= | -d ] + [--mediamgr-name | -m] + +DESCRIPTION +----------- +Initialize LightNVM device. A LightNVM/Open-Channel SSD must have a media +manager associated before it can be exposed to the user. The default is to +initialize the general media manager on top of the device. + +OPTIONS +------- +--device-name=:: +-d :: + Device name to initialize. + +--mediamgr-name=:: +-m :: + Media Manager name to use for initialization. + +EXAMPLES +-------- +* Initialize nvme0n1 +------------ +# nvme lnvm-init -d nvme0n1 +------------ + +* Initialize nvme0n1 with gennvm media manager (default media manager) +------------ +# nvme lnvm-init -d nvme0n1 -m gennvm +------------ + +NVME +---- +Part of the nvme-user suite diff --git a/Documentation/nvme-lnvm-list.txt b/Documentation/nvme-lnvm-list.txt new file mode 100644 index 00000000..959f6b97 --- /dev/null +++ b/Documentation/nvme-lnvm-list.txt @@ -0,0 +1,27 @@ +nvme-lnvm-list(1) +================= + +NAME +---- +nvme-lnvm-list - List all recognized LightNVM NVMe devices + +SYNOPSIS +-------- +[verse] +'nvme lnvm-list' + +DESCRIPTION +----------- +List all registered LightNVM devices. + +OPTIONS +------- +No options yet. + +EXAMPLES +-------- +No examples yet. + +NVME +---- +Part of the nvme-user suite diff --git a/Documentation/nvme-lnvm-remove.txt b/Documentation/nvme-lnvm-remove.txt new file mode 100644 index 00000000..f5cdd6e1 --- /dev/null +++ b/Documentation/nvme-lnvm-remove.txt @@ -0,0 +1,32 @@ +nvme-lnvm-remove(1) +=================== + +NAME +---- +nvme-lnvm-remove - Remove an initialized LightNVM target. + +SYNOPSIS +-------- +[verse] +'nvme lnvm-remove' [--target-name= | -n ] + +DESCRIPTION +----------- +Remove an initialized target. + +The target name is the name of which the media is exposed as in +/dev/ + +OPTIONS +------- +--target-name=:: +-n :: + Target name of the device to initialize. For example: target0. + +EXAMPLES +-------- +None yet + +NVME +---- +Part of the nvme-user suite