sg_format --version (return code: 0)
sg_format version: 1.34 20160209
sg_format --help (return code: 0)
usage: sg_format [--cmplst=0|1] [--count=COUNT] [--dcrt] [--early]
[--ffmt] [--fmtpinfo=FPI] [--format] [--help] [--ip_def]
[--long] [--mode=MP] [--pfu=PFU] [--pie=PIE] [--pinfo]
[--poll=PT] [--resize] [--rto_req] [--security] [--six]
[--size=SIZE] [--tape=FM] [--verbose] [--verify]
[--version] [--wait] DEVICE
where:
--cmplst=0|1
-C 0|1 sets CMPLST bit in format cdb (default: 1)
--count=COUNT|-c COUNT number of blocks to report after format or
resize. Format default is same as current
--dcrt|-D disable certification (doesn't verify media)
--early|-e exit once format started (user can monitor progress)
--ffmt=FFMT|-t FFMT fast format (def: 0 -> possibly write
to whole medium
--fmtpinfo=FPI|-f FPI FMTPINFO field value (default: 0)
--format|-F do FORMAT UNIT (default: report current count and size)
use thrice for FORMAT UNIT command only
--help|-h prints out this usage message
--ip_def|-I initialization pattern: default
--long|-l allow for 64 bit lbas (default: assume 32 bit lbas)
--mode=MP|-M MP mode page (def: 1 -> RW error recovery mpage)
--pie=PIE|-q PIE Protection Information Exponent (default: 0)
--pinfo|-p set upper bit of FMTPINFO field
(deprecated, use '--fmtpinfo=FPI' instead)
--poll=PT|-x PT PT is poll type, 0 for test unit ready
1 for request sense (def: 0 (1 for tape))
--resize|-r resize (rather than format) to COUNT value
--rto_req|-R set lower bit of FMTPINFO field
(deprecated use '--fmtpinfo=FPI' instead)
--security|-S set security initialization (SI) bit
--six|-6 use 6 byte MODE SENSE/SELECT to probe disk
(def: use 10 byte MODE SENSE/SELECT)
--size=SIZE|-s SIZE bytes per logical block, defaults to DEVICE's
current logical block size. Only needed to
change current logical block size
--tape=FM|-T FM request FORMAT MEDIUM with FORMAT field set
to FM (def: 0 --> default format)
--verbose|-v increase verbosity
--verify|-y sets VERIFY bit in FORMAT MEDIUM (tape)
--version|-V print version details and exit
--wait|-w format command waits until format operation completes
(default: set IMMED=1 and poll with Test Unit Ready)
Example: sg_format --format /dev/sdc
This utility formats a SCSI disk [FORMAT UNIT] or resizes it. Alternatively
if '--tape=FM' is given formats a tape [FORMAT MEDIUM].
WARNING: This utility will destroy all the data on DEVICE when '--format'
or '--tape' is given. Check that you have specified the correct
DEVICE.