rapiddisk - An administration tool to manage the RapidDisk RAM
disk devices and RapidDisk-Cache mappings.
rapiddisk [ -h | -v ] function [ parameters ]
rapiddisk is a RapidDisk module management tool to manage
RapidDisk RAM disk devices. Dynamically create, remove, resize RAM volumes
and if desired, map or unmap them as a cache volume to any block device.
Access those drives locally or export those volumes across an NVMe Target
network.
- -h
- Invoke the help menu.
- -v
- Display the version number.
- -a
- Attach RAM disk device (size in MBytes).
- -b
- Backend block device absolute path (for cache mapping).
- -c
- Input capacity for size or resize of RAM disk device (in MBytes).
- -d
- Detach RAM disk device.
- -e
- Export a RapidDisk block device as an NVMe Target.
- -f
- Erase all data to a specified RapidDisk device (dangerous).
- -g
- Do not print header.
- -H
- The host to export / unexport the NVMe Target to / from.
- -i
- Define the network interface to enable for NVMe Target exporting. Port
must not already exist and interface must not be already enabled.
- -j
- Enable JSON formatted output.
- -L
- Lock a RapidDisk block device (set to read-only).
- -l
- List all attached RAM disk devices.
- -m
- Map an RapidDisk device as a caching node to another block device.
- -N
- List only enabled NVMe Target ports.
- -n
- List RapidDisk enabled NVMe Target exports.
- -P
- The port to export / unexport the NVMe Target to / from.
- -p
- Define cache policy: write-through (wt), write-around (wa) or writeback
(wb) (dangerous) (default: write-through). Writeback caching is supplied
by the dm-writecache kernel module and is not intended for production use
as it may result in data loss on hardware/power failure.
- -q
- List all system memory and block device resources.
- -R
- Revalidate size of NVMe export using existing RapidDisk device.
- -r
- Dynamically grow the size of an existing RapidDisk device.
- -s
- Obtain RapidDisk-Cache Mappings statistics.
- -t
- Define the NVMe Target port's transfer protocol (i.e. tcp, rdma or
loop).
- -U
- Unlock a RapidDisk block device (set to read-write).
- -u
- Unmap a RapidDisk device from another block device.
- -X
- Remove the NVMe Target port (must be unused).
- -x
- Unexport a RapidDisk block device from an NVMe Target. To remove export to
host or port, only define the host and / or port. Not defining a host or
port will result in the block device being removed from the NVMe Target
subsystem.
- [size]
- Specify desired size of attaching RAM disk device in MBytes.
- [mode]
- Write Through (wt) or Write Around (wa) for cache.
There are a few things that need to be known when using the NVMe
Target features of the RapidDisk suite.
- 1.
- In order to map any RapidDisk device and export it in the NVMe Target
framework, the nvmet and the nvmet-tcp or nvmet-rdma kernel modules must
be inserted.
- 2.
- At least one Ethernet interface will need to be configured as a target
port to export the RapidDisk volume from.
ex) rapiddisk -i eth -P 1 -t tcp
- 3.
- When exporting a volume, a RapidDisk volume and a target port must be
defined. If a host NQN is not defined, the administration utility will
provide access to any host NQN. Note - a target can be exported across
more than one target port.
ex) rapiddisk -e -b rd3 -P 1
If a host NQN is defined, access is restricted to only those host
NQNs. Note - the following command example can be repeated multiple times to
add additional host NQNs for the specified target export.
ex) rapiddisk -e -b rd3 -P 1 -H nqn.host1
- 4.
- Unexporting RapidDisk volumes looks a bit different than exporting. If a
host NQN is defined for a specified target, only that NQN will be removed
from accessing the exported target.
ex) rapiddisk -x -b rd3 -H nqn.host1
Removing all allowed host NQNs will revert access to any and all
host NQNs requesting access to the target.
If a target port is defined, the exported target will not be
exported from the interface if one condition is met: the target has no
defined allowed host NQNs.
ex) rapiddisk -x -b rd3 -P 1 -H nqn.host1
ex) rapiddisk -x -b rd3 -P 1
And if there are no defined allowed host NQNs and the target is
not being exported across any target ports, the entire target is removed
from the subsystem.
rapiddisk returns a zero exit status if no error occurs during
operation. A non-zero value is returned on error.
Original version: Petros Koutoupis
(petros@petroskoutoupis.com)
View the RapidDisk project page: http://www.rapiddisk.org