sdparm(8)
Access and modify SCSI device parameters and VPD pages.
Synopsis
sdparm [OPTION]... DEVICE [PAGE [SUBPAGE]]Description
sdparm reads and writes SCSI device parameters, allowing users to query and modify device mode pages, VPD (Vital Product Data) pages, and other device settings. It works with SCSI disk drives, tape drives, CD/DVD drives, and other SCSI devices.
Mode pages control device behavior such as caching, disconnect/reconnect policy, and error recovery. VPD pages contain manufacturer information and device capabilities. sdparm can save and restore configurations, making it useful for performance tuning and device diagnostics.
Common options
| Flag | What it does |
|---|---|
-l | List all known mode pages and VPD pages for the device |
-p PAGE | Specify mode page number (decimal or hex) to access |
-q | Quiet mode; suppress informational output |
-s ATTR=VAL | Set attribute to value (e.g., -s WCE=1 to enable write cache) |
-a | List all attributes with their current values |
-6 | Use 6-byte SCSI commands instead of 10-byte |
-t | Show detailed target data and device capabilities |
-H | Output in hex format |
-v | Verbose mode; display detailed information |
--save | Save mode page settings to device non-volatile memory |
Examples
Display default device information and mode page summary for /dev/sda
sdparm /dev/sdaList all available mode pages and VPD pages on the device
sdparm -l /dev/sdaDisplay all readable attributes and their current values for the device
sdparm -a /dev/sdaEnable write cache (WCE=1) and save the setting permanently to the device
sdparm -s WCE=1 /dev/sda --saveRead and display mode page 8 (caching page) from the device
sdparm -p 8 /dev/sdaShow detailed target information including capacity and supported features
sdparm -t /dev/sdbDisable read cache and write cache on the device
sdparm -s RCD=1 -s WCE=0 /dev/sda