sdparm

From RaySoft

This utility fetches and potentially changes SCSI device (e.g. disk) mode pages. Inquiry data including Vital Product Data (VPD) pages can also be displayed. Commands associated with starting and stopping the medium; loading and unloading the medium; and other housekeeping function may also be issued by this utility.[1]

Documentation

Syntax

sdparm [PARAMETER ...] [DEVICE ...]

Parameters

-a, --all
Output all recognized fields for the device type (e.g. disk) of the DEVICE.
-c STRING, --clear=STRING
In its simplest form STRING contains a field acronym_name or a field numerical descriptor. In the absence of an explicit value argument (e.g. --clear=WCE=1), the field has its value cleared to zero.
-C COMMAND, --command=COMMAND
Perform given COMMAND.
eject
Stops the medium and ejects it from the device.
start
Starts the medium.
stop
Stops the medium.
unlock
Tells a device to allow medium removal.
-D, --defaults
Sets the given mode page to its default values. Requires the --page=PG[,SPG] option to be given to specify the mode page.
-p PG[,SPG], --page=PG[,SPG]
Supply the page number (PG) and optionally the sub page number (SPG) of the mode (or VPD) page to fetch. These numbers are interpreted as decimal unless prefixed with "0x" or a trailing. Sub page numbers are only valid for mode pages (not VPD pages).
-p STRING, --page=STRING
A two or three letter abbreviation for a page can be given. Known mode page abbreviations are checked first followed by known VPD page abbreviations.
-s STRING, --set=STRING
In its simplest form STRING contains a field acronym_name or a field numerical descriptor. In the absence of an explicit value, each acronym_name has its value set to (all) ones. This means a 16 bit field will be set to 0xffff which is 65535 in decimal.
-S, --save
Wwhen a mode page is being modified (by using the --clear=STRING and/or --set=STRING options) then the default action is to modify only the current values mode page. When this option is given then the corresponding value(s) in the saved values mode page is also changed.

References

  1. man 8 'sdparm'