]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Add documentation for LightNVMcommands
authorMatias Bjørling <m@bjorling.me>
Thu, 2 Jun 2016 14:17:51 +0000 (16:17 +0200)
committerMatias Bjørling <m@bjorling.me>
Thu, 2 Jun 2016 14:38:10 +0000 (16:38 +0200)
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

Documentation/nvme-lnvm-create.txt [new file with mode: 0644]
Documentation/nvme-lnvm-diag-bbtbl.txt [new file with mode: 0644]
Documentation/nvme-lnvm-diag-set-bbtbl.txt [new file with mode: 0644]
Documentation/nvme-lnvm-factory.txt [new file with mode: 0644]
Documentation/nvme-lnvm-id-ns.txt [new file with mode: 0644]
Documentation/nvme-lnvm-info.txt [new file with mode: 0644]
Documentation/nvme-lnvm-init.txt [new file with mode: 0644]
Documentation/nvme-lnvm-list.txt [new file with mode: 0644]
Documentation/nvme-lnvm-remove.txt [new file with mode: 0644]

diff --git a/Documentation/nvme-lnvm-create.txt b/Documentation/nvme-lnvm-create.txt
new file mode 100644 (file)
index 0000000..3c9109d
--- /dev/null
@@ -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=<DEVICE> | -d <DEVICE>]
+                       [--target-name=<TARGET> | -n <TARGET>]
+                       [--target-type=<TARGETTYPE> | -t <TARGETTYPE>]
+                       [--lun-begin <NUM> | -b <NUM>]
+                       [--lun-end <NUM> | -e <NUM>]
+
+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/<targetname>
+
+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=<DEVICE>::
+-d <DEVICE>::
+       Device name to initialize.
+
+--target-name=<TARGET>::
+-n <TARGET>::
+       Target name of the device to initialize. For example: target0.
+
+--target-type=<TARGETTYPE>::
+-t <TARGETTYPE>::
+       Target type of the device to use. For example: pblk
+
+--lun-begin <NUM>::
+-b <NUM>::
+       Begin LUN id offset to use for target
+
+--lun-end <NUM>::
+-e <NUM>::
+       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 (file)
index 0000000..7324807
--- /dev/null
@@ -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=<NUM> | -n <NUM>]
+                       [--channel-id=<CHID> | -c <CHID>]
+                       [--lun-id=<LUNID> | -l <LUNID>]
+                       [--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=<NUM>::
+-n <NUM>::
+       Namespace id to use
+
+--channel-id=<NUM>::
+-c::
+       Channel id
+
+--lun-id=<NUM>::
+-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 (file)
index 0000000..f5dd004
--- /dev/null
@@ -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=<NUM> | -n <NUM>]
+                       [--channel-id=<CHID> | -c <CHID>]
+                       [--lun-id=<LUNID> | -l <LUNID>]
+                       [--plane-id=<PLANEID> | -p <PLANEID>]
+                       [--block-id=<BLKID> | -b <BLKID>]
+                       [--value=<NUM> | -v <NUM>]
+
+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=<NUM>::
+-n <NUM>::
+       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 (file)
index 0000000..baa7a69
--- /dev/null
@@ -0,0 +1,54 @@
+nvme-lnvm-factory(1)
+====================
+
+NAME
+----
+nvme-lnvm-factory - Factory reset a LightNVM device
+
+SYNOPSIS
+--------
+[verse]
+'nvme lnvm-factory' [--device-name=<DEVICE> | -d <DEVICE>]
+                       [--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=<DEVICE>::
+-d <DEVICE>::
+       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 (file)
index 0000000..1a3565f
--- /dev/null
@@ -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' <device> [--namespace-id=<nsid> | -n <nsid>]
+                       [--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=<nsid>::
+-n <nsid>::
+       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 (file)
index 0000000..e755c9c
--- /dev/null
@@ -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 (file)
index 0000000..0d922a9
--- /dev/null
@@ -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=<DEVICE> | -d <DEVICE>]
+                       [--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=<DEVICE>::
+-d <DEVICE>::
+       Device name to initialize.
+
+--mediamgr-name=<MediaMgr>::
+-m <MediaMgr>::
+       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 (file)
index 0000000..959f6b9
--- /dev/null
@@ -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 (file)
index 0000000..f5cdd6e
--- /dev/null
@@ -0,0 +1,32 @@
+nvme-lnvm-remove(1)
+===================
+
+NAME
+----
+nvme-lnvm-remove - Remove an initialized LightNVM target.
+
+SYNOPSIS
+--------
+[verse]
+'nvme lnvm-remove' [--target-name=<TARGET> | -n <TARGET>]
+
+DESCRIPTION
+-----------
+Remove an initialized target.
+
+The target name is the name of which the media is exposed as in
+/dev/<TARGET>
+
+OPTIONS
+-------
+--target-name=<TARGET>::
+-n <TARGET>::
+       Target name of the device to initialize. For example: target0.
+
+EXAMPLES
+--------
+None yet
+
+NVME
+----
+Part of the nvme-user suite