PiSCSI DOCUMENTATION
man 1

scsictl

Sends management commands to the piscsi process

SCSICTL(1) General Commands Manual SCSICTL(1)

scsictlSends management commands to the piscsi process

scsictl [-b BLOCK_SIZE] [-C FILENAME:FILESIZE] [-c CMD] [-d FILENAME] [-E FILENAME] [-F IMAGE_FOLDER] [-f FILE|PARAM] [-h HOST] [-i ID[: LUN]] [-L LOG_LEVEL] [-n NAME] [-P] [-p PORT] [-R CURRENT_NAME:NEW_NAME] [-r RESERVED_IDS] [-s [FOLDER_PATTERN:FILE_PATTERN:OPERATIONS]] [-t TYPE] [-u UNIT] [-x CURRENT_NAME:NEW_NAME] [-z LOCALE]

scsictl [-D | -e | -I | -l | -m | -N | -O | -o | -S | -T | -V | -v | -X]

scsictl sends commands to the piscsi process to make configuration adjustments at runtime or to check the status of the devices.

Either the -i or -l option should be specified at one time. Not both.

You do NOT need root privileges to use scsictl. scsictl also runs on non-Pi Linux platforms.

Note: The command and type arguments are case insensitive. Only the first letter of the command/type is evaluated by the tool.

BLOCK_SIZE
The optional block size, either 512, 1024, 2048 or 4096 bytes. The default size is 512 bytes.
FILENAME:FILESIZE
Create an image file in the default image folder with the specified name and size in bytes.
CMD
Command is the operation being requested. Options are:
  • a(ttach): Attach disk
  • d(etach): Detach disk
  • i(nsert): Insert media (removable media devices only)
  • e(ject): Eject media (removable media devices only)
  • p(rotect): Write protect the medium (not for CD-ROMs, which are always read-only)
  • u(nprotect): Remove write protection from the medium (not for CD-ROMs, which are always read-only)
  • s(how): Display device information

eject, protect and unprotect are idempotent.

Detach all devices.
FILENAME
Delete an image file in the default image folder.
FILENAME
Display information on an image file.
List all images files in the default image folder.
IMAGE_FOLDER
Set the default image folder.
FILE|PARAM
Device-specific: Either a path to a disk image file, or a parameter for a non-disk device. See the piscsi(1) man page for permitted file types.
Gets the list of reserved device IDs.
ID[: LUN]
The SCSI ID and optional LUN that you want to control. (0-7:0-31)
LOG_LEVEL
Set the piscsi log level (trace, debug, info, warning, error, off).
List all of the devices that are currently being emulated by PiSCSI, as well as their current status.
HOST
The piscsi host to connect to, default is 'localhost'.
List all file extensions recognized by PiSCSI and the device types they map to.
Lists all available network interfaces provided that they are up.
VENDOR:PRODUCT:REVISION
The vendor, product and revision for the device, to be returned with the INQUIRY data. A complete set of name components must be provided. VENDOR may have up to 8, PRODUCT up to 16, REVISION up to 4 characters. Padding with blanks to the maxium length is automatically applied. Once set the name of a device cannot be changed.
Display the available piscsi server log levels and the current log level.
Display operation meta data information.
Prompt for the access token in case piscsi requires authentication.
PORT
The piscsi port to connect to, default is 6868.
CURRENT_NAME:NEW_NAME
Rename an image file in the default image folder.
RESERVED_IDS
Comma-separated list of IDs to reserve. Pass an empty list in order to not reserve anything.
Display statistics.
[FOLDER_PATTERN:FILE_PATTERN:OPERATIONS]
Display server-side settings like available images or supported device types.
Display all device types and their properties.
TYPE
Specifies the device type. This type overrides the type derived from the file extension of the specified image. See the piscsi(1) man page for the available device type codes, or use a shorthand (only the first letter is required):
  • cd: CD-ROM
  • daynaport: DaynaPort Network Adapter
  • hd: Hard Disk
  • services: Host Services
  • printer: Printer
  • mo: Magneto-Optical Drive
  • removable: Removable Hard Disk
  • tape: Tape Drive
Display the scsictl version.
Display the piscsi server version.
Shut down the piscsi process.
CURRENT_NAME:NEW_NAME
Copy an image file in the default image folder.
LOCALE
Overrides the default locale for client-facing error messages.
UNIT
Unit number (0-31). This will default to 0. This option is only used when there are multiple SCSI devices on a shared SCSI controller. (This is not common)

Show a listing of all of the SCSI devices and their current status.

scsictl -l

Example output:

+----+-----+------+-------------------------------------
| ID | LUN | TYPE | IMAGE FILE
+----+-----+------+-------------------------------------
|  0 |   1 | SCHD | /var/lib/piscsi/images/harddisk.hda
+----+-----+------+-------------------------------------

Request the PiSCSI process to attach a disk to SCSI ID 0 with the contents of the file system image "HDIIMAGE0.HDS".

scsictl -c a -i 0 -f HDIIMAGE0.HDS

Attach a DaynaPort to the preconfigured wired bridge. DaynaPort mode and interface are a single, explicit parameter value:

scsictl -i 6 -c attach -t scdp -f mode=bridge:interface=piscsi_bridge

Attach a DaynaPort through a configured Wi-Fi proxy-ARP uplink. This profile supports IPv4 unicast and DHCP only; it is not an Ethernet bridge:

scsictl -i 6 -c attach -t scdp -f mode=proxyarp:interface=wlan0

piscsi(1), scsimon(1), scsidump(1)

Full documentation is available at: <https://www.piscsi.com>

December 18, 2025 PiSCSI