doc/bdev: Update documentation with new delete commands

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I4a4b1d122e033a077552b0ae5292a264b0953ecf
Reviewed-on: https://review.gerrithub.io/417278
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Maciej Szwed 2018-06-29 13:49:16 +02:00 committed by Ben Walker
parent 9ff7313fab
commit 06192d281c
3 changed files with 147 additions and 5 deletions

View File

@ -70,7 +70,9 @@ Example response
To remove previously created bdev user can use `delete_bdev` RPC command.
Bdev can be deleted at any time and this will be fully handled by any upper
layers. As an argument user should provide bdev name.
layers. As an argument user should provide bdev name. This RPC command
should be used only for debugging purpose. To remove a particular bdev please
use the delete command specific to its bdev module.
# Malloc bdev {#bdev_config_malloc}
@ -93,6 +95,24 @@ This command will create NVMe bdev of physical device in the system.
This command will create NVMe bdev of NVMe-oF resource.
To remove a NVMe controller use the delete_nvme_controller command.
`rpc.py delete_nvme_controller -t PCIe -a 0000:01:00.0`
This command will remove NVMe controller representing physical device in the system.
`rpc.py delete_nvme_controller -t RDMA -a 192.168.100.1 -f IPv4 -s 4420 -n nqn.2016-06.io.spdk:cnode1`
This command will remove NVMe controller representing NVMe-oF resource.
`rpc.py delete_nvme_controller -c Nvme0`
This command will remove NVMe controller named Nvme0.
`rpc.py delete_nvme_controller -b Nvme0n1`
This command will remove NVMe controller containing bdev named Nvme0n1.
# Null {#bdev_config_null}
The SPDK null bdev driver is a dummy block I/O target that discards all writes and returns undefined
@ -106,6 +126,10 @@ Example command
This command will create an 8 petabyte `Null0` device with block size 4096.
To delete a null bdev use the delete_null_bdev command.
`rpc.py delete_null_bdev Null0`
# Linux AIO bdev {#bdev_config_aio}
The SPDK AIO bdev driver provides SPDK block layer access to Linux kernel block
@ -125,6 +149,10 @@ This command will create `aio0` device from /dev/sda.
This command will create `file` device with block size 8192 from /tmp/file.
To delete an aio bdev use the delete_aio_bdev command.
`rpc.py delete_aio_bdev aio0`
# Ceph RBD {#bdev_config_rbd}
The SPDK RBD bdev driver provides SPDK block layer access to Ceph RADOS block
@ -138,6 +166,10 @@ Example command
This command will create a bdev that represents the 'foo' image from a pool called 'rbd'.
To remove a block device representation use the delete_rbd_bdev command.
`rpc.py delete_rbd_bdev Rbd0`
# GPT (GUID Partition Table) {#bdev_config_gpt}
The GPT virtual bdev driver is enabled by default and does not require any configuration.
@ -284,6 +316,10 @@ Example command
`rpc.py construct_pmem_bdev /path/to/pmem_pool -n pmem`
To remove a block device representation use the delete_pmem_bdev command.
`rpc.py delete_pmem_bdev pmem`
# Virtio SCSI {#bdev_config_virtio_scsi}
The Virtio-SCSI driver allows creating SPDK block devices from Virtio-SCSI LUNs.
@ -306,7 +342,7 @@ one LUN (LUN0) per SCSI device. The above 2 commands will output names of all ex
Virtio-SCSI devices can be removed with the following command
`rpc.py remove_virtio_scsi_bdev VirtioScsi0`
`rpc.py remove_virtio_bdev VirtioScsi0`
Removing a Virtio-SCSI device will destroy all its bdevs.
@ -320,5 +356,6 @@ Virtio-Block bdevs are constructed the same way as Virtio-SCSI ones.
`rpc.py construct_virtio_pci_blk_bdev 0000:01:00.0 VirtioBlk1`
Since they export only a single bdev, the Virtio-Block driver doesn't offer additional
remove/destruct RPC calls. @ref bdev_ug_delete_bdev should be used instead.
Virtio-BLK devices can be removed with the following command
`rpc.py remove_virtio_bdev VirtioBlk0`

View File

@ -243,6 +243,7 @@ Example response:
"construct_virtio_pci_blk_bdev",
"construct_virtio_user_blk_bdev",
"get_virtio_scsi_devs",
"remove_virtio_bdev",
"remove_virtio_scsi_bdev",
"construct_virtio_pci_scsi_bdev",
"construct_virtio_user_scsi_bdev",
@ -255,6 +256,7 @@ Example response:
"construct_error_bdev",
"construct_passthru_bdev",
"apply_nvme_firmware",
"delete_nvme_controller",
"construct_nvme_bdev",
"construct_null_bdev",
"delete_malloc_bdev",
@ -939,6 +941,73 @@ Example response:
}
~~~
## delete_nvme_controller {#rpc_delete_nvme_controller}
Delete NVMe controller. To delete NVMe controller user may use its name or transport ID.
### Parameters
Name | Optional | Type | Description
----------------------- | -------- | ----------- | -----------
name | Optional | string | Controller name
trtype | Optional | string | NVMe-oF target trtype: rdma or pcie
traddr | Optional | string | NVMe-oF target address: an ip address or BDF
adrfam | Optional | string | NVMe-oF target adrfam: ipv4, ipv6, ib, fc or intra_host
trsvcid | Optional | string | NVMe-oF target trsvcid
subnqn | Optional | string | NVMe-oF target subnqn
### Example
Example requests:
~~~
{
"params": {
"name": "Nvme0"
},
"jsonrpc": "2.0",
"method": "delete_nvme_controller",
"id": 1
}
~~~
~~~
{
"params": {
"trtype": "pcie",
"traddr": "0000:01:00.0"
},
"jsonrpc": "2.0",
"method": "delete_nvme_controller",
"id": 1
}
~~~
~~~
{
"params": {
"trtype": "rdma",
"traddr": "192.168.0.13",
"adrfam": "ipv4",
"trsvcid": "4420",
"subnqn": "nqn.2018-07.io.spdk:cnode1"
},
"jsonrpc": "2.0",
"method": "delete_nvme_controller",
"id": 1
}
~~~
Example response:
~~~
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
~~~
## construct_rbd_bdev {#rpc_construct_rbd_bdev}
Construct @ref bdev_config_rbd bdev
@ -1605,6 +1674,42 @@ Example response:
}
~~~
## remove_virtio_bdev {#rpc_remove_virtio_bdev}
Remove a Virtio device. This command can be used to remove any type of virtio device.
### Parameters
Name | Optional | Type | Description
----------------------- | -------- | ----------- | -----------
name | Required | string | Virtio name
### Example
Example request:
~~~
{
"params": {
"name": "VirtioUser0"
},
"jsonrpc": "2.0",
"method": "remove_virtio_bdev",
"id": 1
}
~~~
Example response:
~~~
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
~~~
# NVMe-oF Target {#jsonrpc_components_nvmf_tgt}
## get_nvmf_subsystems method {#rpc_get_nvmf_subsystems}

View File

@ -393,7 +393,7 @@ scripts/rpc.py remove_vhost_scsi_target vhost.0 0
Removing an entire bdev will hot-detach it from a controller as well.
~~~{.sh}
scripts/rpc.py delete_bdev Malloc0
scripts/rpc.py delete_malloc_bdev Malloc0
~~~
# Known bugs and limitations {#vhost_bugs}