mirror of
https://github.com/akuker/RASCSI.git
synced 2026-04-26 06:18:10 +00:00
df234edb72
The mdoc markup makes for a more semantic and less formatting heavy syntax Includes a number of improvements: - List all options in alphabetic order - Split out the synopsis for commands that has to be run by themselves - Move the scsimon Usage helptext from the app to the man page - Corrections of typos and updates of outdated information
125 lines
6.6 KiB
Groff
125 lines
6.6 KiB
Groff
.Dd December 18, 2025
|
|
.Dt PISCSI 1
|
|
.Os
|
|
.Sh NAME
|
|
.Nm piscsi
|
|
.Nd Emulates SCSI devices using the Raspberry Pi GPIO pins
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl b Ar BLOCK_SIZE
|
|
.Op Fl F Ar FOLDER
|
|
.Op Fl L Ar LOG_LEVEL Ns Oo : Ar ID Ns Oo : Ar LUN Oc Oc
|
|
.Op Fl n Ar VENDOR:PRODUCT:REVISION
|
|
.Op Fl P Ar ACCESS_TOKEN_FILE
|
|
.Op Fl p Ar PORT
|
|
.Op Fl R Ar SCAN_DEPTH
|
|
.Op Fl r Ar RESERVED_IDS
|
|
.Op Fl s Ar MICROSECONDS
|
|
.Op Fl t Ar TYPE
|
|
.Op Fl z Ar LOCALE
|
|
.Op Fl IDn Ns Oo :u Oc Ar FILE
|
|
.Op Fl HDn Ns Oo :u Oc Ar FILE ...
|
|
.Nm
|
|
.Op Fl h
|
|
.Nm
|
|
.Op Fl v
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
emulates SCSI devices using the Raspberry Pi GPIO pins.
|
|
.Pp
|
|
In the arguments to PiSCSI, one or more SCSI (-IDn[:u]) devices can be specified.
|
|
The number (n) after the ID or HD identifier specifies the ID number for that device. The optional number (u) specifies the LUN (logical unit) for that device. The default LUN is 0.
|
|
For SCSI: The ID is limited from 0-7. However, typically SCSI ID 7 is reserved for the "initiator" (the host computer). The LUN is limited from 0-31.
|
|
.Pp
|
|
PiSCSI will determine the type of device based upon the file extension of the FILE argument.
|
|
hds: Hard Disk image (generic, non-removable)
|
|
hd1: Hard Disk image (generic, non-removable, SCSI-1 compatibility mode)
|
|
hdr: Hard Disk image (generic, removable)
|
|
hdn: Hard Disk image (NEC compatible - only used with PC-98 computers)
|
|
hdi: Hard Disk image (Anex86 proprietary - only used with PC-98 computers)
|
|
nhd: Hard Disk image (T98Next proprietary - only used with PC-98 computers)
|
|
hda: Hard Disk image (Apple compatible - typically used with Macintosh computers)
|
|
mos: Magneto-Optical image (generic - typically used with NeXT, X68000, etc.)
|
|
iso: CD-ROM or DVD-ROM image (ISO 9660 image)
|
|
is1: CD-ROM or DVD-ROM image (ISO 9660 image, SCSI-1 compatibility mode)
|
|
tap: Tape image (raw tape image containing non-block data)
|
|
tar: Tape archive (tape block data in tar format)
|
|
.Pp
|
|
If the file extension is not recognized, the device type can be specified explicitly using the -t option and a four letter code.
|
|
SCCD: SCSI CD-ROM (generic CD-ROM or DVD-ROM drive)
|
|
SCDP: SCSI DaynaPort (DaynaPort compatible network adapter)
|
|
SCHD: SCSI Hard Disk (generic, non-removable)
|
|
SCHS: SCSI Host Services (used for special host services)
|
|
SCLP: SCSI Printer (generic line printer)
|
|
SCMO: SCSI Magneto-Optical Drive (generic MO drive)
|
|
SCRM: SCSI Removable Hard Disk (generic, removable)
|
|
SCTP: SCSI Tape Drive (generic tape, or streamer, drive)
|
|
.Pp
|
|
For example, if you want to specify an Apple-compatible HD image on ID 0, you can use the following command:
|
|
sudo piscsi -ID0 /path/to/drive/hdimage.hda
|
|
|
|
Note: PiSCSI is a fork of RaSCSI. The two cannot be run in parallel on the same system.
|
|
|
|
Once PiSCSI starts, it will open a socket (default port is 6868) to allow external management commands.
|
|
If another process is using this port, PiSCSI will terminate, since it is likely another instance of PiSCSI or RaSCSI.
|
|
Once PiSCSI has initialized, the scsictl utility can be used to send commands.
|
|
|
|
To quit PiSCSI, press Control + C. If it is running in the background, you can kill it using an INT signal.
|
|
|
|
.Sh OPTIONS
|
|
.Bl -tag -width Ds
|
|
.It Fl b Ar BLOCK_SIZE
|
|
The optional block size, either 512, 1024, 2048 or 4096 bytes. Default size is 512 bytes.
|
|
.It Fl F Ar FOLDER
|
|
The default folder for image files. For files in this folder no absolute path needs to be specified. The initial default folder is '~/images'.
|
|
.It Fl h
|
|
Show a help page.
|
|
.It Fl L Ar LOG_LEVEL Ns Oo : Ar ID Ns Oo : Ar LUN Oc Oc
|
|
The piscsi log level (trace, debug, info, warning, error, off). The default log level is 'info' for all devices unless a particular device ID and an optional LUN was provided.
|
|
.It Fl n Ar VENDOR:PRODUCT:REVISION
|
|
Set 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.
|
|
.It Fl P Ar ACCESS_TOKEN_FILE
|
|
Enable authentication and read the access token from the specified file. The access token file must be owned by root and must be readable by root only.
|
|
.It Fl p Ar PORT
|
|
The piscsi server port, default is 6868.
|
|
.It Fl R Ar SCAN_DEPTH
|
|
Scan for image files recursively, up to a depth of SCAN_DEPTH. Depth 0 means to ignore any folders within the default image folder. Be careful when using this option with many sub-folders in the default image folder. The default depth is 1.
|
|
.It Fl r Ar RESERVED_IDS
|
|
Comma-separated list of IDs to reserve. Pass an empty list in order to not reserve anything.
|
|
.It Fl s Ar MICROSECONDS
|
|
Minimum execution time for SCSI commands in microseconds. Default is 50. Higher values may be needed for some older SCSI initiators to work properly.
|
|
.It Fl t Ar TYPE
|
|
The optional case-insensitive device type (see list of type codes above). If no type is specified for devices that support an image file, piscsi tries to derive the type from the file extension.
|
|
.It Fl v
|
|
Display the piscsi version.
|
|
.It Fl z Ar LOCALE
|
|
Sets the default locale for client-facing error messages. The client can override the locale.
|
|
.It Fl ID Ar n Ns Oo : Ar u Oc Ar FILE
|
|
n is the SCSI ID number (0-7). u (0-31) is the optional LUN (logical unit). The default LUN is 0.
|
|
.Pp
|
|
FILE is the name of the image file to use for a SCSI mass storage device. For devices that do not support an image file (SCDP, SCLP, SCHS) the filename may have a special meaning or a dummy name can be provided. For SCDP it is a prioritized list of network interfaces with an IP address and netmask, e.g. "interface=eth0,eth1,wlan0:inet=10.10.20.1/24". For SCLP it is the print command to be used and a reservation timeout in seconds, e.g. "cmd=lp -oraw %f:timeout=60".
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
|
Launch PiSCSI with no emulated drives attached:
|
|
.Dl Nm piscsi
|
|
.Pp
|
|
Launch PiSCSI with an Apple hard drive image as ID 0 and a CD-ROM as ID 2
|
|
.Dl Nm piscsi Fl ID0 Ar /path/to/harddrive.hda Fl ID2 Ar /path/to/cdimage.iso
|
|
.Pp
|
|
Launch PiSCSI with a removable SCSI drive image as ID 0 and the raw device file /dev/hdb (e.g. a USB stick) and a DaynaPort network adapter as ID 6:
|
|
.Dl Nm piscsi Fl ID0 Fl t Ar scrm Ar /dev/hdb Fl ID6 Fl t Ar scdp Ar daynaport
|
|
.Pp
|
|
To create an empty, 100MiB HD image, use the following command:
|
|
.Dl dd if=/dev/zero of=/path/to/newimage.hda bs=512 count=204800
|
|
.Pp
|
|
In case the fallocate command is available a much faster alternative to the dd command is:
|
|
.Dl fallocate -l 104857600 /path/to/newimage.hda
|
|
|
|
.Sh SEE ALSO
|
|
.Xr scsictl 1 ,
|
|
.Xr scsimon 1 ,
|
|
.Xr scsidump 1
|
|
.Pp
|
|
Full documentation is available at: <https://www.piscsi.com>
|