OS Manuals

/usr/bin/sg_persist

SCSI utilities for Linux, Unix and Windows

From sg3-utils 1.49-r3 (enterprise-packages), captured 2026-11-08 by running sg_persist --help (exit 0). permalink

Usage: sg_persist [OPTIONS] [DEVICE]
  where the main OPTIONS are:
    --clear|-C                 PR Out: Clear
    --help|-h                  print usage message, twice for more
    --in|-i                    request PR In command (default)
    --out|-o                   request PR Out command
    --param-rk=RK|-K RK        PR Out parameter reservation key
                               (RK is in hex)
    --param-sark=SARK|-S SARK    PR Out parameter service action
                                 reservation key (SARK is in hex)
    --preempt|-P               PR Out: Preempt
    --preempt-abort|-A         PR Out: Preempt and Abort
    --prout-type=TYPE|-T TYPE    PR Out type field (see '-hh')
    --read-full-status|-s      PR In: Read Full Status
    --read-keys|-k             PR In: Read Keys (default)
    --read-reservation|-r      PR In: Read Reservation
    --read-status|-s           PR In: Read Full Status
    --register|-G              PR Out: Register
    --register-ignore|-I       PR Out: Register and Ignore
    --register-move|-M         PR Out: Register and Move
                               for '--register-move'
    --release|-L               PR Out: Release
    --replace-lost|-x          PR Out: Replace Lost Reservation
    --report-capabilities|-c   PR In: Report Capabilities
    --reserve|-R               PR Out: Reserve
    --unreg|-U                 optional with PR Out Register and Move

Performs a SCSI PERSISTENT RESERVE (IN or OUT) command. Invoking
'sg_persist DEVICE' will do a PR In Read Keys command. Use '-hh'
for more options and TYPE meanings.
Options (33)
OptionDescriptionSource
--param-rk, -K RK|-Kspecify the reservation key found in the parameter block of the PROUT command.help + man
--param-sark, -S SARK|-Sspecify the service action reservation key found in the parameter block of the PROUT command.help + man
--prout-type, -T TYPE|-Tspecify the PROUT command's 'type' argument.help + man
-l, --alloc-length LENspecify the allocation length of the PRIN command. (in the manual page but not in --help)man
-C, --clearClear is a sub-command of the PROUT command. (in the manual page but not in --help)man
-d, --device DEVICEDEVICE to send SCSI commands to. (in the manual page but not in --help)man
-h, --helpoutput a usage message showing main options. (in the manual page but not in --help)man
-H, --hexthe response to a valid PRIN sub-command will be output in hexadecimal. (in the manual page but not in --help)man
-i, --inspecify that a SCSI PERSISTENT RESERVE IN command is required. (in the manual page but not in --help)man
-m, --maxlen LENLEN is used as the ALLOCATION LENGTH field of the PRIN command. (in the manual page but not in --help)man
-n, --no-inquirythe default action is to do a standard SCSI INQUIRY command and output make, product and revision strings plus the peripheral device type prior to executing a PRIN or PROUT command. (in the manual page but not in --help)man
-o, --outspecify that a SCSI PERSISTENT RESERVE OUT command is required. (in the manual page but not in --help)man
-Y, --param-alltgptset the 'all target ports' (ALL_TG_PT) flag in the parameter block of the PROUT command. (in the manual page but not in --help)man
-Z, --param-aptplset the 'activate persist through power loss' (APTPL) flag in the parameter block of the PROUT command. (in the manual page but not in --help)man
-P, --preemptPreempt is a sub-command of the PROUT command. (in the manual page but not in --help)man
-A, --preempt-abortPreempt and Abort is a sub-command of the PROUT command. (in the manual page but not in --help)man
-s, --read-full-statusRead Full Status is a sub-command of the PRIN command. (in the manual page but not in --help)man
-k, --read-keysRead Keys is a sub-command of the PRIN command. (in the manual page but not in --help)man
-y, --readonlyOpen DEVICE read-only. (in the manual page but not in --help)man
-r, --read-reservationRead Reservation is a sub-command of the PRIN command. (in the manual page but not in --help)man
-G, --registerRegister is a sub-command of the PROUT command. (in the manual page but not in --help)man
-I, --register-ignoreRegister and Ignore Existing Key is a sub-command of the PROUT command. (in the manual page but not in --help)man
-M, --register-moveregister (another initiator) and move (the reservation held by the current initiator to that other initiator) is a sub-command of the PROUT command. (in the manual page but not in --help)man
-Q, --relative-target-port RTPIrelative target port identifier that reservation is to be moved to by PROUT 'register and move' sub-command. (in the manual page but not in --help)man
-L, --releaseRelease is a sub-command of the PROUT command. (in the manual page but not in --help)man
-z, --replace-lostReplace Lost Reservation is a sub-command of the PROUT command. (in the manual page but not in --help)man
-c, --report-capabilitiesReport Capabilities is a sub-command of the PRIN command. (in the manual page but not in --help)man
-R, --reserveReserve is a sub-command of the PROUT command. (in the manual page but not in --help)man
-X, --transport-id TIDSThe TIDS argument can take one of several forms. (in the manual page but not in --help)man
-U, --unregoptional when the PROUT register and move sub-command is invoked. (in the manual page but not in --help)man
-v, --verboseprint out cdb of issued commands prior to execution. (in the manual page but not in --help)man
-V, --versionprint out version string. (in the manual page but not in --help)man
-?output usage message. (in the manual page but not in --help)man
Exit status (1) from the manual page
0it is successful

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.