diff options
author | bryanv <bryanv@FreeBSD.org> | 2013-09-06 15:19:57 +0000 |
---|---|---|
committer | bryanv <bryanv@FreeBSD.org> | 2013-09-06 15:19:57 +0000 |
commit | 4dc4ea3c0de319d5731d022a107eb6e8648ef4f4 (patch) | |
tree | dcafc9d38f3101f106a98521023280e3bb339614 /sbin/camcontrol/camcontrol.8 | |
parent | 5aae754060b8e919a3f95d29a0ee8bf7b21abc19 (diff) | |
download | FreeBSD-src-4dc4ea3c0de319d5731d022a107eb6e8648ef4f4.zip FreeBSD-src-4dc4ea3c0de319d5731d022a107eb6e8648ef4f4.tar.gz |
Add camcontrol support for the SCSI sanitize command
Reviewed by: ken, mjacob (eariler version)
Sponsored by: Netapp
Diffstat (limited to 'sbin/camcontrol/camcontrol.8')
-rw-r--r-- | sbin/camcontrol/camcontrol.8 | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/sbin/camcontrol/camcontrol.8 b/sbin/camcontrol/camcontrol.8 index df0b3e7..4469cdc 100644 --- a/sbin/camcontrol/camcontrol.8 +++ b/sbin/camcontrol/camcontrol.8 @@ -207,6 +207,19 @@ .Op Fl w .Op Fl y .Nm +.Ic sanitize +.Op device id +.Op generic args +.Aq Fl a Ar overwrite | block | crypto | exitfailure +.Op Fl c Ar passes +.Op Fl I +.Op Fl P Ar pattern +.Op Fl q +.Op Fl U +.Op Fl r +.Op Fl w +.Op Fl y +.Nm .Ic idle .Op device id .Op generic args @@ -1088,6 +1101,116 @@ The user will not be asked about the timeout if a timeout is specified on the command line. .El +.It Ic sanitize +Issue the +.Tn SCSI +SANITIZE command to the named device. +.Pp +.Em WARNING! WARNING! WARNING! +.Pp +ALL data in the cache and on the disk will be destroyed or made inaccessible. +Recovery of the data is not possible. +Use extreme caution when issuing this command. +.Pp +The +.Sq sanitize +subcommand takes several arguments that modify its default behavior. +The +.Fl q +and +.Fl y +arguments can be useful for scripts. +.Bl -tag -width 6n +.It Fl a Ar operation +Specify the sanitize operation to perform. +.Bl -tag -width 16n +.It overwrite +Perform an overwrite operation by writing a user supplied +data pattern to the device one or more times. +The pattern is given by the +.Fl P +argument. +The number of times is given by the +.Fl c +argument. +.It block +Perform a block erase operation. +All the device's blocks are set to a vendor defined +value, typically zero. +.It crypto +Perform a cryptographic erase operation. +The encryption keys are changed to prevent the decryption +of the data. +.It exitfailure +Exits a previously failed sanitize operation. +A failed sanitize operation can only be exited if it was +run in the unrestricted completion mode, as provided by the +.Fl U +argument. +.El +.It Fl c Ar passes +The number of passes when performing an +.Sq overwrite +operation. +Valid values are between 1 and 31. The default is 1. +.It Fl I +When performing an +.Sq overwrite +operation, the pattern is inverted between consecutive passes. +.It Fl P Ar pattern +Path to the file containing the pattern to use when +performing an +.Sq overwrite +operation. +The pattern is repeated as needed to fill each block. +.It Fl q +Be quiet, do not print any status messages. +This option will not disable +the questions, however. +To disable questions, use the +.Fl y +argument, below. +.It Fl U +Perform the sanitize in the unrestricted completion mode. +If the operation fails, it can later be exited with the +.Sq exitfailure +operation. +.It Fl r +Run in +.Dq report only +mode. +This will report status on a sanitize that is already running on the drive. +.It Fl w +Issue a non-immediate sanitize command. +By default, +.Nm +issues the SANITIZE command with the immediate bit set. +This tells the +device to immediately return the sanitize command, before +the sanitize has actually completed. +Then, +.Nm +gathers +.Tn SCSI +sense information from the device every second to determine how far along +in the sanitize process it is. +If the +.Fl w +argument is specified, +.Nm +will issue a non-immediate sanitize command, and will be unable to print any +information to let the user know what percentage of the disk has been +sanitized. +.It Fl y +Do not ask any questions. +By default, +.Nm +will ask the user if he/she really wants to sanitize the disk in question, +and also if the default sanitize command timeout is acceptable. +The user +will not be asked about the timeout if a timeout is specified on the +command line. +.El .It Ic idle Put ATA device into IDLE state. Optional parameter .Pq Fl t |