diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2007-10-13 20:15:38 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2007-10-13 20:15:38 +0000 |
commit | 24424a340f3a61f9ffc77a416d6ae81161bfe382 (patch) | |
tree | 2b1966ca5f17d1c7db4127476e7740002c51ebf2 /doc/sg_format.8 | |
parent | a1d15c35ce45754c109aed26595752c64ffef921 (diff) | |
download | sg3_utils-24424a340f3a61f9ffc77a416d6ae81161bfe382.tar.gz |
add more RDAC vendor pages to sg_vpd
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@112 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'doc/sg_format.8')
-rw-r--r-- | doc/sg_format.8 | 79 |
1 files changed, 40 insertions, 39 deletions
diff --git a/doc/sg_format.8 b/doc/sg_format.8 index be7842fe..6af7c906 100644 --- a/doc/sg_format.8 +++ b/doc/sg_format.8 @@ -1,4 +1,4 @@ -.TH SG_FORMAT "8" "May 2007" "sg3_utils\-1.24" SG3_UTILS +.TH SG_FORMAT "8" "October 2007" "sg3_utils\-1.25" SG3_UTILS .SH NAME sg_format \- format or resize a SCSI disk (perhaps change its block size) .SH SYNOPSIS @@ -15,9 +15,10 @@ Not all SCSI direct access devices need to be formatted and some have vendor specific formatting procedures. SCSI disks with rotating media are probably the largest group that do support a 'standard' format operation. They are typically factory formatted to a block size of 512 bytes with the -largest number of blocks that the manufacturer recommends. That number of -blocks typically leaves aside a certain number of tracks and sectors for -reassignment of logical block addresses during the life of the disk. +largest number of blocks that the manufacturer recommends. The +manufacturer's recommendation typically leaves aside a certain number of +tracks, spread across the media, for reassignment of logical block addresses +during the life of the disk. .PP This utility can format modern SCSI disks and potentially change their block size (if permitted) and the block count (i.e. number of accessible @@ -30,7 +31,7 @@ level details found in that mode page are now left up to the discretion of the manufacturer. .PP When this utility is used without options (apart from a device name) -then it prints out the existing block size and block count derived +it prints out the existing block size and block count derived from two sources. These two sources are a block descriptor in the response to a MODE SENSE command and the response to a READ CAPACITY command. The reason for this double check is to detect a "format corrupt" @@ -38,11 +39,11 @@ state (see NOTES section). .PP Recent SBC\-3 drafts add several "protection types" to the "protection information" introduced in the SBC\-2 standard. See the "protection -information" section (section 4.17 in draft SBC\-3 rev 8). 8 bytes of +information" section (section 4.17 in draft SBC\-3 rev 11). 8 bytes of protection information are added to each block (a 2 byte "logical block guard" (CRC), a 2 byte "logical block application guard", and a 4 byte "logical block reference tag"). A device that supports protection -information sets the "protect" bit in a standard INQUIRY response. +information sets the "PROTECT" bit in its standard INQUIRY response. The "FMTPINFO" and "RTO_REQ" bits in the FORMAT command cdb plus the "Protection Field Usage" in the parameter header are associated with protection information and can be set by this utility. @@ -100,12 +101,11 @@ See NOTES section below. .TP \fB\-D\fR, \fB\-\-dcrt\fR this option sets the DCRT bit in the FORMAT command's parameter list header. -It will "disable certification" which is the verification step used to check -during the format process that blocks are usable. Using this option may -speed the format. The default action of this utility (i.e. when this option -is not given) is to clear the DCRT bit thereby requesting "media -certification". When the DCRT bit is set, the FOV bit must also be set hence -sg_format does that. +It will "disable certification". Certification verifies that blocks are usable +during the format process. Using this option may speed the format. The default +action of this utility (i.e. when this option is not given) is to clear the +DCRT bit thereby requesting "media certification". When the DCRT bit is set, +the FOV bit must also be set hence sg_format does that. .TP \fB\-e\fR, \fB\-\-early\fR this option is active when \fI\-\-format\fR is given. The default action of @@ -119,11 +119,10 @@ utilities (e.g. sg_turs(8) or sg_requests(8)). This option and \fB\-F\fR, \fB\-\-format\fR issue a SCSI FORMAT command. .B This will destroy all the data held on the media. -This option is required to change the block size of a disk. -The user is given a 10 second count down to ponder the wisdom -of doing this, during which time control\-C (amongst other -Unix commands) can be used to kill this process before it -does any damage. See NOTES section for implementation details and +This option is required to change the block size of a disk. The user is given +a 10 second count down to ponder the wisdom of doing this, during which time +control\-C (amongst other Unix commands) can be used to kill this process +before it does any damage. See NOTES section for implementation details and EXAMPLES section for typical use. .TP \fB\-h\fR, \fB\-\-help\fR @@ -203,15 +202,15 @@ print the version string and then exit. this option only has an effect when used together with the \fI\-\-format\fR option. The default format action is to set the "IMMED" bit in the FORMAT UNIT command's (short) parameter header. If this option (i.e. \fI\-\-wait\fR) -is given then the "IMMED" bit is not set. Then the FORMAT UNIT command waits -until the format operation completes before returning its response. This -can be several hours on large disks. This utility sets a four hour timeout -on such a FORMAT UNIT command. +is given then the "IMMED" bit is not set. If \fI\-\-wait\fR is gievn the +FORMAT UNIT command waits until the format operation completes before +returning its response. This can be several hours on large disks. This +utility sets a four hour timeout on such a FORMAT UNIT command. .SH LISTS -The SBC\-3 draft (revision 8) defines PLIST, CLIST, DLIST and GLIST in -section 4.8 on "Medium defects". Briefly, the PLIST is the "primary" +The SBC\-3 draft (revision 11) defines PLIST, CLIST, DLIST and GLIST in +section 4.9 on "Medium defects". Briefly, the PLIST is the "primary" list of manufacturer detected defects, the CLIST ("certification" list) -are those detected during the format operation, the DLIST is a list of +contains those detected during the format operation, the DLIST is a list of defects that can be given to the format operation. The GLIST is the grown list which starts in the format process as CLIST+DLIST and can "grow" later due to automatic reallocation (see the ARRE and AWRE bits in the @@ -221,19 +220,20 @@ SCSI REASSIGN BLOCKS command (see sg_reassign(8)). The CMPLST bit (controlled by the \fI\-\-cmplst=\fR0|1 option) determines whether the existing GLIST, when the format operation is invoked, is taken into account. The sg_format utility sets the FOV bit to zero -which causes the DPRY=0, so the PLIST is taken into account, and -DCRT=0, so the CLIST is generated and used during the format process. +which causes DPRY=0, so the PLIST is taken into account, and DCRT=0, so +the CLIST is generated and used during the format process. .PP The sg_format utility does not permit a user to provide a defect -list (i.e. DLIST). All protection information options are -defaulted to off. +list (i.e. DLIST). All protection information options are off by +default. .SH NOTES The SBC\-2 standard states that the REQUEST SENSE command should be used -for obtaining a progress indication when the format command returns prior -to the completion of the format operation. However, tests on a selection -of recent disks shows that TEST UNIT READY commands yield progress -indications (but not REQUEST SENSE commands). A new option may be required -to handle this when disks catch up. +for obtaining a progress indication when the format command is underway. +However, tests on a selection of recent disks shows that TEST UNIT READY +commands yield progress indications (but not REQUEST SENSE commands). So +the current version of this utility uses TEST UNIT READY commands to +poll the disk to find out the progress of the format. A new option may be +required to handle this when disks catch up. .PP When the \fI\-\-format\fR option is given then there is a 10 second window during which the user is invited to abort sg_format. This is just prior the @@ -256,7 +256,7 @@ this utility may take a long time to return. In this case care should be taken not to send any other SCSI commands to the disk as it may not respond leaving those commands queued behind the active format command. This may cause a timeout in the OS driver (in a lot shorter period than 4 hours -applicable to the format command). This may result in the OS resetting +applicable to some format operations). This may result in the OS resetting the disk leaving the format operation incomplete. This may leave the disk in a "format corrupt" state requiring another format to remedy the situation. @@ -306,9 +306,10 @@ leading number by <n>. Alternatively numerical values can be given in hexadecimal preceded by either "0x" or "0X" (or with a trailing "h" or "H"). When hex numbers are given, multipliers cannot be used. .SH EXAMPLES -First, do not alter anything but print out the existing block count and size -derived from two sources: a block descriptor in a MODE SELECT command -response and from the response of a READ CAPACITY commands: +In the first example below simply find out the existing block count and +size derived from two sources: a block descriptor in a MODE SELECT command +response and from the response of a READ CAPACITY commands. No changes +are made: .PP sg_format /dev/sdm .PP @@ -344,7 +345,7 @@ Now resize the disk back to its normal (maximum) block count: .SH EXIT STATUS The exit status of sg_format is 0 when it is successful. Otherwise see the sg3_utils(8) man page. Unless the \fI\-\-wait\fR option is given, the -exit status may not reflect to success of otherwise of the format. +exit status may not reflect the success of otherwise of the format. Using sg_turs(8) and sg_readcap(8) after the format operation may be wise. .SH AUTHORS Written by Grant Grundler, James Bottomley and Douglas Gilbert. |