RAPIDDISK(1)

πŸ“¦
version 9.2.0 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute

πŸ’– RAPIDDISK(1) πŸ’–

okay bestie, welcome to the rapiddisk manual page β€” it lives in the GENERAL COMMANDS section of the manual, and it's literally the admin tool for wrangling RapidDisk RAM disk devices and RapidDisk-Cache mappings. sit down, grab a strawberry drink πŸ“, and let's get into it.


✨ NAME ✨

rapiddisk β€” an administration tool to manage the RapidDisk RAM disk devices and RapidDisk-Cache mappings. yes that's the whole vibe. it runs the whole RAM-disk-and-cache situation and it's lowkey iconic for it πŸ’…


🌈 SYNOPSIS 🌈

rapiddisk [ -h | -v ] function [ parameters ]

that's it. that's the shape of it. one function, some parameters, and go off πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

rapiddisk is a RapidDisk module management tool, and its whole job is managing RapidDisk RAM disk devices. it can dynamically create, remove, and resize RAM volumes β€” and if you want, it can map or unmap them as a cache volume onto literally any block device. you can access those drives locally, or export those volumes across an NVMe Target network. no cap, that's a lot of main character energy for one binary 🫢

πŸŽ€ Options πŸŽ€

the lil global flags. short, sweet, does what it says:

  • -h β€” invoke the help menu. your little emergency 411.
  • -v β€” display the version number. for when you need to know exactly what you're running πŸ’–

🌸 Functions 🌸

okay this is the meat of it, bestie. every one of these is a function you pass in:

  • -a β€” attach a RAM disk device (size is in MBytes).
  • -b β€” backend block device absolute path (this is for cache mapping).
  • -c β€” input capacity for size or resize of a RAM disk device (in MBytes).
  • -d β€” detach a RAM disk device.
  • -e β€” export a RapidDisk block device as an NVMe Target.
  • -f β€” erase all data on a specified RapidDisk device. dangerous, fr fr, this one does not play πŸ’€
  • -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. important: the port must not already exist, and the interface must not already be enabled.
  • -j β€” enable JSON formatted output. for the girlies who pipe things πŸŽ€
  • -L β€” lock a RapidDisk block device (set it to read-only).
  • -l β€” list all attached RAM disk devices.
  • -m β€” map a 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). heads up: writeback caching is supplied by the dm-writecache kernel module and is not intended for production use, because it may result in data loss on hardware/power failure. that's not me being dramatic, that's the manpage being dramatic, and it's right 😭
  • -q β€” list all system memory and block device resources.
  • -R β€” revalidate size of an NVMe export using an 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 it to read-write).
  • -u β€” unmap a RapidDisk device from another block device.
  • -X β€” remove the NVMe Target port (it must be unused).
  • -x β€” unexport a RapidDisk block device from an NVMe Target. to remove export to a 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. read that twice, bestie 🧚

⭐ Parameters (if applicable) ⭐

  • [size] β€” specify the desired size of the attaching RAM disk device in MBytes.
  • [mode] β€” Write Through (wt) or Write Around (wa) for cache.

πŸ‘‘ EXAMPLE USAGE πŸ‘‘

the receipts. copy these, they're exact:

rapiddisk -l

rapiddisk -l -j

rapiddisk -a 64

rapiddisk -d rd2

rapiddisk -r rd2 -c 128

rapiddisk -m rd1 -b /dev/sdb

rapiddisk -m rd1 -b /dev/sdb -p wt

rapiddisk -m rd3 -b /dev/mapper/rc-wa_sdb -p wb

rapiddisk -u rc-wt_sdb

rapiddisk -s rc-wt_sdb

rapiddisk -f rd2

rapiddisk -L rd2

rapiddisk -U rd3

rapiddisk -i eth0 -P 1 -t tcp

rapiddisk -i NULL -P 1 -t loop

rapiddisk -X -P 1

rapiddisk -e -b rd3 -P 1 -H nqn.host1

rapiddisk -R -b rd0

rapiddisk -x -b rd3 -P 1 -H nqn.host1

πŸ”₯ MANAGING RAPIDDISK AS AN NVME TARGET πŸ”₯

okay so the NVMe Target side of the RapidDisk suite has a few things you just gotta know first. like, prerequisites. do not skip these, they're giving "read the terms and conditions but they actually matter":

  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

  1. 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

  1. 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. clean exit, slay πŸ’…


🫢 EXIT STATUS 🫢

rapiddisk returns a zero exit status if no error occurs during operation. a non-zero value is returned on error. that's the whole check, bestie, $? never lies ✨


πŸ’œ AUTHORS πŸ’œ

original version: Petros Koutoupis (petros@petroskoutoupis.com) β€” the actual legend who started all of this πŸ‘‘


🌟 SEE ALSO 🌟

view the RapidDisk project page: http://www.rapiddisk.org β€” go look, it's right there 🌈


and that's the whole page, bestie. this one ships on Linux, dated Oct 16 2010, and it's giving RAPIDDISK(1) energy all the way through. go manage some RAM disks, you're doing amazing πŸŽ€πŸ’–βœ¨