Deleted Added
full compact
ctladm.8 (233455) ctladm.8 (233648)
1.\"
1.\"
2.\" Copyright (c) 2003 Silicon Graphics International Corp.
3.\" All rights reserved.
2.\" Copyright (c) 2003 Silicon Graphics International Corp.
3.\" All rights reserved.
4.\"
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.\" without modification.
11.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
12.\" substantially similar to the "NO WARRANTY" disclaimer below
13.\" ("Disclaimer") and any redistribution must be conditioned upon
14.\" including a substantially similar Disclaimer requirement for further
15.\" binary redistribution.
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.\" without modification.
11.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
12.\" substantially similar to the "NO WARRANTY" disclaimer below
13.\" ("Disclaimer") and any redistribution must be conditioned upon
14.\" including a substantially similar Disclaimer requirement for further
15.\" binary redistribution.
16.\"
16.\"
17.\" NO WARRANTY
18.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
21.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGES.
17.\" NO WARRANTY
18.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
21.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGES.
29.\"
29.\"
30.\" ctladm utility man page.
31.\"
32.\" Author: Ken Merry <ken@FreeBSD.org>
33.\"
34.\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $
30.\" ctladm utility man page.
31.\"
32.\" Author: Ken Merry <ken@FreeBSD.org>
33.\"
34.\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $
35.\" $FreeBSD: head/usr.sbin/ctladm/ctladm.8 233455 2012-03-25 09:18:34Z joel $
35.\" $FreeBSD: head/usr.sbin/ctladm/ctladm.8 233648 2012-03-29 05:02:12Z eadler $
36.\"
37.Dd March 6, 2012
38.Dt CTLADM 8
39.Os
40.Sh NAME
41.Nm ctladm
42.Nd CAM Target Layer control utility
43.Sh SYNOPSIS

--- 246 unchanged lines hidden (view full) ---

290for LBAs above 0xffffffff, READ(16) must be used to satisfy the request.)
291.It Fl b Ar blocksize
292Specify the blocksize of the underlying
293.Tn SCSI
294device, so the transfer length
295can be calculated accurately. The blocksize can be obtained via the
296.Tn SCSI
297READ CAPACITY command.
36.\"
37.Dd March 6, 2012
38.Dt CTLADM 8
39.Os
40.Sh NAME
41.Nm ctladm
42.Nd CAM Target Layer control utility
43.Sh SYNOPSIS

--- 246 unchanged lines hidden (view full) ---

290for LBAs above 0xffffffff, READ(16) must be used to satisfy the request.)
291.It Fl b Ar blocksize
292Specify the blocksize of the underlying
293.Tn SCSI
294device, so the transfer length
295can be calculated accurately. The blocksize can be obtained via the
296.Tn SCSI
297READ CAPACITY command.
298.It Fl N
298.It Fl N
299Do not copy data to
300.Nm
301from the kernel when doing a read, just execute the command without copying
302data.
303This is to be used for performance testing.
304.El
305.It Ic write
306Read data from a file or stdin, and write the data to the device using the

--- 147 unchanged lines hidden (view full) ---

454.Bl -tag -width 4n
455.It Fl i
456Set the immediate bit in the CDB. Note that CTL does not support the
457immediate bit, so this is primarily useful for making sure that CTL returns
458the proper error.
459.It Fl o
460Set the Copan proprietary on/offline bit in the CDB. When this flag is
461used, the LUN will be spun down and taken offline ("Logical unit not ready,
299Do not copy data to
300.Nm
301from the kernel when doing a read, just execute the command without copying
302data.
303This is to be used for performance testing.
304.El
305.It Ic write
306Read data from a file or stdin, and write the data to the device using the

--- 147 unchanged lines hidden (view full) ---

454.Bl -tag -width 4n
455.It Fl i
456Set the immediate bit in the CDB. Note that CTL does not support the
457immediate bit, so this is primarily useful for making sure that CTL returns
458the proper error.
459.It Fl o
460Set the Copan proprietary on/offline bit in the CDB. When this flag is
461used, the LUN will be spun down and taken offline ("Logical unit not ready,
462manual intervention required"). See the description of the
462manual intervention required"). See the description of the
463.Ic shutdown
464and
465.Ic startup
466options.
467.El
468.It Ic synccache
469Send the
463.Ic shutdown
464and
465.Ic startup
466options.
467.El
468.It Ic synccache
469Send the
470.Tn SCSI
470.Tn SCSI
471SYNCHRONIZE CACHE command to the device. By default, SYNCHRONIZE
472CACHE(10) is used. If the specified starting LBA is greater than
4730xffffffff or the length is greater than 0xffff, though,
474SYNCHRONIZE CACHE(16) will be used. The 16 byte command will also be used
475if the user specifies a 16 byte CDB with the
476.Fl c
477argument.
478.Bl -tag -width 14n

--- 66 unchanged lines hidden (view full) ---

545and then an INQUIRY on each LUN in the system.
546.It Ic delay
547Delay commands at the given location. There are two places where commands
548may be delayed currently: before data is transferred
549.Pq Dq datamove
550and just prior to sending status to the host
551.Pq Dq done .
552One of the two must be supplied as an argument to the
471SYNCHRONIZE CACHE command to the device. By default, SYNCHRONIZE
472CACHE(10) is used. If the specified starting LBA is greater than
4730xffffffff or the length is greater than 0xffff, though,
474SYNCHRONIZE CACHE(16) will be used. The 16 byte command will also be used
475if the user specifies a 16 byte CDB with the
476.Fl c
477argument.
478.Bl -tag -width 14n

--- 66 unchanged lines hidden (view full) ---

545and then an INQUIRY on each LUN in the system.
546.It Ic delay
547Delay commands at the given location. There are two places where commands
548may be delayed currently: before data is transferred
549.Pq Dq datamove
550and just prior to sending status to the host
551.Pq Dq done .
552One of the two must be supplied as an argument to the
553.Fl l
553.Fl l
554option. The
555.Fl t
556option must also be specified.
557.Bl -tag -width 12n
558.It Fl l Ar delayloc
559Delay command(s) at the specified location.
560This can either be at the data movement stage (datamove) or prior to
561command completion (done).

--- 17 unchanged lines hidden (view full) ---

579.El
580.It Ic realsync
581Query and control CTL's SYNCHRONIZE CACHE behavior. The
582.Sq query
583argument
584will show whether SYNCHRONIZE CACHE commands are being sent to the backend
585or not.
586The default is to send SYNCHRONIZE CACHE commands to the backend.
554option. The
555.Fl t
556option must also be specified.
557.Bl -tag -width 12n
558.It Fl l Ar delayloc
559Delay command(s) at the specified location.
560This can either be at the data movement stage (datamove) or prior to
561command completion (done).

--- 17 unchanged lines hidden (view full) ---

579.El
580.It Ic realsync
581Query and control CTL's SYNCHRONIZE CACHE behavior. The
582.Sq query
583argument
584will show whether SYNCHRONIZE CACHE commands are being sent to the backend
585or not.
586The default is to send SYNCHRONIZE CACHE commands to the backend.
587The
587The
588.Sq on
589argument will cause all SYNCHRONIZE CACHE commands sent to all LUNs to be
590sent to the backend.
591The
592.Sq off
593argument will cause all SYNCHRONIZE CACHE commands sent to all LUNs to be
594immediately returned to the initiator with successful status.
595.It Ic setsync

--- 25 unchanged lines hidden (view full) ---

621other reasons.
622By default, only the first command matching the pattern specified is
623returned with the supplied error.
624.Pp
625If the
626.Fl c
627flag is specified, all commands matching the pattern will be returned with
628the specified error until the error injection command is deleted with
588.Sq on
589argument will cause all SYNCHRONIZE CACHE commands sent to all LUNs to be
590sent to the backend.
591The
592.Sq off
593argument will cause all SYNCHRONIZE CACHE commands sent to all LUNs to be
594immediately returned to the initiator with successful status.
595.It Ic setsync

--- 25 unchanged lines hidden (view full) ---

621other reasons.
622By default, only the first command matching the pattern specified is
623returned with the supplied error.
624.Pp
625If the
626.Fl c
627flag is specified, all commands matching the pattern will be returned with
628the specified error until the error injection command is deleted with
629.Fl d
629.Fl d
630flag.
631.Bl -tag -width 17n
632.It Fl i Ar action
633Specify the error to return:
634.Bl -tag -width 10n
635.It aborted
636Return the next matching command on the specified LUN with the sense key
637ABORTED COMMAND (0x0b), and the ASC/ASCQ 0x45,0x00 ("Select or reselect

--- 66 unchanged lines hidden (view full) ---

704or set the World Wide Node Name
705.Pq Fl w Ar wwnn
706or World Wide Port Name
707.Pq Fl W Ar wwpn
708for a given port.
709One of
710.Fl l ,
711.Fl o ,
630flag.
631.Bl -tag -width 17n
632.It Fl i Ar action
633Specify the error to return:
634.Bl -tag -width 10n
635.It aborted
636Return the next matching command on the specified LUN with the sense key
637ABORTED COMMAND (0x0b), and the ASC/ASCQ 0x45,0x00 ("Select or reselect

--- 66 unchanged lines hidden (view full) ---

704or set the World Wide Node Name
705.Pq Fl w Ar wwnn
706or World Wide Port Name
707.Pq Fl W Ar wwpn
708for a given port.
709One of
710.Fl l ,
711.Fl o ,
712or
712or
713.Fl w
714or
715.Fl W
716must be specified.
717The WWNN and WWPN may both be specified at the same time, but cannot be
718combined with enabling/disabling or listing ports.
719.Bl -tag -width 12n
720.It Fl l
721List all CTL frontend ports or a specific port type or number.
722.It Fl o Ar on|off
723Turn the specified CTL frontend ports off or on.
724If no port number or port type is specified, all ports are turned on or
725off.
713.Fl w
714or
715.Fl W
716must be specified.
717The WWNN and WWPN may both be specified at the same time, but cannot be
718combined with enabling/disabling or listing ports.
719.Bl -tag -width 12n
720.It Fl l
721List all CTL frontend ports or a specific port type or number.
722.It Fl o Ar on|off
723Turn the specified CTL frontend ports off or on.
724If no port number or port type is specified, all ports are turned on or
725off.
726.It Fl p Ar targ_port
726.It Fl p Ar targ_port
727Specify the frontend port number.
728The port numbers can be found in the frontend port list.
729.It Fl q
730Omit the header in the port list output.
731.It Fl t Ar fe_type
732Specify the frontend type.
733Currently defined port types are
734.Dq fc
735(Fibre Channel),
736.Dq scsi
737(Parallel SCSI),
738.Dq ioctl
739(CTL ioctl interface),
740and
741.Dq internal
742(CTL CAM SIM).
743.It Fl w Ar wwnn
744Set the World Wide Node Name for the given port.
745The
727Specify the frontend port number.
728The port numbers can be found in the frontend port list.
729.It Fl q
730Omit the header in the port list output.
731.It Fl t Ar fe_type
732Specify the frontend type.
733Currently defined port types are
734.Dq fc
735(Fibre Channel),
736.Dq scsi
737(Parallel SCSI),
738.Dq ioctl
739(CTL ioctl interface),
740and
741.Dq internal
742(CTL CAM SIM).
743.It Fl w Ar wwnn
744Set the World Wide Node Name for the given port.
745The
746.Fl n
746.Fl n
747argument must be specified, since this is only possible to implement on a
748single port.
749As a general rule, the WWNN should be the same across all ports on the
750system.
751.It Fl W Ar wwpn
752Set the World Wide Node Name for the given port.
753The
754.Fl n

--- 197 unchanged lines hidden (view full) ---

952.Pp
953List configured LUNs in the system, along with their backend and serial
954number.
955This works when the Front End Target Drivers are enabled or disabled.
956.Pp
957.Dl ctladm lunlist
958.Pp
959List all LUNs in the system, along with their inquiry data and device type.
747argument must be specified, since this is only possible to implement on a
748single port.
749As a general rule, the WWNN should be the same across all ports on the
750system.
751.It Fl W Ar wwpn
752Set the World Wide Node Name for the given port.
753The
754.Fl n

--- 197 unchanged lines hidden (view full) ---

952.Pp
953List configured LUNs in the system, along with their backend and serial
954number.
955This works when the Front End Target Drivers are enabled or disabled.
956.Pp
957.Dl ctladm lunlist
958.Pp
959List all LUNs in the system, along with their inquiry data and device type.
960This only works when the FETDs are enabled, since the commands go through the
960This only works when the FETDs are enabled, since the commands go through the
961ioctl port.
962.Pp
963.Dl ctladm inject 0:6 -i mediumerr -p read -r 0,512 -c
964.Pp
965Inject a medium error on LUN 6 for every read that covers the first 512
966blocks of the LUN.
967.Bd -literal -offset indent
968ctladm inject 0:6 -i custom -p tur -s 18 "f0 0 02 s12 04 02"

--- 18 unchanged lines hidden ---
961ioctl port.
962.Pp
963.Dl ctladm inject 0:6 -i mediumerr -p read -r 0,512 -c
964.Pp
965Inject a medium error on LUN 6 for every read that covers the first 512
966blocks of the LUN.
967.Bd -literal -offset indent
968ctladm inject 0:6 -i custom -p tur -s 18 "f0 0 02 s12 04 02"

--- 18 unchanged lines hidden ---