1SG_COPY_RESULTS(8) SG3_UTILS SG_COPY_RESULTS(8)
2
3
4
6 sg_copy_results - send SCSI RECEIVE COPY RESULTS command (XCOPY
7 related)
8
10 sg_copy_results [--failed|--params|--receive|--status] [--help] [--hex]
11 [--list_id=ID] [--readonly] [--verbose] [--version] [--xfer_len=BTL]
12 DEVICE
13
15 This utility is designed to query the status of the SCSI Extended Copy
16 (XCOPY) facility (see SPC-3 revision 23 sections 6.3 and 6.17), present
17 in some modern storage arrays. This utility sends a SCSI RECEIVE COPY
18 RESULTS command to the given DEVICE and displays the response.
19
20 During the draft stages of SPC-4 the T10 committee has expanded the
21 XCOPY command so that it now has two variants: "LID1" (for a List Iden‐
22 tifier length of 1 byte) and "LID4" (for a List Identifier length of 4
23 bytes). This utility supports the older, LID1 variant which is also
24 found in SPC-3 and earlier. While the LID1 variant in SPC-4 is command
25 level (binary) compatible with XCOPY as defined in SPC-3, some of the
26 command naming has changed. This utility uses the older, SPC-3 XCOPY
27 names.
28
29 The command has four distinct modes of operation, distinguished by the
30 service action field:
31
32 COPY STATUS [SPC-4: RECEIVE COPY STATUS(LID1)]
33 Displays the current status of the EXTENDED COPY command identi‐
34 fied by the list id field.
35
36 RECEIVE DATA [SPC-4: RECEIVE COPY DATA(LID1)]
37 Return the held data read by the EXTENDED COPY command identi‐
38 fied by the list id field. This option is only meaningful if the
39 respective segment descriptor are supported.
40
41 OPERATING PARAMETERS [SPC-4: RECEIVE COPY OPERATING PARAMETERS]
42 Return copy manager operating parameters. This option is also
43 useful to determine if the SCSI Extended Copy facility is sup‐
44 ported.
45
46 FAILED SEGMENT DETAILS [SPC-4: RECEIVE COPY FAILURE DETAILS(LID1)]
47 Return copy target device sense data and other information about
48 any failed segments.
49
50
52 Arguments to long options are mandatory for short options as well.
53
54 -f, --failed
55 sets the service action field to FAILED SEGMENT DETAILS [4].
56
57 -h, --help
58 output the usage message then exit.
59
60 -H, --hex
61 prints out the response buffer in hex.
62
63 -l, --list_id=ID
64 sets the list identifier field to ID (default: 0).
65
66 -p, --params
67 sets the service action field to OPERATING PARAMETERS [3]. This
68 is the default.
69
70 -R, --readonly
71 open the DEVICE read-only (e.g. in Unix with the O_RDONLY flag).
72 The default is to open it read-write.
73
74 -r, --receive
75 sets the service action field to RECEIVE DATA [1].
76
77 -s, --status
78 sets the service action field to COPY STATUS [0].
79
80 -v, --verbose
81 increase the level of verbosity, (i.e. debug output).
82
83 -V, --version
84 print the version string and then exit.
85
86 -x, --xfer_len=BTL
87 sets the allocation length field to BTL. It is the byte transfer
88 length and is the maximum (byte) size of the response. BTL must
89 be less than 10000 and defaults to 520.
90
92 Decoding of RECEIVE DATA service action is not implemented.
93
94 In a similar way the functionality of sg_xcopy has been ported to the
95 more general ddpt utility (and package), the functionality of this
96 utility has been ported to the ddptctl utility.
97
99 Query the operating parameters for a device:
100
101 # sg_copy_results -p /dev/sdo
102 Receive copy results (report operating parameters):
103 Supports no list identifier: no
104 Maximum target descriptor count: 2
105 Maximum segment descriptor count: 1
106 Maximum descriptor list length: 92 bytes
107 Maximum segment length: 33553920 bytes
108 Inline data not supported
109 Held data limit: 0 bytes
110 Maximum stream device transfer size: 0 bytes
111 Total concurrent copies: 0
112 Maximum concurrent copies: 255
113 Data segment granularity: 512 bytes
114 Inline data granularity: 1 bytes
115 Held data granularity: 1 bytes
116 Implemented descriptor list:
117 Segment descriptor 0x02: Copy from block device to block device
118 Target descriptor 0xe4: Identification descriptor
119
120
122 The exit status of sg_copy_results is 0 when it is successful. Other‐
123 wise see the sg3_utils(8) man page.
124
126 Written by Douglas Gilbert.
127
129 Report bugs to <dgilbert at interlog dot com>.
130
132 Copyright © 2012-2014 Hannes Reinecke and Douglas Gilbert
133 This software is distributed under a FreeBSD license. There is NO war‐
134 ranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
135 POSE.
136
138 sg_xcopy(sg3_utils), ddpt,ddptctl(ddpt)
139
140
141
142sg3_utils-1.40 September 2014 SG_COPY_RESULTS(8)