camcontrol.8 (44316) | camcontrol.8 (46581) |
---|---|
1.\" | 1.\" |
2.\" Copyright (c) 1998 Kenneth D. Merry. | 2.\" Copyright (c) 1998, 1999 Kenneth D. Merry. |
3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright --- 9 unchanged lines hidden (view full) --- 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" | 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright --- 9 unchanged lines hidden (view full) --- 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" |
28.\" $Id: camcontrol.8,v 1.9 1998/12/20 18:51:56 mjacob Exp $ | 28.\" $Id: camcontrol.8,v 1.10 1999/02/27 07:55:58 ken Exp $ |
29.\" 30.Dd September 14, 1998 31.Dt CAMCONTROL 8 32.Os FreeBSD 3.0 33.Sh NAME 34.Nm camcontrol 35.Nd CAM control program 36.Sh SYNOPSIS --- 55 unchanged lines hidden (view full) --- 92.Ek 93.Nm camcontrol 94debug 95.Op Fl I 96.Op Fl T 97.Op Fl S 98.Op Fl c 99.Aq all|off|bus Ns Op :target Ns Op :lun | 29.\" 30.Dd September 14, 1998 31.Dt CAMCONTROL 8 32.Os FreeBSD 3.0 33.Sh NAME 34.Nm camcontrol 35.Nd CAM control program 36.Sh SYNOPSIS --- 55 unchanged lines hidden (view full) --- 92.Ek 93.Nm camcontrol 94debug 95.Op Fl I 96.Op Fl T 97.Op Fl S 98.Op Fl c 99.Aq all|off|bus Ns Op :target Ns Op :lun |
100.Nm camcontrol 101tags 102.Op generic args 103.Op Fl N Ar tags 104.Op Fl q 105.Op Fl v 106.Nm camcontrol 107negotiate 108.Op generic args 109.Op Fl c 110.Op Fl D Ar enable|disable 111.Op Fl O Ar offset 112.Op Fl q 113.Op Fl R Ar syncrate 114.Op Fl T Ar enable|disable 115.Op Fl U 116.Op Fl W Ar bus_width 117.Op Fl v |
|
100.Sh DESCRIPTION 101.Nm camcontrol 102is a utility designed to provide a way for users to access and control the 103.Tn FreeBSD 104CAM subsystem. 105.Pp 106.Nm camcontrol 107can cause a loss of data and/or system crashes if used improperly. Even | 118.Sh DESCRIPTION 119.Nm camcontrol 120is a utility designed to provide a way for users to access and control the 121.Tn FreeBSD 122CAM subsystem. 123.Pp 124.Nm camcontrol 125can cause a loss of data and/or system crashes if used improperly. Even |
108expert users are encouraged to excercise caution when using this command. | 126expert users are encouraged to exercise caution when using this command. |
109Novice users should stay away from this utility. 110.Pp 111.Nm camcontrol 112has a number of primary functions, most of which take some generic 113arguments: 114.Bl -tag -width 01234567890123 115.It Fl C Ar count 116SCSI command retry count. In order for this to work, error recovery --- 117 unchanged lines hidden (view full) --- 234.It modepage 235Allows the user to display and optionally edit a SCSI mode page. The mode 236page formats are located in 237.Pa /usr/share/misc/scsi_modes . 238This can be overridden by specifying a different file in the 239.Ev SCSI_MODES 240environment variable. The modepage command takes several arguments: 241.Bl -tag -width 012345678901 | 127Novice users should stay away from this utility. 128.Pp 129.Nm camcontrol 130has a number of primary functions, most of which take some generic 131arguments: 132.Bl -tag -width 01234567890123 133.It Fl C Ar count 134SCSI command retry count. In order for this to work, error recovery --- 117 unchanged lines hidden (view full) --- 252.It modepage 253Allows the user to display and optionally edit a SCSI mode page. The mode 254page formats are located in 255.Pa /usr/share/misc/scsi_modes . 256This can be overridden by specifying a different file in the 257.Ev SCSI_MODES 258environment variable. The modepage command takes several arguments: 259.Bl -tag -width 012345678901 |
242.It Fl B | 260.It Fl d |
243Disable block descriptors for mode sense. 244.It Fl e 245This flag allows the user to edit values in the mode page. 246.It Fl m Ar mode_page 247This specifies the number of the mode page the user would like to view 248and/or edit. This argument is mandatory. 249.It Fl P Ar pgctl 250This allows the user to specify the page control field. Possible values are: --- 58 unchanged lines hidden (view full) --- 309Enable debugging for all devices. 310.It off 311Turn off debugging for all devices 312.It bus Ns Op :target Ns Op :lun 313Turn on debugging for the given bus, target or lun. If the lun or target 314and lun are not specified, they are wildcarded. (i.e., just specifying a 315bus turns on debugging printfs for all devices on that bus.) 316.El | 261Disable block descriptors for mode sense. 262.It Fl e 263This flag allows the user to edit values in the mode page. 264.It Fl m Ar mode_page 265This specifies the number of the mode page the user would like to view 266and/or edit. This argument is mandatory. 267.It Fl P Ar pgctl 268This allows the user to specify the page control field. Possible values are: --- 58 unchanged lines hidden (view full) --- 327Enable debugging for all devices. 328.It off 329Turn off debugging for all devices 330.It bus Ns Op :target Ns Op :lun 331Turn on debugging for the given bus, target or lun. If the lun or target 332and lun are not specified, they are wildcarded. (i.e., just specifying a 333bus turns on debugging printfs for all devices on that bus.) 334.El |
335.It tags 336Show or set the number of "tagged openings" or simultaneous transactions 337we attempt to queue to a particular device. By default, the 338.Sq tags 339command, with no command-specific arguments (i.e. only generic arguments) 340prints out the "soft" maximum number of transactions that can be queued to 341the device in question. For more detailed information, use the 342.Fl v 343argument described below. 344.Bl -tag -width 0123456 345.It Fl N Ar tags 346Set the number of tags for the given device. This must be between the 347minimum and maximum number set in the kernel quirk table. The default for 348most devices that support tagged queueing is a minimum of 2 and a maximum 349of 255. The minimum and maximum values for a given device may be 350determined by using the 351.Fl v 352switch. The meaning of the 353.Fl v 354switch for this 355.Nm camcontrol 356subcommand is described below. 357.It Fl q 358Be quiet, and don't report the number of tags. This is generally used when 359setting the number of tags. 360.It Fl v 361The verbose flag has special functionality for the 362.Em tags 363argument. It causes 364.Nm camcontrol 365to print out the tagged queueing related fields of the XPT_GDEV_TYPE CCB: 366.Bl -tag -width 0123456789012 367.It dev_openings 368This is the amount of capacity for transactions queued to a given device. 369.It dev_active 370This is the number of transactions currently queued to a device. 371.It devq_openings 372This is the kernel queue space for transactions. This count usually mirrors 373dev_openings except during error recovery operations when 374the device queue is frozen (device is not allowed to receive 375commands), the number of dev_openings is reduced, or transaction 376replay is occurring. 377.It devq_queued 378This is the number of transactions waiting in the kernel queue for capacity 379on the device. This number is usually zero unless error recovery is in 380progress. 381.It held 382The held count is the number of CCBs held by peripheral drivers that have 383either just been completed or are about to be released to the transport 384layer for service by a device. Held CCBs reserve capacity on a given 385device. 386.It mintags 387This is the current "hard" minimum number of transactions that can be 388queued to a device at once. The 389.Ar dev_openings 390value above cannot go below this number. The default value for 391.Ar mintags 392is 2, although it may be set higher or lower for various devices. 393.It maxtags 394This is the "hard" maximum number of transactions that can be queued to a 395device at one time. The 396.Ar dev_openings 397value cannot go above this number. The default value for 398.Ar maxtags 399is 255, although it may be set higher or lower for various devices. |
|
317.El | 400.El |
401.El 402.It negotiate 403Show or negotiate various communication parameters. Some controllers may 404not support setting or changing some of these values. For instance, the 405Adaptec 174x controllers do not support changing a device's sync rate or 406offset. 407.Nm camcontrol 408will not attempt to set the parameter if the controller indicates that it 409does not support setting the parameter. To find out what the controller 410supports, use the 411.Fl v 412flag. The meaning of the 413.Fl v 414flag for the 415.Sq negotiate 416command is described below. Also, some controller drivers don't support 417setting negotiation parameters, even if the underlying controller supports 418negotiation changes. Some controllers, such as the Advansys wide 419controllers, support enabling and disabling synchronous negotiation for 420a device, but do not support setting the synchronous negotiation rate. 421.Bl -tag -width 01234567890123456 422.It Fl a 423Attempt to make the negotiation settings take effect immediately by sending 424a Test Unit Ready command to the device. 425.It Fl c 426Show or set current negotiation settings. This is the default. 427.It Fl D Ar enable|disable 428Enable or disable disconnection. 429.It Fl O Ar offset 430Set the command delay offset. 431.It Fl q 432Be quiet, don't print anything. This is generally useful when you want to 433set a parameter, but don't want any status information. 434.It Fl R Ar syncrate 435Change the synchronization rate for a device. The sync rate is a floating 436point value specified in MHz. So, for instance, 437.Sq 20.000 438is a legal value, as is 439.Sq 20 . 440.It Fl T Ar enable|disable 441Enable or disable tagged queueing for a device. 442.It Fl U 443Show or set user negotiation settings. The default is to show or set 444current negotiation settings. 445.It Fl v 446The verbose switch has special meaning for the 447.Sq negotiate 448subcommand. It causes 449.Nm camcontrol 450to print out the contents of a Path Inquiry (XPT_PATH_INQ) CCB sent to the 451controller driver. 452.It Fl W Ar bus_width 453Specify the bus width to negotiate with a device. The bus width is 454specified in bits. The only useful values to specify are 8, 16, and 32 455bits. The controller must support the bus width in question in order for 456the setting to take effect. 457.El 458.Pp 459In general, sync rate and offset settings will not take effect for a 460device until a command has been sent to the device. The 461.Fl a 462switch above will automatically send a Test Unit Ready to the device so 463negotiation parameters will take effect. 464.El |
|
318.Sh ENVIRONMENT 319The 320.Ev SCSI_MODES 321variable allows the user to specify an alternate mode page format file. 322.Pp 323The 324.Ev EDITOR 325variable determines which text editor --- 65 unchanged lines hidden (view full) --- 391.Dl camcontrol rescan 0 392.Pp 393Rescan SCSI bus 0 for devices that have been added, removed or changed. 394.Pp 395.Dl camcontrol rescan 0:1:0 396.Pp 397Rescan SCSI bus 0, target 1, lun 0 to see if it has been added, removed, or 398changed. | 465.Sh ENVIRONMENT 466The 467.Ev SCSI_MODES 468variable allows the user to specify an alternate mode page format file. 469.Pp 470The 471.Ev EDITOR 472variable determines which text editor --- 65 unchanged lines hidden (view full) --- 538.Dl camcontrol rescan 0 539.Pp 540Rescan SCSI bus 0 for devices that have been added, removed or changed. 541.Pp 542.Dl camcontrol rescan 0:1:0 543.Pp 544Rescan SCSI bus 0, target 1, lun 0 to see if it has been added, removed, or 545changed. |
546.Pp 547.Dl camcontrol tags -n da -u 5 -N 24 548.Pp 549Set the number of concurrent transactions for da5 to 24. 550.Pp 551.Bd -literal -offset foobar 552camcontrol negotiate -n da -u 4 -T disable 553.Ed 554.Pp 555Disable tagged queueing for da4. 556.Pp 557.Bd -literal -offset foobar 558camcontrol negotiate -n da -u 3 -R 20.000 -O 15 -a 559.Ed 560.Pp 561Negotiate a sync rate of 20MHz and an offset of 15 with da3. Then send a 562Test Unit Ready command to make the settings take effect. 563.Pp 564.Bd -literal -offset foobar 565camcontrol cmd -n da -u 3 -v -t 7200 -c "4 0 0 0 0 0" 566.Ed 567.Pp 568Send the FORMAT UNIT (0x04) command to da3. This will low-level format the 569disk. Print sense information if the command fails, and set the timeout to 570two hours (or 7200 seconds). 571.Pp 572.Em WARNING! WARNING! WARNING! 573.Pp 574Low level formatting a disk will destroy ALL data on the disk. Use 575extreme caution when issuing this command. Many users low-level format 576disks that do not really need to be low-level formatted. There are 577relatively few scenarios that call for low-level formatting a disk. 578One reason for 579low-level formatting a disk is if you want to change the physical sector 580size of the disk. Another reason for low-level formatting a disk is to 581revive the disk if you are getting "medium format corrupted" errors from the 582disk in response to read and write requests. 583.Pp 584Some disks take longer than others to format. Users should specify a 585timeout long enough to allow the format to complete. Some hard disks 586will complete a format operation in a very short period of time (on the 587order of 5 minutes or less). This is often because the drive doesn't 588really support the FORMAT UNIT command -- it just accepts the command, 589waits a few minutes and then returns it. |
|
399.Sh SEE ALSO 400.Xr cam 3 , | 590.Sh SEE ALSO 591.Xr cam 3 , |
592.Xr cam_cdbparse 3 , |
|
401.Xr pass 4 , 402.Xr cam 9 , 403.Xr xpt 9 404.Sh HISTORY 405The 406.Nm camcontrol 407command first appeared in 408.Fx 3.0 . --- 44 unchanged lines hidden --- | 593.Xr pass 4 , 594.Xr cam 9 , 595.Xr xpt 9 596.Sh HISTORY 597The 598.Nm camcontrol 599command first appeared in 600.Fx 3.0 . --- 44 unchanged lines hidden --- |