ATACTL(8) | System Manager's Manual | ATACTL(8) |
atactl
—
atactl |
device command [arg [...]] |
atactl
allows a user or system administrator to issue
commands to and otherwise control devices which reside on standard IDE and ATA
controllers, or the ATA bus itself. It is used by specifying a device or bus
to manipulate, the command to perform, and any arguments the command may
require.
You may also control devices which are inside a SCSI enclosure, this includes many USB disks. In this case ATA commands are passed through the SCSI layer using SATL commands.
identify
idle
standby
sleep
setidle
idle-timersetstandby
standby-timercheckpower
apm
[disable | set #]It should be noted that the effect of the value need not be continous. For example, a device might provide only two modes: one from 0 to 126 and other from 127 to 253. Per the specification, values of 127 and higher do not permit the device to spin down to save power.
smart
[enable | disable |
status [vendor] | offline # | error-log |
selftest-log]Attribute values are used to represent the relative reliability of individual performance or calibration parameters. The valid range of attribute values is from 1 to 253 decimal. Lower values indicate that the analysis algorithms being used by the device are predicting a higher probability of a degrading or faulty condition.
Each attribute value has a corresponding threshold limit which is used for direct comparison to the attribute value to indicate the existence of a degrading or faulty condition. The numerical value of the attribute thresholds are determined by the device manufacturer through design and reliability testing and analysis. Each attribute threshold represents the lowest limit to which its corresponding attribute value can equal while still retaining a positive reliability status.
If the crit field is “yes” then negative reliability of this attribute predicts imminent data loss. Otherwise it merely indicates that the intended design life period of usage or age has been exceeded. The collect field indicates whether this attribute is updated while the device is online. The reliability field indicates whether the attribute value is within the acceptable threshold.
If the vendor argument is supplied,
a vendor-specific table will be used for SMART information if known
to atactl
. Currently, only
“micron” has a vendor-specific table. If the vendor is
not supplied, it may be guessed from devices' model or other data
available.
security
[status | freeze |
setpass | unlock |
disable | erase]Note that to erase a drive, it must have a password set and be unfrozen. If you can't persuade your firmware to leave the drive unfrozen on boot, but it is a SATA drive, say wd2 at atabus3, that you can safely physically disconnect and reconnect, then you may be able to use SATA hot-plug to work around this: first run
# drvctl -d wd2
Then physically disconnect and reconnect the drive, and run
# drvctl -r -a ata_hl atabus3
After this, check that the security status does not list “frozen”:
# atactl wd2 security status supported #
reset
# atactl wd2 security status supported # atactl wd2 security setpass user Password: Confirm password: # atactl wd2 security status supported enabled # atactl wd2 security erase user Password: Erasing may take up to 0h 2m 0s... #
atactl
command first appeared in
NetBSD 1.4.
atactl
command was written by Ken
Hornstein. It was based heavily on the
scsictl(8) command written by
Jason R. Thorpe. Matthew R.
Green significantly enhanced the smart status
support. Michael van Elst added support for SATL.
identify
command is rather ugly.
Support for master passwords is not implemented.
The NetBSD kernel behaves poorly with drives that have passwords set and are locked.
The smart status
command currently guesses
the vendor attribute name table to use, and may be wrong or miss supported
devices.
SATL bus commands don't work yet.
March 2, 2019 | NetBSD 9.4 |