1525689f1SJustin T. Gibbs.\" 2f553b7b3SKenneth D. Merry.\" Copyright (c) 1998, 1999, 2000, 2002, 2005, 2006, 2007 Kenneth D. Merry. 3525689f1SJustin T. Gibbs.\" All rights reserved. 4525689f1SJustin T. Gibbs.\" 5525689f1SJustin T. Gibbs.\" Redistribution and use in source and binary forms, with or without 6525689f1SJustin T. Gibbs.\" modification, are permitted provided that the following conditions 7525689f1SJustin T. Gibbs.\" are met: 8525689f1SJustin T. Gibbs.\" 1. Redistributions of source code must retain the above copyright 9525689f1SJustin T. Gibbs.\" notice, this list of conditions and the following disclaimer. 10525689f1SJustin T. Gibbs.\" 2. Redistributions in binary form must reproduce the above copyright 11525689f1SJustin T. Gibbs.\" notice, this list of conditions and the following disclaimer in the 12525689f1SJustin T. Gibbs.\" documentation and/or other materials provided with the distribution. 13525689f1SJustin T. Gibbs.\" 3. The name of the author may not be used to endorse or promote products 14525689f1SJustin T. Gibbs.\" derived from this software without specific prior written permission. 15525689f1SJustin T. Gibbs.\" 16525689f1SJustin T. Gibbs.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17525689f1SJustin T. Gibbs.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18525689f1SJustin T. Gibbs.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19525689f1SJustin T. Gibbs.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20525689f1SJustin T. Gibbs.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21525689f1SJustin T. Gibbs.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22525689f1SJustin T. Gibbs.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23525689f1SJustin T. Gibbs.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24525689f1SJustin T. Gibbs.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25525689f1SJustin T. Gibbs.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26525689f1SJustin T. Gibbs.\" SUCH DAMAGE. 27525689f1SJustin T. Gibbs.\" 2840a492d3SKenneth D. Merry.Dd December 28, 2023 29525689f1SJustin T. Gibbs.Dt CAMCONTROL 8 3033fab22eSKenneth D. Merry.Os 31525689f1SJustin T. Gibbs.Sh NAME 32525689f1SJustin T. Gibbs.Nm camcontrol 33525689f1SJustin T. Gibbs.Nd CAM control program 34525689f1SJustin T. Gibbs.Sh SYNOPSIS 357c7fb079SRuslan Ermilov.Nm 3633fab22eSKenneth D. Merry.Aq Ar command 37c60e19a8SKenneth D. Merry.Op device id 38525689f1SJustin T. Gibbs.Op generic args 39525689f1SJustin T. Gibbs.Op command args 407c7fb079SRuslan Ermilov.Nm 4133fab22eSKenneth D. Merry.Ic devlist 4256dc4e72SScott Long.Op Fl b 43525689f1SJustin T. Gibbs.Op Fl v 447c7fb079SRuslan Ermilov.Nm 4533fab22eSKenneth D. Merry.Ic periphlist 46c60e19a8SKenneth D. Merry.Op device id 47525689f1SJustin T. Gibbs.Op Fl n Ar dev_name 48525689f1SJustin T. Gibbs.Op Fl u Ar unit_number 497c7fb079SRuslan Ermilov.Nm 5033fab22eSKenneth D. Merry.Ic tur 51c60e19a8SKenneth D. Merry.Op device id 52525689f1SJustin T. Gibbs.Op generic args 537c7fb079SRuslan Ermilov.Nm 5440a492d3SKenneth D. Merry.Ic sense 5540a492d3SKenneth D. Merry.Op device id 5640a492d3SKenneth D. Merry.Op generic args 5740a492d3SKenneth D. Merry.Op Fl D 5840a492d3SKenneth D. Merry.Op Fl x 5940a492d3SKenneth D. Merry.Nm 6033fab22eSKenneth D. Merry.Ic inquiry 61c60e19a8SKenneth D. Merry.Op device id 62525689f1SJustin T. Gibbs.Op generic args 63525689f1SJustin T. Gibbs.Op Fl D 64525689f1SJustin T. Gibbs.Op Fl S 65525689f1SJustin T. Gibbs.Op Fl R 667c7fb079SRuslan Ermilov.Nm 6752c9ce25SScott Long.Ic identify 6852c9ce25SScott Long.Op device id 6952c9ce25SScott Long.Op generic args 70757e402dSAlexander Motin.Op Fl v 7152c9ce25SScott Long.Nm 7242cb6a80SKenneth D. Merry.Ic reportluns 7342cb6a80SKenneth D. Merry.Op device id 7442cb6a80SKenneth D. Merry.Op generic args 7542cb6a80SKenneth D. Merry.Op Fl c 7642cb6a80SKenneth D. Merry.Op Fl l 7742cb6a80SKenneth D. Merry.Op Fl r Ar reporttype 7842cb6a80SKenneth D. Merry.Nm 79f553b7b3SKenneth D. Merry.Ic readcap 80f553b7b3SKenneth D. Merry.Op device id 81f553b7b3SKenneth D. Merry.Op generic args 82f553b7b3SKenneth D. Merry.Op Fl b 83f553b7b3SKenneth D. Merry.Op Fl h 84f553b7b3SKenneth D. Merry.Op Fl H 85b9dd559aSWarner Losh.Op Fl l 86f553b7b3SKenneth D. Merry.Op Fl N 87f553b7b3SKenneth D. Merry.Op Fl q 88f553b7b3SKenneth D. Merry.Op Fl s 89f553b7b3SKenneth D. Merry.Nm 9033fab22eSKenneth D. Merry.Ic start 91c60e19a8SKenneth D. Merry.Op device id 92525689f1SJustin T. Gibbs.Op generic args 937c7fb079SRuslan Ermilov.Nm 9433fab22eSKenneth D. Merry.Ic stop 95c60e19a8SKenneth D. Merry.Op device id 96525689f1SJustin T. Gibbs.Op generic args 977c7fb079SRuslan Ermilov.Nm 98f9cecca2SMatthew N. Dodd.Ic load 99f9cecca2SMatthew N. Dodd.Op device id 100f9cecca2SMatthew N. Dodd.Op generic args 101f9cecca2SMatthew N. Dodd.Nm 10233fab22eSKenneth D. Merry.Ic eject 103c60e19a8SKenneth D. Merry.Op device id 104525689f1SJustin T. Gibbs.Op generic args 1057c7fb079SRuslan Ermilov.Nm 106d68fae58SEdward Tomasz Napierala.Ic reprobe 107d68fae58SEdward Tomasz Napierala.Op device id 108d68fae58SEdward Tomasz Napierala.Nm 10933fab22eSKenneth D. Merry.Ic rescan 11036d0fa44SKenneth D. Merry.Aq all | device id | bus Ns Op :target:lun 1117c7fb079SRuslan Ermilov.Nm 11233fab22eSKenneth D. Merry.Ic reset 11336d0fa44SKenneth D. Merry.Aq all | device id | bus Ns Op :target:lun 1147c7fb079SRuslan Ermilov.Nm 11533fab22eSKenneth D. Merry.Ic defects 116c60e19a8SKenneth D. Merry.Op device id 117525689f1SJustin T. Gibbs.Op generic args 118525689f1SJustin T. Gibbs.Aq Fl f Ar format 119525689f1SJustin T. Gibbs.Op Fl P 120525689f1SJustin T. Gibbs.Op Fl G 121a1736be3SKenneth D. Merry.Op Fl q 122a1736be3SKenneth D. Merry.Op Fl s 123a1736be3SKenneth D. Merry.Op Fl S Ar offset 124a1736be3SKenneth D. Merry.Op Fl X 1257c7fb079SRuslan Ermilov.Nm 12633fab22eSKenneth D. Merry.Ic modepage 127c60e19a8SKenneth D. Merry.Op device id 128525689f1SJustin T. Gibbs.Op generic args 129e341cfd2SAlexander Motin.Op Fl 6 13054644e21SAlexander Motin.Aq Fl m Ar page[,subpage] | Fl l 1311ac2383cSBill Fumerola.Op Fl P Ar pgctl 13209128776SAlexander Motin.Op Fl D 13309128776SAlexander Motin.Op Fl L 1347e32b20dSKelly Yancey.Op Fl b | Fl e 135525689f1SJustin T. Gibbs.Op Fl d 1367c7fb079SRuslan Ermilov.Nm 13733fab22eSKenneth D. Merry.Ic cmd 138c60e19a8SKenneth D. Merry.Op device id 139525689f1SJustin T. Gibbs.Op generic args 14080976615SAlexander Motin.Aq Fl a Ar cmd Op args 141525689f1SJustin T. Gibbs.Aq Fl c Ar cmd Op args 142f930c0dbSAlexander Motin.Op Fl d 143f930c0dbSAlexander Motin.Op Fl f 144525689f1SJustin T. Gibbs.Op Fl i Ar len Ar fmt 145525689f1SJustin T. Gibbs.Bk -words 146525689f1SJustin T. Gibbs.Op Fl o Ar len Ar fmt Op args 14780976615SAlexander Motin.Op Fl r Ar fmt 148525689f1SJustin T. Gibbs.Ek 1497c7fb079SRuslan Ermilov.Nm 15006e79492SKenneth D. Merry.Ic smpcmd 15106e79492SKenneth D. Merry.Op device id 15206e79492SKenneth D. Merry.Op generic args 15306e79492SKenneth D. Merry.Aq Fl r Ar len Ar fmt Op args 15406e79492SKenneth D. Merry.Aq Fl R Ar len Ar fmt Op args 15506e79492SKenneth D. Merry.Nm 15606e79492SKenneth D. Merry.Ic smprg 15706e79492SKenneth D. Merry.Op device id 15806e79492SKenneth D. Merry.Op generic args 15906e79492SKenneth D. Merry.Op Fl l 16006e79492SKenneth D. Merry.Nm 16106e79492SKenneth D. Merry.Ic smppc 16206e79492SKenneth D. Merry.Op device id 16306e79492SKenneth D. Merry.Op generic args 16406e79492SKenneth D. Merry.Aq Fl p Ar phy 16506e79492SKenneth D. Merry.Op Fl l 16606e79492SKenneth D. Merry.Op Fl o Ar operation 16706e79492SKenneth D. Merry.Op Fl d Ar name 16806e79492SKenneth D. Merry.Op Fl m Ar rate 16906e79492SKenneth D. Merry.Op Fl M Ar rate 17006e79492SKenneth D. Merry.Op Fl T Ar pp_timeout 17106e79492SKenneth D. Merry.Op Fl a Ar enable|disable 17206e79492SKenneth D. Merry.Op Fl A Ar enable|disable 17306e79492SKenneth D. Merry.Op Fl s Ar enable|disable 17406e79492SKenneth D. Merry.Op Fl S Ar enable|disable 17506e79492SKenneth D. Merry.Nm 17606e79492SKenneth D. Merry.Ic smpphylist 17706e79492SKenneth D. Merry.Op device id 17806e79492SKenneth D. Merry.Op generic args 17906e79492SKenneth D. Merry.Op Fl l 18006e79492SKenneth D. Merry.Op Fl q 18106e79492SKenneth D. Merry.Nm 18206e79492SKenneth D. Merry.Ic smpmaninfo 18306e79492SKenneth D. Merry.Op device id 18406e79492SKenneth D. Merry.Op generic args 18506e79492SKenneth D. Merry.Op Fl l 18606e79492SKenneth D. Merry.Nm 18733fab22eSKenneth D. Merry.Ic debug 188525689f1SJustin T. Gibbs.Op Fl I 189a7e5261eSNate Lawson.Op Fl P 190525689f1SJustin T. Gibbs.Op Fl T 191525689f1SJustin T. Gibbs.Op Fl S 192a7e5261eSNate Lawson.Op Fl X 19394d09127SKenneth D. Merry.Op Fl c 194fbfb753fSAlexander Motin.Op Fl p 195512efccfSAlexander Motin.Aq all | off | device id | bus Ns Op :target Ns Op :lun 1967c7fb079SRuslan Ermilov.Nm 19733fab22eSKenneth D. Merry.Ic tags 198c60e19a8SKenneth D. Merry.Op device id 1999deea857SKenneth D. Merry.Op generic args 2009deea857SKenneth D. Merry.Op Fl N Ar tags 2019deea857SKenneth D. Merry.Op Fl q 2029deea857SKenneth D. Merry.Op Fl v 2037c7fb079SRuslan Ermilov.Nm 20433fab22eSKenneth D. Merry.Ic negotiate 205c60e19a8SKenneth D. Merry.Op device id 2069deea857SKenneth D. Merry.Op generic args 2079deea857SKenneth D. Merry.Op Fl c 2089deea857SKenneth D. Merry.Op Fl D Ar enable|disable 209b447e682SAlexander Motin.Op Fl M Ar mode 2109deea857SKenneth D. Merry.Op Fl O Ar offset 2119deea857SKenneth D. Merry.Op Fl q 2129deea857SKenneth D. Merry.Op Fl R Ar syncrate 2139deea857SKenneth D. Merry.Op Fl T Ar enable|disable 2149deea857SKenneth D. Merry.Op Fl U 2159deea857SKenneth D. Merry.Op Fl W Ar bus_width 2169deea857SKenneth D. Merry.Op Fl v 2177c7fb079SRuslan Ermilov.Nm 21833fab22eSKenneth D. Merry.Ic format 21996a93c63SKenneth D. Merry.Op device id 22096a93c63SKenneth D. Merry.Op generic args 22196a93c63SKenneth D. Merry.Op Fl q 222e9e4d3e4SKenneth D. Merry.Op Fl r 22396a93c63SKenneth D. Merry.Op Fl w 22496a93c63SKenneth D. Merry.Op Fl y 2257c7fb079SRuslan Ermilov.Nm 226ffead710SBryan Venteicher.Ic sanitize 227ffead710SBryan Venteicher.Op device id 228ffead710SBryan Venteicher.Op generic args 229ffead710SBryan Venteicher.Aq Fl a Ar overwrite | block | crypto | exitfailure 230ffead710SBryan Venteicher.Op Fl c Ar passes 231ffead710SBryan Venteicher.Op Fl I 232ffead710SBryan Venteicher.Op Fl P Ar pattern 233ffead710SBryan Venteicher.Op Fl q 234ffead710SBryan Venteicher.Op Fl U 235ffead710SBryan Venteicher.Op Fl r 236ffead710SBryan Venteicher.Op Fl w 237ffead710SBryan Venteicher.Op Fl y 238ffead710SBryan Venteicher.Nm 23950c9a276SAlexander Motin.Ic idle 24050c9a276SAlexander Motin.Op device id 24150c9a276SAlexander Motin.Op generic args 24250c9a276SAlexander Motin.Op Fl t Ar time 24350c9a276SAlexander Motin.Nm 24450c9a276SAlexander Motin.Ic standby 24550c9a276SAlexander Motin.Op device id 24650c9a276SAlexander Motin.Op generic args 24750c9a276SAlexander Motin.Op Fl t Ar time 24850c9a276SAlexander Motin.Nm 24950c9a276SAlexander Motin.Ic sleep 25050c9a276SAlexander Motin.Op device id 25150c9a276SAlexander Motin.Op generic args 25250c9a276SAlexander Motin.Nm 2533bed0179SSteven Hartland.Ic powermode 2543bed0179SSteven Hartland.Op device id 2553bed0179SSteven Hartland.Op generic args 2563bed0179SSteven Hartland.Nm 257e7affda5SAlexander Motin.Ic apm 258e7affda5SAlexander Motin.Op device id 259e7affda5SAlexander Motin.Op generic args 260e7affda5SAlexander Motin.Op Fl l Ar level 261e7affda5SAlexander Motin.Nm 262e7affda5SAlexander Motin.Ic aam 263e7affda5SAlexander Motin.Op device id 264e7affda5SAlexander Motin.Op generic args 265e7affda5SAlexander Motin.Op Fl l Ar level 266e7affda5SAlexander Motin.Nm 2671f4782a4SEd Maste.Ic fwdownload 2681f4782a4SEd Maste.Op device id 2691f4782a4SEd Maste.Op generic args 2701f4782a4SEd Maste.Aq Fl f Ar fw_image 2710e358df0SKenneth D. Merry.Op Fl q 2721f4782a4SEd Maste.Op Fl s 2730e358df0SKenneth D. Merry.Op Fl y 2741f4782a4SEd Maste.Nm 2751146874aSSteven Hartland.Ic security 2761146874aSSteven Hartland.Op device id 2771146874aSSteven Hartland.Op generic args 2781146874aSSteven Hartland.Op Fl d Ar pwd 2791146874aSSteven Hartland.Op Fl e Ar pwd 2801146874aSSteven Hartland.Op Fl f 2811146874aSSteven Hartland.Op Fl h Ar pwd 2821146874aSSteven Hartland.Op Fl k Ar pwd 2831146874aSSteven Hartland.Op Fl l Ar high|maximum 2841146874aSSteven Hartland.Op Fl q 2851146874aSSteven Hartland.Op Fl s Ar pwd 2861146874aSSteven Hartland.Op Fl T Ar timeout 2871146874aSSteven Hartland.Op Fl U Ar user|master 2881146874aSSteven Hartland.Op Fl y 2891146874aSSteven Hartland.Nm 2909e68761cSSteven Hartland.Ic hpa 2919e68761cSSteven Hartland.Op device id 2929e68761cSSteven Hartland.Op generic args 2939e68761cSSteven Hartland.Op Fl f 2949e68761cSSteven Hartland.Op Fl l 2959e68761cSSteven Hartland.Op Fl P 2969e68761cSSteven Hartland.Op Fl p Ar pwd 2979e68761cSSteven Hartland.Op Fl q 2989e68761cSSteven Hartland.Op Fl s Ar max_sectors 2999e68761cSSteven Hartland.Op Fl U Ar pwd 3009e68761cSSteven Hartland.Op Fl y 3019e68761cSSteven Hartland.Nm 30289b35a52SAlexander Motin.Ic ama 30389b35a52SAlexander Motin.Op device id 30489b35a52SAlexander Motin.Op generic args 30589b35a52SAlexander Motin.Op Fl f 30689b35a52SAlexander Motin.Op Fl q 30789b35a52SAlexander Motin.Op Fl s Ar max_sectors 30889b35a52SAlexander Motin.Nm 30908df2e3eSKenneth D. Merry.Ic persist 31008df2e3eSKenneth D. Merry.Op device id 31108df2e3eSKenneth D. Merry.Op generic args 31208df2e3eSKenneth D. Merry.Aq Fl i Ar action | Fl o Ar action 31308df2e3eSKenneth D. Merry.Op Fl a 31408df2e3eSKenneth D. Merry.Op Fl I Ar trans_id 31508df2e3eSKenneth D. Merry.Op Fl k Ar key 31608df2e3eSKenneth D. Merry.Op Fl K Ar sa_key 31708df2e3eSKenneth D. Merry.Op Fl p 31808df2e3eSKenneth D. Merry.Op Fl R Ar rel_tgt_port 31908df2e3eSKenneth D. Merry.Op Fl s Ar scope 32008df2e3eSKenneth D. Merry.Op Fl S 32108df2e3eSKenneth D. Merry.Op Fl T Ar res_type 32208df2e3eSKenneth D. Merry.Op Fl U 32308df2e3eSKenneth D. Merry.Nm 3245672fac9SKenneth D. Merry.Ic attrib 3255672fac9SKenneth D. Merry.Op device id 3265672fac9SKenneth D. Merry.Op generic args 3275672fac9SKenneth D. Merry.Aq Fl r Ar action | Fl w Ar attrib 3285672fac9SKenneth D. Merry.Op Fl a Ar attr_num 3295672fac9SKenneth D. Merry.Op Fl c 3305672fac9SKenneth D. Merry.Op Fl e Ar elem_addr 3315672fac9SKenneth D. Merry.Op Fl F Ar form1,form2 3325672fac9SKenneth D. Merry.Op Fl p Ar part 3335672fac9SKenneth D. Merry.Op Fl s Ar start_addr 3345672fac9SKenneth D. Merry.Op Fl T Ar elem_type 3355672fac9SKenneth D. Merry.Op Fl V Ar lv_num 3365672fac9SKenneth D. Merry.Nm 3370e358df0SKenneth D. Merry.Ic opcodes 3380e358df0SKenneth D. Merry.Op device id 3390e358df0SKenneth D. Merry.Op generic args 3400e358df0SKenneth D. Merry.Op Fl o Ar opcode 3410e358df0SKenneth D. Merry.Op Fl s Ar service_action 3420e358df0SKenneth D. Merry.Op Fl N 3430e358df0SKenneth D. Merry.Op Fl T 3440e358df0SKenneth D. Merry.Nm 3459a6844d5SKenneth D. Merry.Ic zone 3469a6844d5SKenneth D. Merry.Aq Fl c Ar cmd 3479a6844d5SKenneth D. Merry.Op Fl a 3489a6844d5SKenneth D. Merry.Op Fl l Ar lba 3499a6844d5SKenneth D. Merry.Op Fl o Ar rep_opts 3509a6844d5SKenneth D. Merry.Op Fl P Ar print_opts 3519a6844d5SKenneth D. Merry.Nm 3529a6844d5SKenneth D. Merry.Ic epc 3539a6844d5SKenneth D. Merry.Aq Fl c Ar cmd 3549a6844d5SKenneth D. Merry.Op Fl d 3559a6844d5SKenneth D. Merry.Op Fl D 3569a6844d5SKenneth D. Merry.Op Fl e 3579a6844d5SKenneth D. Merry.Op Fl H 3589a6844d5SKenneth D. Merry.Op Fl p Ar power_cond 3599a6844d5SKenneth D. Merry.Op Fl P 3609a6844d5SKenneth D. Merry.Op Fl r Ar restore_src 3619a6844d5SKenneth D. Merry.Op Fl s 3629a6844d5SKenneth D. Merry.Op Fl S Ar power_src 3639a6844d5SKenneth D. Merry.Op Fl T Ar timer 3649a6844d5SKenneth D. Merry.Nm 36528db0a5eSKenneth D. Merry.Ic timestamp 36628db0a5eSKenneth D. Merry.Op device id 36728db0a5eSKenneth D. Merry.Op generic args 36828db0a5eSKenneth D. Merry.Ao Fl r Oo Ns Fl f Ar format | Fl m | Fl U Oc | Fl s Ao Fl f Ar format Fl T Ar time | Fl U Ac Ac 36928db0a5eSKenneth D. Merry.Nm 370d455c0d0SWarner Losh.Ic devtype 371d455c0d0SWarner Losh.Op device id 372d455c0d0SWarner Losh.Nm 37353cce2e7SWarner Losh.Ic depop 37453cce2e7SWarner Losh.Op device id 37553cce2e7SWarner Losh.Op generic args 37653cce2e7SWarner Losh.Ao Fl l | Fl d | Fl r Ac 37753cce2e7SWarner Losh.Op Fl e Ar elem 37853cce2e7SWarner Losh.Op Fl c Ar capacity 37953cce2e7SWarner Losh.Nm 38033fab22eSKenneth D. Merry.Ic help 381525689f1SJustin T. Gibbs.Sh DESCRIPTION 382e1205e80SPhilippe CharnierThe 3837c7fb079SRuslan Ermilov.Nm 3842bcbf4d8STom Hukinsutility allows users to access and control the 38533fab22eSKenneth D. Merry.Fx 3862675b8bdSTom HukinsCAM subsystem described in 3872675b8bdSTom Hukins.Xr cam 4 . 388525689f1SJustin T. Gibbs.Pp 389e1205e80SPhilippe CharnierThe 3907c7fb079SRuslan Ermilov.Nm 391e1205e80SPhilippe Charnierutility 3929806e231SRuslan Ermilovcan cause a loss of data and/or system crashes if used improperly. 3939806e231SRuslan ErmilovEven 3949deea857SKenneth D. Merryexpert users are encouraged to exercise caution when using this command. 395525689f1SJustin T. GibbsNovice users should stay away from this utility. 396525689f1SJustin T. Gibbs.Pp 397e1205e80SPhilippe CharnierThe 3987c7fb079SRuslan Ermilov.Nm 399e1205e80SPhilippe Charnierutility has a number of primary functions, many of which support an optional 4009806e231SRuslan Ermilovdevice identifier. 4019806e231SRuslan ErmilovA device identifier can take one of three forms: 4021252c1bbSRuslan Ermilov.Bl -tag -width 14n 403c60e19a8SKenneth D. Merry.It deviceUNIT 404c60e19a8SKenneth D. MerrySpecify a device name and unit number combination, like "da5" or "cd3". 405c60e19a8SKenneth D. Merry.It bus:target 4069806e231SRuslan ErmilovSpecify a bus number and target id. 4079806e231SRuslan ErmilovThe bus number can be determined from 408c60e19a8SKenneth D. Merrythe output of 409c60e19a8SKenneth D. Merry.Dq camcontrol devlist . 410c60e19a8SKenneth D. MerryThe lun defaults to 0. 411c60e19a8SKenneth D. Merry.It bus:target:lun 4129806e231SRuslan ErmilovSpecify the bus, target and lun for a device. 4139806e231SRuslan Ermilov(e.g.\& 1:2:0) 414c60e19a8SKenneth D. Merry.El 415c60e19a8SKenneth D. Merry.Pp 416c60e19a8SKenneth D. MerryThe device identifier, if it is specified, 417c60e19a8SKenneth D. Merry.Em must 418c60e19a8SKenneth D. Merrycome immediately after the function name, and before any generic or 4199806e231SRuslan Ermilovfunction-specific arguments. 4209806e231SRuslan ErmilovNote that the 421c60e19a8SKenneth D. Merry.Fl n 422c60e19a8SKenneth D. Merryand 423c60e19a8SKenneth D. Merry.Fl u 424c60e19a8SKenneth D. Merryarguments described below will override any device name or unit number 4259806e231SRuslan Ermilovspecified beforehand. 4269806e231SRuslan ErmilovThe 427c60e19a8SKenneth D. Merry.Fl n 428c60e19a8SKenneth D. Merryand 429c60e19a8SKenneth D. Merry.Fl u 430c60e19a8SKenneth D. Merryarguments will 431c60e19a8SKenneth D. Merry.Em not 43296a93c63SKenneth D. Merryoverride a specified bus:target or bus:target:lun, however. 433c60e19a8SKenneth D. Merry.Pp 434c60e19a8SKenneth D. MerryMost of the 4357c7fb079SRuslan Ermilov.Nm 436c60e19a8SKenneth D. Merryprimary functions support these generic arguments: 4371252c1bbSRuslan Ermilov.Bl -tag -width 14n 438525689f1SJustin T. Gibbs.It Fl C Ar count 4399806e231SRuslan ErmilovSCSI command retry count. 4409806e231SRuslan ErmilovIn order for this to work, error recovery 4411252c1bbSRuslan Ermilov.Pq Fl E 442525689f1SJustin T. Gibbsmust be turned on. 443525689f1SJustin T. Gibbs.It Fl E 444525689f1SJustin T. GibbsInstruct the kernel to perform generic SCSI error recovery for the given 4459806e231SRuslan Ermilovcommand. 4469806e231SRuslan ErmilovThis is needed in order for the retry count 4471252c1bbSRuslan Ermilov.Pq Fl C 4489806e231SRuslan Ermilovto be honored. 4499806e231SRuslan ErmilovOther than retrying commands, the generic error recovery in 450525689f1SJustin T. Gibbsthe code will generally attempt to spin up drives that are not spinning. 451525689f1SJustin T. GibbsIt may take some other actions, depending upon the sense code returned from 452525689f1SJustin T. Gibbsthe command. 453525689f1SJustin T. Gibbs.It Fl n Ar dev_name 4549806e231SRuslan ErmilovSpecify the device type to operate on, e.g.\& "da", "cd". 455492a2ef5SKenneth D. Merry.It Fl Q Ar task_attr 456492a2ef5SKenneth D. Merry.Tn SCSI 457492a2ef5SKenneth D. Merrytask attribute for the command, if it is a 458492a2ef5SKenneth D. Merry.Tn SCSI 459492a2ef5SKenneth D. Merrycommand. 460492a2ef5SKenneth D. MerryThis may be ordered, simple, head, or aca. 461492a2ef5SKenneth D. MerryIn most cases this is not needed. 462492a2ef5SKenneth D. MerryThe default is simple, which works with all 463492a2ef5SKenneth D. Merry.Tn SCSI 464492a2ef5SKenneth D. Merrydevices. 465492a2ef5SKenneth D. MerryThe task attribute may also be specified numerically. 466525689f1SJustin T. Gibbs.It Fl t Ar timeout 4679806e231SRuslan ErmilovSCSI command timeout in seconds. 4689806e231SRuslan ErmilovThis overrides the default timeout for 469525689f1SJustin T. Gibbsany given command. 470525689f1SJustin T. Gibbs.It Fl u Ar unit_number 4719806e231SRuslan ErmilovSpecify the device unit number, e.g.\& "1", "5". 472525689f1SJustin T. Gibbs.It Fl v 473525689f1SJustin T. GibbsBe verbose, print out sense information for failed SCSI commands. 474525689f1SJustin T. Gibbs.El 475525689f1SJustin T. Gibbs.Pp 476d13d1cd2SKenneth D. MerryPrimary command functions: 477525689f1SJustin T. Gibbs.Bl -tag -width periphlist 47833fab22eSKenneth D. Merry.It Ic devlist 479525689f1SJustin T. GibbsList all physical devices (logical units) attached to the CAM subsystem. 480525689f1SJustin T. GibbsThis also includes a list of peripheral drivers attached to each device. 481525689f1SJustin T. GibbsWith the 482525689f1SJustin T. Gibbs.Fl v 483525689f1SJustin T. Gibbsargument, SCSI bus number, adapter name and unit numbers are printed as 484525689f1SJustin T. Gibbswell. 48556dc4e72SScott LongOn the other hand, with the 48656dc4e72SScott Long.Fl b 48756dc4e72SScott Longargument, only the bus adapter, and unit information will be printed, and 48856dc4e72SScott Longdevice information will be omitted. 48933fab22eSKenneth D. Merry.It Ic periphlist 490525689f1SJustin T. GibbsList all peripheral drivers attached to a given physical device (logical 491525689f1SJustin T. Gibbsunit). 49233fab22eSKenneth D. Merry.It Ic tur 493525689f1SJustin T. GibbsSend the SCSI test unit ready (0x00) command to the given device. 494e1205e80SPhilippe CharnierThe 4957c7fb079SRuslan Ermilov.Nm 496e1205e80SPhilippe Charnierutility will report whether the device is ready or not. 49740a492d3SKenneth D. Merry.It Ic sense 49840a492d3SKenneth D. MerrySend a SCSI REQUEST SENSE command (0x03) to a device. 49940a492d3SKenneth D. MerryThe decoded sense (or hexdump) is printed to stdout. 50040a492d3SKenneth D. Merry.Bl -tag -width 4n 50140a492d3SKenneth D. Merry.It Fl D 50240a492d3SKenneth D. MerryRequest descriptor sense instead of fixed sense. 50340a492d3SKenneth D. Merry.It Fl x 50440a492d3SKenneth D. MerryDo a hexdump of the returned sense data. 50540a492d3SKenneth D. Merry.El 50633fab22eSKenneth D. Merry.It Ic inquiry 5079806e231SRuslan ErmilovSend a SCSI inquiry command (0x12) to a device. 5089806e231SRuslan ErmilovBy default, 5097c7fb079SRuslan Ermilov.Nm 510525689f1SJustin T. Gibbswill print out the standard inquiry data, device serial number, and 5119806e231SRuslan Ermilovtransfer rate information. 5129806e231SRuslan ErmilovThe user can specify that only certain types of 513525689f1SJustin T. Gibbsinquiry data be printed: 5141252c1bbSRuslan Ermilov.Bl -tag -width 4n 515525689f1SJustin T. Gibbs.It Fl D 516525689f1SJustin T. GibbsGet the standard inquiry data. 517525689f1SJustin T. Gibbs.It Fl S 5189806e231SRuslan ErmilovPrint out the serial number. 5199806e231SRuslan ErmilovIf this flag is the only one specified, 5207c7fb079SRuslan Ermilov.Nm 521525689f1SJustin T. Gibbswill not print out "Serial Number" before the value returned by the drive. 522525689f1SJustin T. GibbsThis is to aid in script writing. 523525689f1SJustin T. Gibbs.It Fl R 524525689f1SJustin T. GibbsPrint out transfer rate information. 525525689f1SJustin T. Gibbs.El 52652c9ce25SScott Long.It Ic identify 5279977fb80SYi-Chen LiSend an ATA identify command (0xec) to a device. 52842cb6a80SKenneth D. Merry.It Ic reportluns 52942cb6a80SKenneth D. MerrySend the SCSI REPORT LUNS (0xA0) command to the given device. 53042cb6a80SKenneth D. MerryBy default, 53142cb6a80SKenneth D. Merry.Nm 53242cb6a80SKenneth D. Merrywill print out the list of logical units (LUNs) supported by the target device. 53342cb6a80SKenneth D. MerryThere are a couple of options to modify the output: 5348266d476SRuslan Ermilov.Bl -tag -width 14n 53542cb6a80SKenneth D. Merry.It Fl c 53642cb6a80SKenneth D. MerryJust print out a count of LUNs, not the actual LUN numbers. 53742cb6a80SKenneth D. Merry.It Fl l 538b1edef17SJoel DahlJust print out the LUNs, and do not print out the count. 53942cb6a80SKenneth D. Merry.It Fl r Ar reporttype 54042cb6a80SKenneth D. MerrySpecify the type of report to request from the target: 54142cb6a80SKenneth D. Merry.Bl -tag -width 012345678 54242cb6a80SKenneth D. Merry.It default 54342cb6a80SKenneth D. MerryReturn the default report. 54442cb6a80SKenneth D. MerryThis is the 54542cb6a80SKenneth D. Merry.Nm 54642cb6a80SKenneth D. Merrydefault. 54742cb6a80SKenneth D. MerryMost targets will support this report if they support the REPORT LUNS 54842cb6a80SKenneth D. Merrycommand. 54942cb6a80SKenneth D. Merry.It wellknown 55042cb6a80SKenneth D. MerryReturn only well known LUNs. 55142cb6a80SKenneth D. Merry.It all 55242cb6a80SKenneth D. MerryReturn all available LUNs. 55342cb6a80SKenneth D. Merry.El 55442cb6a80SKenneth D. Merry.El 55542cb6a80SKenneth D. Merry.Pp 55642cb6a80SKenneth D. Merry.Nm 55742cb6a80SKenneth D. Merrywill try to print out LUN numbers in a reasonable format. 55842cb6a80SKenneth D. MerryIt can understand the peripheral, flat, LUN and extended LUN formats. 559f553b7b3SKenneth D. Merry.It Ic readcap 560f553b7b3SKenneth D. MerrySend the SCSI READ CAPACITY command to the given device and display 561f553b7b3SKenneth D. Merrythe results. 562f553b7b3SKenneth D. MerryIf the device is larger than 2TB, the SCSI READ CAPACITY (16) service 563f553b7b3SKenneth D. Merryaction will be sent to obtain the full size of the device. 564f553b7b3SKenneth D. MerryBy default, 565f553b7b3SKenneth D. Merry.Nm 566f553b7b3SKenneth D. Merrywill print out the last logical block of the device, and the blocksize of 567f553b7b3SKenneth D. Merrythe device in bytes. 568f553b7b3SKenneth D. MerryTo modify the output format, use the following options: 569f553b7b3SKenneth D. Merry.Bl -tag -width 5n 570f553b7b3SKenneth D. Merry.It Fl b 571f553b7b3SKenneth D. MerryJust print out the blocksize, not the last block or device size. 572f553b7b3SKenneth D. MerryThis cannot be used with 573f553b7b3SKenneth D. Merry.Fl N 574f553b7b3SKenneth D. Merryor 575f553b7b3SKenneth D. Merry.Fl s . 576f553b7b3SKenneth D. Merry.It Fl h 577f553b7b3SKenneth D. MerryPrint out the device size in human readable (base 2, 1K == 1024) format. 578f553b7b3SKenneth D. MerryThis implies 579f553b7b3SKenneth D. Merry.Fl N 580f553b7b3SKenneth D. Merryand cannot be used with 581f553b7b3SKenneth D. Merry.Fl q 582f553b7b3SKenneth D. Merryor 583f553b7b3SKenneth D. Merry.Fl b . 584f553b7b3SKenneth D. Merry.It Fl H 585f553b7b3SKenneth D. MerryPrint out the device size in human readable (base 10, 1K == 1000) format. 586b9dd559aSWarner Losh.It Fl l 587b9dd559aSWarner LoshSkip sending the SCSI READ CAPACITY (10) command. 588b9dd559aSWarner LoshSend only the SCSI READ CAPACITY (16) service action and report 589b9dd559aSWarner Loshits results. 590b9dd559aSWarner LoshWhen the two do not match, a quirk is needed to resolve the ambiguity. 591f553b7b3SKenneth D. Merry.It Fl N 592f553b7b3SKenneth D. MerryPrint out the number of blocks in the device instead of the last logical 593f553b7b3SKenneth D. Merryblock. 594f553b7b3SKenneth D. Merry.It Fl q 595f553b7b3SKenneth D. MerryQuiet, print out the numbers only (separated by a comma if 596f553b7b3SKenneth D. Merry.Fl b 597f553b7b3SKenneth D. Merryor 598f553b7b3SKenneth D. Merry.Fl s 599f553b7b3SKenneth D. Merryare not specified). 600f553b7b3SKenneth D. Merry.It Fl s 601f553b7b3SKenneth D. MerryPrint out the last logical block or the size of the device only, and omit 602f553b7b3SKenneth D. Merrythe blocksize. 603f553b7b3SKenneth D. Merry.El 604d68fae58SEdward Tomasz Napierala.Pp 605d68fae58SEdward Tomasz NapieralaNote that this command only displays the information, it does not update 606d68fae58SEdward Tomasz Napieralathe kernel data structures. 607d68fae58SEdward Tomasz NapieralaUse the 608d68fae58SEdward Tomasz Napierala.Nm 609d68fae58SEdward Tomasz Napieralareprobe subcommand to do that. 61033fab22eSKenneth D. Merry.It Ic start 611525689f1SJustin T. GibbsSend the SCSI Start/Stop Unit (0x1B) command to the given device with the 612525689f1SJustin T. Gibbsstart bit set. 61333fab22eSKenneth D. Merry.It Ic stop 614525689f1SJustin T. GibbsSend the SCSI Start/Stop Unit (0x1B) command to the given device with the 615525689f1SJustin T. Gibbsstart bit cleared. 616f9cecca2SMatthew N. Dodd.It Ic load 617f9cecca2SMatthew N. DoddSend the SCSI Start/Stop Unit (0x1B) command to the given device with the 618f9cecca2SMatthew N. Doddstart bit set and the load/eject bit set. 61933fab22eSKenneth D. Merry.It Ic eject 620525689f1SJustin T. GibbsSend the SCSI Start/Stop Unit (0x1B) command to the given device with the 621f9cecca2SMatthew N. Doddstart bit cleared and the load/eject bit set. 62233fab22eSKenneth D. Merry.It Ic rescan 623db4fcadfSConrad MeyerTell the kernel to scan all buses in the system (with the 6245710d224SKenneth D. Merry.Ar all 62536d0fa44SKenneth D. Merryargument), the given bus (XPT_SCAN_BUS), bus:target:lun or device 6269806e231SRuslan Ermilov(XPT_SCAN_LUN) for new devices or devices that have gone away. 6279806e231SRuslan ErmilovThe user 628db4fcadfSConrad Meyermay specify a scan of all buses, a single bus, or a lun. 6299806e231SRuslan ErmilovScanning all luns 6300227791bSRuslan Ermilovon a target is not supported. 63136d0fa44SKenneth D. Merry.Pp 63236d0fa44SKenneth D. MerryIf a device is specified by peripheral name and unit number, for instance 63336d0fa44SKenneth D. Merryda4, it may only be rescanned if that device currently exists in the CAM EDT 63436d0fa44SKenneth D. Merry(Existing Device Table). 63536d0fa44SKenneth D. MerryIf the device is no longer there (see 63636d0fa44SKenneth D. Merry.Nm 63736d0fa44SKenneth D. Merrydevlist ), 63836d0fa44SKenneth D. Merryyou must use the bus:target:lun form to rescan it. 639d68fae58SEdward Tomasz Napierala.It Ic reprobe 640d68fae58SEdward Tomasz NapieralaTell the kernel to refresh the information about the device and 641d68fae58SEdward Tomasz Napieralanotify the upper layer, 642d68fae58SEdward Tomasz Napierala.Xr GEOM 4 . 643d68fae58SEdward Tomasz NapieralaThis includes sending the SCSI READ CAPACITY command and updating 644d68fae58SEdward Tomasz Napieralathe disk size visible to the rest of the system. 64533fab22eSKenneth D. Merry.It Ic reset 646db4fcadfSConrad MeyerTell the kernel to reset all buses in the system (with the 6475710d224SKenneth D. Merry.Ar all 64836d0fa44SKenneth D. Merryargument), the given bus (XPT_RESET_BUS) by issuing a SCSI bus 64936d0fa44SKenneth D. Merryreset for that bus, or to reset the given bus:target:lun or device 650a2a44836SMatt Jacob(XPT_RESET_DEV), typically by issuing a BUS DEVICE RESET message after 651ef8f7ac9SSheldon Hearnconnecting to that device. 652ef8f7ac9SSheldon HearnNote that this can have a destructive impact 653a2a44836SMatt Jacobon the system. 65433fab22eSKenneth D. Merry.It Ic defects 655a1736be3SKenneth D. MerrySend the 656a1736be3SKenneth D. Merry.Tn SCSI 657a1736be3SKenneth D. MerryREAD DEFECT DATA (10) command (0x37) or the 658a1736be3SKenneth D. Merry.Tn SCSI 659a1736be3SKenneth D. MerryREAD DEFECT DATA (12) command (0xB7) to the given device, and 660525689f1SJustin T. Gibbsprint out any combination of: the total number of defects, the primary 661525689f1SJustin T. Gibbsdefect list (PLIST), and the grown defect list (GLIST). 6621252c1bbSRuslan Ermilov.Bl -tag -width 11n 663525689f1SJustin T. Gibbs.It Fl f Ar format 664a1736be3SKenneth D. MerrySpecify the requested format of the defect list. 6659806e231SRuslan ErmilovThe format argument is 6669806e231SRuslan Ermilovrequired. 6679806e231SRuslan ErmilovMost drives support the physical sector format. 6689806e231SRuslan ErmilovSome drives 6699806e231SRuslan Ermilovsupport the logical block format. 6700227791bSRuslan ErmilovMany drives, if they do not support the 671525689f1SJustin T. Gibbsrequested format, return the data in an alternate format, along with sense 6720227791bSRuslan Ermilovinformation indicating that the requested data format is not supported. 673e1205e80SPhilippe CharnierThe 6747c7fb079SRuslan Ermilov.Nm 675e1205e80SPhilippe Charnierutility 676525689f1SJustin T. Gibbsattempts to detect this, and print out whatever format the drive returns. 6770227791bSRuslan ErmilovIf the drive uses a non-standard sense code to report that it does not 678525689f1SJustin T. Gibbssupport the requested format, 6797c7fb079SRuslan Ermilov.Nm 680525689f1SJustin T. Gibbswill probably see the error as a failure to complete the request. 681a1736be3SKenneth D. Merry.Pp 682a1736be3SKenneth D. MerryThe format options are: 683a1736be3SKenneth D. Merry.Bl -tag -width 9n 684a1736be3SKenneth D. Merry.It block 685a1736be3SKenneth D. MerryPrint out the list as logical blocks. 686a1736be3SKenneth D. MerryThis is limited to 32-bit block sizes, and isn't supported by many modern 687a1736be3SKenneth D. Merrydrives. 688a1736be3SKenneth D. Merry.It longblock 689a1736be3SKenneth D. MerryPrint out the list as logical blocks. 690a1736be3SKenneth D. MerryThis option uses a 64-bit block size. 691a1736be3SKenneth D. Merry.It bfi 692a1736be3SKenneth D. MerryPrint out the list in bytes from index format. 693a1736be3SKenneth D. Merry.It extbfi 694a1736be3SKenneth D. MerryPrint out the list in extended bytes from index format. 695a1736be3SKenneth D. MerryThe extended format allows for ranges of blocks to be printed. 696a1736be3SKenneth D. Merry.It phys 697a1736be3SKenneth D. MerryPrint out the list in physical sector format. 698a1736be3SKenneth D. MerryMost drives support this format. 699a1736be3SKenneth D. Merry.It extphys 700a1736be3SKenneth D. MerryPrint out the list in extended physical sector format. 701a1736be3SKenneth D. MerryThe extended format allows for ranges of blocks to be printed. 702a1736be3SKenneth D. Merry.El 703525689f1SJustin T. Gibbs.It Fl G 7049806e231SRuslan ErmilovPrint out the grown defect list. 7059806e231SRuslan ErmilovThis is a list of bad blocks that have 706525689f1SJustin T. Gibbsbeen remapped since the disk left the factory. 707525689f1SJustin T. Gibbs.It Fl P 708525689f1SJustin T. GibbsPrint out the primary defect list. 709a1736be3SKenneth D. MerryThis is the list of defects that were present in the factory. 710a1736be3SKenneth D. Merry.It Fl q 711a1736be3SKenneth D. MerryWhen printing status information with 712a1736be3SKenneth D. Merry.Fl s , 713a1736be3SKenneth D. Merryonly print the number of defects. 714a1736be3SKenneth D. Merry.It Fl s 715a1736be3SKenneth D. MerryJust print the number of defects, not the list of defects. 716a1736be3SKenneth D. Merry.It Fl S Ar offset 717a1736be3SKenneth D. MerrySpecify the starting offset into the defect list. 718a1736be3SKenneth D. MerryThis implies using the 719a1736be3SKenneth D. Merry.Tn SCSI 720a1736be3SKenneth D. MerryREAD DEFECT DATA (12) command, as the 10 byte version of the command 721a1736be3SKenneth D. Merrydoesn't support the address descriptor index field. 722a1736be3SKenneth D. MerryNot all drives support the 12 byte command, and some drives that support 723a1736be3SKenneth D. Merrythe 12 byte command don't support the address descriptor index field. 724a1736be3SKenneth D. Merry.It Fl X 725a1736be3SKenneth D. MerryPrint out defects in hexadecimal (base 16) form instead of base 10 form. 726525689f1SJustin T. Gibbs.El 727525689f1SJustin T. Gibbs.Pp 728525689f1SJustin T. GibbsIf neither 729525689f1SJustin T. Gibbs.Fl P 730525689f1SJustin T. Gibbsnor 731525689f1SJustin T. Gibbs.Fl G 732525689f1SJustin T. Gibbsis specified, 7337c7fb079SRuslan Ermilov.Nm 734525689f1SJustin T. Gibbswill print out the number of defects given in the READ DEFECT DATA header 735525689f1SJustin T. Gibbsreturned from the drive. 7367027b9cdSKenneth D. MerrySome drives will report 0 defects if neither the primary or grown defect 7377027b9cdSKenneth D. Merrylists are requested. 73833fab22eSKenneth D. Merry.It Ic modepage 7399806e231SRuslan ErmilovAllows the user to display and optionally edit a SCSI mode page. 7409806e231SRuslan ErmilovThe mode 741525689f1SJustin T. Gibbspage formats are located in 742525689f1SJustin T. Gibbs.Pa /usr/share/misc/scsi_modes . 743525689f1SJustin T. GibbsThis can be overridden by specifying a different file in the 744525689f1SJustin T. Gibbs.Ev SCSI_MODES 74533fab22eSKenneth D. Merryenvironment variable. 74633fab22eSKenneth D. MerryThe 74733fab22eSKenneth D. Merry.Ic modepage 74833fab22eSKenneth D. Merrycommand takes several arguments: 7491252c1bbSRuslan Ermilov.Bl -tag -width 12n 750e341cfd2SAlexander Motin.It Fl 6 751e341cfd2SAlexander MotinUse 6 byte MODE commands instead of default 10 byte. 752e341cfd2SAlexander MotinOld devices may not support 10 byte MODE commands, while new devices may 753e341cfd2SAlexander Motinnot be able to report all mode pages with 6 byte commands. 754e341cfd2SAlexander MotinIf not specified, 755e341cfd2SAlexander Motin.Nm 756e341cfd2SAlexander Motinstarts with 10 byte commands and falls back to 6 byte on error. 7579deea857SKenneth D. Merry.It Fl d 758525689f1SJustin T. GibbsDisable block descriptors for mode sense. 75909128776SAlexander Motin.It Fl D 76009128776SAlexander MotinDisplay/edit block descriptors instead of mode page. 76109128776SAlexander Motin.It Fl L 76209128776SAlexander MotinUse long LBA block descriptors. 763f8f3b16bSChe-Yu ChangAllows number of LBAs bigger than 2^^32. 7647e32b20dSKelly Yancey.It Fl b 7657e32b20dSKelly YanceyDisplays mode page data in binary format. 766525689f1SJustin T. Gibbs.It Fl e 7679806e231SRuslan ErmilovThis flag allows the user to edit values in the mode page. 7689806e231SRuslan ErmilovThe user may 7697e32b20dSKelly Yanceyeither edit mode page values with the text editor pointed to by his 7707e32b20dSKelly Yancey.Ev EDITOR 7717e32b20dSKelly Yanceyenvironment variable, or supply mode page values via standard input, using 7727e32b20dSKelly Yanceythe same format that 7737c7fb079SRuslan Ermilov.Nm 7749806e231SRuslan Ermilovuses to display mode page values. 7759806e231SRuslan ErmilovThe editor will be invoked if 7767c7fb079SRuslan Ermilov.Nm 7777e32b20dSKelly Yanceydetects that standard input is terminal. 7787e32b20dSKelly Yancey.It Fl l 7797e32b20dSKelly YanceyLists all available mode pages. 780f8f3b16bSChe-Yu ChangIf specified more than once, also lists subpages. 78154644e21SAlexander Motin.It Fl m Ar page[,subpage] 78254644e21SAlexander MotinThis specifies the number of the mode page and optionally subpage the user 78354644e21SAlexander Motinwould like to view and/or edit. 7849806e231SRuslan ErmilovThis argument is mandatory unless 7859402dd99SKelly Yancey.Fl l 7869402dd99SKelly Yanceyis specified. 7871ac2383cSBill Fumerola.It Fl P Ar pgctl 7889806e231SRuslan ErmilovThis allows the user to specify the page control field. 7899806e231SRuslan ErmilovPossible values are: 790525689f1SJustin T. Gibbs.Bl -tag -width xxx -compact 79146a1f3b4SKenneth D. Merry.It 0 792525689f1SJustin T. GibbsCurrent values 79346a1f3b4SKenneth D. Merry.It 1 794525689f1SJustin T. GibbsChangeable values 79546a1f3b4SKenneth D. Merry.It 2 796525689f1SJustin T. GibbsDefault values 79746a1f3b4SKenneth D. Merry.It 3 798525689f1SJustin T. GibbsSaved values 799525689f1SJustin T. Gibbs.El 800525689f1SJustin T. Gibbs.El 80133fab22eSKenneth D. Merry.It Ic cmd 80280976615SAlexander MotinAllows the user to send an arbitrary ATA or SCSI CDB to any device. 80333fab22eSKenneth D. MerryThe 80433fab22eSKenneth D. Merry.Ic cmd 805525689f1SJustin T. Gibbsfunction requires the 806525689f1SJustin T. Gibbs.Fl c 80780976615SAlexander Motinargument to specify SCSI CDB or the 80880976615SAlexander Motin.Fl a 80980976615SAlexander Motinargument to specify ATA Command Block registers values. 8109806e231SRuslan ErmilovOther arguments are optional, depending on 8119806e231SRuslan Ermilovthe command type. 8129806e231SRuslan ErmilovThe command and data specification syntax is documented 813525689f1SJustin T. Gibbsin 81496a93c63SKenneth D. Merry.Xr cam_cdbparse 3 . 815a53bb70bSJoel DahlNOTE: If the CDB specified causes data to be transferred to or from the 816525689f1SJustin T. GibbsSCSI device in question, you MUST specify either 817525689f1SJustin T. Gibbs.Fl i 818525689f1SJustin T. Gibbsor 819525689f1SJustin T. Gibbs.Fl o . 8201252c1bbSRuslan Ermilov.Bl -tag -width 17n 82180976615SAlexander Motin.It Fl a Ar cmd Op args 82280976615SAlexander MotinThis specifies the content of 12 ATA Command Block registers (command, 82380976615SAlexander Motinfeatures, lba_low, lba_mid, lba_high, device, lba_low_exp, lba_mid_exp. 82480976615SAlexander Motinlba_high_exp, features_exp, sector_count, sector_count_exp). 825525689f1SJustin T. Gibbs.It Fl c Ar cmd Op args 8269806e231SRuslan ErmilovThis specifies the SCSI CDB. 82780976615SAlexander MotinSCSI CDBs may be 6, 10, 12 or 16 bytes. 828f930c0dbSAlexander Motin.It Fl d 829f930c0dbSAlexander MotinSpecifies DMA protocol to be used for ATA command. 830f930c0dbSAlexander Motin.It Fl f 831f930c0dbSAlexander MotinSpecifies FPDMA (NCQ) protocol to be used for ATA command. 832525689f1SJustin T. Gibbs.It Fl i Ar len Ar fmt 833525689f1SJustin T. GibbsThis specifies the amount of data to read, and how it should be displayed. 834525689f1SJustin T. GibbsIf the format is 835525689f1SJustin T. Gibbs.Sq - , 836525689f1SJustin T. Gibbs.Ar len 837525689f1SJustin T. Gibbsbytes of data will be read from the device and written to standard output. 838525689f1SJustin T. Gibbs.It Fl o Ar len Ar fmt Op args 839525689f1SJustin T. GibbsThis specifies the amount of data to be written to a device, and the data 8409806e231SRuslan Ermilovthat is to be written. 8419806e231SRuslan ErmilovIf the format is 842525689f1SJustin T. Gibbs.Sq - , 843525689f1SJustin T. Gibbs.Ar len 844525689f1SJustin T. Gibbsbytes of data will be read from standard input and written to the device. 84580976615SAlexander Motin.It Fl r Ar fmt 84680976615SAlexander MotinThis specifies that 11 result ATA Command Block registers should be displayed 84780976615SAlexander Motin(status, error, lba_low, lba_mid, lba_high, device, lba_low_exp, lba_mid_exp, 84880976615SAlexander Motinlba_high_exp, sector_count, sector_count_exp), and how. 84980976615SAlexander MotinIf the format is 85080976615SAlexander Motin.Sq - , 85180976615SAlexander Motin11 result registers will be written to standard output in hex. 852525689f1SJustin T. Gibbs.El 85306e79492SKenneth D. Merry.It Ic smpcmd 85406e79492SKenneth D. MerryAllows the user to send an arbitrary Serial 85506e79492SKenneth D. MerryManagement Protocol (SMP) command to a device. 85606e79492SKenneth D. MerryThe 85706e79492SKenneth D. Merry.Ic smpcmd 85806e79492SKenneth D. Merryfunction requires the 85906e79492SKenneth D. Merry.Fl r 86006e79492SKenneth D. Merryargument to specify the SMP request to be sent, and the 86106e79492SKenneth D. Merry.Fl R 86206e79492SKenneth D. Merryargument to specify the format of the SMP response. 86306e79492SKenneth D. MerryThe syntax for the SMP request and response arguments is documented in 86406e79492SKenneth D. Merry.Xr cam_cdbparse 3 . 86506e79492SKenneth D. Merry.Pp 86606e79492SKenneth D. MerryNote that SAS adapters that support SMP passthrough (at least the currently 86706e79492SKenneth D. Merryknown adapters) do not accept CRC bytes from the user in the request and do 86806e79492SKenneth D. Merrynot pass CRC bytes back to the user in the response. 86906e79492SKenneth D. MerryTherefore users should not include the CRC bytes in the length of the 87006e79492SKenneth D. Merryrequest and not expect CRC bytes to be returned in the response. 87106e79492SKenneth D. Merry.Bl -tag -width 17n 87206e79492SKenneth D. Merry.It Fl r Ar len Ar fmt Op args 87306e79492SKenneth D. MerryThis specifies the size of the SMP request, without the CRC bytes, and the 8745bb17266SJoel DahlSMP request format. 8755bb17266SJoel DahlIf the format is 87606e79492SKenneth D. Merry.Sq - , 87706e79492SKenneth D. Merry.Ar len 87806e79492SKenneth D. Merrybytes of data will be read from standard input and written as the SMP 87906e79492SKenneth D. Merryrequest. 88006e79492SKenneth D. Merry.It Fl R Ar len Ar fmt Op args 88106e79492SKenneth D. MerryThis specifies the size of the buffer allocated for the SMP response, and 88206e79492SKenneth D. Merrythe SMP response format. 88306e79492SKenneth D. MerryIf the format is 88406e79492SKenneth D. Merry.Sq - , 88506e79492SKenneth D. Merry.Ar len 88606e79492SKenneth D. Merrybytes of data will be allocated for the response and the response will be 88706e79492SKenneth D. Merrywritten to standard output. 88806e79492SKenneth D. Merry.El 88906e79492SKenneth D. Merry.It Ic smprg 89006e79492SKenneth D. MerryAllows the user to send the Serial Management Protocol (SMP) Report General 89106e79492SKenneth D. Merrycommand to a device. 89206e79492SKenneth D. Merry.Nm 89306e79492SKenneth D. Merrywill display the data returned by the Report General command. 89406e79492SKenneth D. MerryIf the SMP target supports the long response format, the additional data 89506e79492SKenneth D. Merrywill be requested and displayed automatically. 89606e79492SKenneth D. Merry.Bl -tag -width 8n 89706e79492SKenneth D. Merry.It Fl l 89806e79492SKenneth D. MerryRequest the long response format only. 89906e79492SKenneth D. MerryNot all SMP targets support the long response format. 90006e79492SKenneth D. MerryThis option causes 90106e79492SKenneth D. Merry.Nm 90206e79492SKenneth D. Merryto skip sending the initial report general request without the long bit set 90306e79492SKenneth D. Merryand only issue a report general request with the long bit set. 90406e79492SKenneth D. Merry.El 90506e79492SKenneth D. Merry.It Ic smppc 90606e79492SKenneth D. MerryAllows the user to issue the Serial Management Protocol (SMP) PHY Control 90706e79492SKenneth D. Merrycommand to a device. 90806e79492SKenneth D. MerryThis function should be used with some caution, as it can render devices 90906e79492SKenneth D. Merryinaccessible, and could potentially cause data corruption as well. 91006e79492SKenneth D. MerryThe 91106e79492SKenneth D. Merry.Fl p 91206e79492SKenneth D. Merryargument is required to specify the PHY to operate on. 91306e79492SKenneth D. Merry.Bl -tag -width 17n 91406e79492SKenneth D. Merry.It Fl p Ar phy 91506e79492SKenneth D. MerrySpecify the PHY to operate on. 91606e79492SKenneth D. MerryThis argument is required. 91706e79492SKenneth D. Merry.It Fl l 91806e79492SKenneth D. MerryRequest the long request/response format. 91906e79492SKenneth D. MerryNot all SMP targets support the long response format. 92006e79492SKenneth D. MerryFor the PHY Control command, this currently only affects whether the 92106e79492SKenneth D. Merryrequest length is set to a value other than 0. 92206e79492SKenneth D. Merry.It Fl o Ar operation 92306e79492SKenneth D. MerrySpecify a PHY control operation. 92406e79492SKenneth D. MerryOnly one 92506e79492SKenneth D. Merry.Fl o 92606e79492SKenneth D. Merryoperation may be specified. 92706e79492SKenneth D. MerryThe operation may be specified numerically (in decimal, hexadecimal, or octal) 92806e79492SKenneth D. Merryor one of the following operation names may be specified: 92906e79492SKenneth D. Merry.Bl -tag -width 16n 93006e79492SKenneth D. Merry.It nop 93106e79492SKenneth D. MerryNo operation. 93206e79492SKenneth D. MerryIt is not necessary to specify this argument. 93306e79492SKenneth D. Merry.It linkreset 93406e79492SKenneth D. MerrySend the LINK RESET command to the phy. 93506e79492SKenneth D. Merry.It hardreset 93606e79492SKenneth D. MerrySend the HARD RESET command to the phy. 93706e79492SKenneth D. Merry.It disable 93806e79492SKenneth D. MerrySend the DISABLE command to the phy. 93906e79492SKenneth D. MerryNote that the LINK RESET or HARD RESET commands should re-enable the phy. 940ee5320f4SKenneth D. Merry.It clearerrlog 94106e79492SKenneth D. MerrySend the CLEAR ERROR LOG command. 94206e79492SKenneth D. MerryThis clears the error log counters for the specified phy. 94306e79492SKenneth D. Merry.It clearaffiliation 94406e79492SKenneth D. MerrySend the CLEAR AFFILIATION command. 94506e79492SKenneth D. MerryThis clears the affiliation from the STP initiator port with the same SAS 94606e79492SKenneth D. Merryaddress as the SMP initiator that requests the clear operation. 94706e79492SKenneth D. Merry.It sataportsel 94806e79492SKenneth D. MerrySend the TRANSMIT SATA PORT SELECTION SIGNAL command to the phy. 94906e79492SKenneth D. MerryThis will cause a SATA port selector to use the given phy as its active phy 95006e79492SKenneth D. Merryand make the other phy inactive. 95106e79492SKenneth D. Merry.It clearitnl 95206e79492SKenneth D. MerrySend the CLEAR STP I_T NEXUS LOSS command to the PHY. 95306e79492SKenneth D. Merry.It setdevname 95406e79492SKenneth D. MerrySend the SET ATTACHED DEVICE NAME command to the PHY. 95506e79492SKenneth D. MerryThis requires the 95606e79492SKenneth D. Merry.Fl d 95706e79492SKenneth D. Merryargument to specify the device name. 95806e79492SKenneth D. Merry.El 95906e79492SKenneth D. Merry.It Fl d Ar name 96006e79492SKenneth D. MerrySpecify the attached device name. 96106e79492SKenneth D. MerryThis option is needed with the 96206e79492SKenneth D. Merry.Fl o Ar setdevname 96306e79492SKenneth D. Merryphy operation. 96406e79492SKenneth D. MerryThe name is a 64-bit number, and can be specified in decimal, hexadecimal 96506e79492SKenneth D. Merryor octal format. 96606e79492SKenneth D. Merry.It Fl m Ar rate 96706e79492SKenneth D. MerrySet the minimum physical link rate for the phy. 96806e79492SKenneth D. MerryThis is a numeric argument. 96906e79492SKenneth D. MerryCurrently known link rates are: 97006e79492SKenneth D. Merry.Bl -tag -width 5n 97106e79492SKenneth D. Merry.It 0x0 97206e79492SKenneth D. MerryDo not change current value. 97306e79492SKenneth D. Merry.It 0x8 97406e79492SKenneth D. Merry1.5 Gbps 97506e79492SKenneth D. Merry.It 0x9 97606e79492SKenneth D. Merry3 Gbps 97706e79492SKenneth D. Merry.It 0xa 97806e79492SKenneth D. Merry6 Gbps 97906e79492SKenneth D. Merry.El 98006e79492SKenneth D. Merry.Pp 98106e79492SKenneth D. MerryOther values may be specified for newer physical link rates. 98206e79492SKenneth D. Merry.It Fl M Ar rate 98306e79492SKenneth D. MerrySet the maximum physical link rate for the phy. 98406e79492SKenneth D. MerryThis is a numeric argument. 98506e79492SKenneth D. MerrySee the 98606e79492SKenneth D. Merry.Fl m 98706e79492SKenneth D. Merryargument description for known link rate arguments. 98806e79492SKenneth D. Merry.It Fl T Ar pp_timeout 98906e79492SKenneth D. MerrySet the partial pathway timeout value, in microseconds. 99006e79492SKenneth D. MerrySee the 99106e79492SKenneth D. Merry.Tn ANSI 99206e79492SKenneth D. Merry.Tn SAS 99319769ec2SJoel DahlProtocol Layer (SPL) 99406e79492SKenneth D. Merryspecification for more information on this field. 99506e79492SKenneth D. Merry.It Fl a Ar enable|disable 99606e79492SKenneth D. MerryEnable or disable SATA slumber phy power conditions. 99706e79492SKenneth D. Merry.It Fl A Ar enable|disable 99806e79492SKenneth D. MerryEnable or disable SATA partial power conditions. 99906e79492SKenneth D. Merry.It Fl s Ar enable|disable 100006e79492SKenneth D. MerryEnable or disable SAS slumber phy power conditions. 100106e79492SKenneth D. Merry.It Fl S Ar enable|disable 100206e79492SKenneth D. MerryEnable or disable SAS partial phy power conditions. 100306e79492SKenneth D. Merry.El 100406e79492SKenneth D. Merry.It Ic smpphylist 100506e79492SKenneth D. MerryList phys attached to a SAS expander, the address of the end device 100606e79492SKenneth D. Merryattached to the phy, and the inquiry data for that device and peripheral 100706e79492SKenneth D. Merrydevices attached to that device. 100806e79492SKenneth D. MerryThe inquiry data and peripheral devices are displayed if available. 100906e79492SKenneth D. Merry.Bl -tag -width 5n 101006e79492SKenneth D. Merry.It Fl l 101106e79492SKenneth D. MerryTurn on the long response format for the underlying SMP commands used for 101206e79492SKenneth D. Merrythis command. 101306e79492SKenneth D. Merry.It Fl q 101406e79492SKenneth D. MerryOnly print out phys that are attached to a device in the CAM EDT (Existing 101506e79492SKenneth D. MerryDevice Table). 101606e79492SKenneth D. Merry.El 101706e79492SKenneth D. Merry.It Ic smpmaninfo 101806e79492SKenneth D. MerrySend the SMP Report Manufacturer Information command to the device and 101906e79492SKenneth D. Merrydisplay the response. 102006e79492SKenneth D. Merry.Bl -tag -width 5n 102106e79492SKenneth D. Merry.It Fl l 102206e79492SKenneth D. MerryTurn on the long response format for the underlying SMP commands used for 102306e79492SKenneth D. Merrythis command. 102406e79492SKenneth D. Merry.El 102533fab22eSKenneth D. Merry.It Ic debug 10269806e231SRuslan ErmilovTurn on CAM debugging printfs in the kernel. 10279806e231SRuslan ErmilovThis requires options CAMDEBUG 10289806e231SRuslan Ermilovin your kernel config file. 10299806e231SRuslan ErmilovWARNING: enabling debugging printfs currently 10309806e231SRuslan Ermilovcauses an EXTREME number of kernel printfs. 10319806e231SRuslan ErmilovYou may have difficulty 1032525689f1SJustin T. Gibbsturning off the debugging printfs once they start, since the kernel will be 1033525689f1SJustin T. Gibbsbusy printing messages and unable to service other requests quickly. 103433fab22eSKenneth D. MerryThe 103533fab22eSKenneth D. Merry.Ic debug 103633fab22eSKenneth D. Merryfunction takes a number of arguments: 10371252c1bbSRuslan Ermilov.Bl -tag -width 18n 1038525689f1SJustin T. Gibbs.It Fl I 1039525689f1SJustin T. GibbsEnable CAM_DEBUG_INFO printfs. 1040a7e5261eSNate Lawson.It Fl P 1041a7e5261eSNate LawsonEnable CAM_DEBUG_PERIPH printfs. 1042525689f1SJustin T. Gibbs.It Fl T 1043525689f1SJustin T. GibbsEnable CAM_DEBUG_TRACE printfs. 1044525689f1SJustin T. Gibbs.It Fl S 1045525689f1SJustin T. GibbsEnable CAM_DEBUG_SUBTRACE printfs. 1046a7e5261eSNate Lawson.It Fl X 1047a7e5261eSNate LawsonEnable CAM_DEBUG_XPT printfs. 1048d05caa00SKenneth D. Merry.It Fl c 10499806e231SRuslan ErmilovEnable CAM_DEBUG_CDB printfs. 10509806e231SRuslan ErmilovThis will cause the kernel to print out the 1051d05caa00SKenneth D. MerrySCSI CDBs sent to the specified device(s). 1052fbfb753fSAlexander Motin.It Fl p 1053fbfb753fSAlexander MotinEnable CAM_DEBUG_PROBE printfs. 1054525689f1SJustin T. Gibbs.It all 1055525689f1SJustin T. GibbsEnable debugging for all devices. 1056525689f1SJustin T. Gibbs.It off 1057525689f1SJustin T. GibbsTurn off debugging for all devices 1058525689f1SJustin T. Gibbs.It bus Ns Op :target Ns Op :lun 10599806e231SRuslan ErmilovTurn on debugging for the given bus, target or lun. 10609806e231SRuslan ErmilovIf the lun or target 10619806e231SRuslan Ermilovand lun are not specified, they are wildcarded. 10629806e231SRuslan Ermilov(i.e., just specifying a 1063525689f1SJustin T. Gibbsbus turns on debugging printfs for all devices on that bus.) 1064525689f1SJustin T. Gibbs.El 106533fab22eSKenneth D. Merry.It Ic tags 10669deea857SKenneth D. MerryShow or set the number of "tagged openings" or simultaneous transactions 10679806e231SRuslan Ermilovwe attempt to queue to a particular device. 10689806e231SRuslan ErmilovBy default, the 106933fab22eSKenneth D. Merry.Ic tags 10709806e231SRuslan Ermilovcommand, with no command-specific arguments (i.e., only generic arguments) 10719deea857SKenneth D. Merryprints out the "soft" maximum number of transactions that can be queued to 10729806e231SRuslan Ermilovthe device in question. 10739806e231SRuslan ErmilovFor more detailed information, use the 10749deea857SKenneth D. Merry.Fl v 10759deea857SKenneth D. Merryargument described below. 10761252c1bbSRuslan Ermilov.Bl -tag -width 7n 10779deea857SKenneth D. Merry.It Fl N Ar tags 10789806e231SRuslan ErmilovSet the number of tags for the given device. 10799806e231SRuslan ErmilovThis must be between the 10809806e231SRuslan Ermilovminimum and maximum number set in the kernel quirk table. 10819806e231SRuslan ErmilovThe default for 10829deea857SKenneth D. Merrymost devices that support tagged queueing is a minimum of 2 and a maximum 10839806e231SRuslan Ermilovof 255. 10849806e231SRuslan ErmilovThe minimum and maximum values for a given device may be 10859deea857SKenneth D. Merrydetermined by using the 10869deea857SKenneth D. Merry.Fl v 10879806e231SRuslan Ermilovswitch. 10889806e231SRuslan ErmilovThe meaning of the 10899deea857SKenneth D. Merry.Fl v 10909deea857SKenneth D. Merryswitch for this 10917c7fb079SRuslan Ermilov.Nm 10929deea857SKenneth D. Merrysubcommand is described below. 10939deea857SKenneth D. Merry.It Fl q 10940227791bSRuslan ErmilovBe quiet, and do not report the number of tags. 10959806e231SRuslan ErmilovThis is generally used when 10969deea857SKenneth D. Merrysetting the number of tags. 10979deea857SKenneth D. Merry.It Fl v 10989deea857SKenneth D. MerryThe verbose flag has special functionality for the 10999deea857SKenneth D. Merry.Em tags 11009806e231SRuslan Ermilovargument. 11019806e231SRuslan ErmilovIt causes 11027c7fb079SRuslan Ermilov.Nm 11039deea857SKenneth D. Merryto print out the tagged queueing related fields of the XPT_GDEV_TYPE CCB: 11041252c1bbSRuslan Ermilov.Bl -tag -width 13n 11059deea857SKenneth D. Merry.It dev_openings 11069deea857SKenneth D. MerryThis is the amount of capacity for transactions queued to a given device. 11079deea857SKenneth D. Merry.It dev_active 11089deea857SKenneth D. MerryThis is the number of transactions currently queued to a device. 1109d4cf7dc0SFelix Johnson.It allocated 1110d4cf7dc0SFelix JohnsonThis is the number of CCBs allocated for the device. 11119deea857SKenneth D. Merry.It held 11129deea857SKenneth D. MerryThe held count is the number of CCBs held by peripheral drivers that have 11139deea857SKenneth D. Merryeither just been completed or are about to be released to the transport 11149806e231SRuslan Ermilovlayer for service by a device. 11159806e231SRuslan ErmilovHeld CCBs reserve capacity on a given 11169deea857SKenneth D. Merrydevice. 11179deea857SKenneth D. Merry.It mintags 11189deea857SKenneth D. MerryThis is the current "hard" minimum number of transactions that can be 11199806e231SRuslan Ermilovqueued to a device at once. 11209806e231SRuslan ErmilovThe 11219deea857SKenneth D. Merry.Ar dev_openings 11229806e231SRuslan Ermilovvalue above cannot go below this number. 11239806e231SRuslan ErmilovThe default value for 11249deea857SKenneth D. Merry.Ar mintags 11259deea857SKenneth D. Merryis 2, although it may be set higher or lower for various devices. 11269deea857SKenneth D. Merry.It maxtags 11279deea857SKenneth D. MerryThis is the "hard" maximum number of transactions that can be queued to a 11289806e231SRuslan Ermilovdevice at one time. 11299806e231SRuslan ErmilovThe 11309deea857SKenneth D. Merry.Ar dev_openings 11319806e231SRuslan Ermilovvalue cannot go above this number. 11329806e231SRuslan ErmilovThe default value for 11339deea857SKenneth D. Merry.Ar maxtags 11349deea857SKenneth D. Merryis 255, although it may be set higher or lower for various devices. 11359deea857SKenneth D. Merry.El 11369deea857SKenneth D. Merry.El 113733fab22eSKenneth D. Merry.It Ic negotiate 11389806e231SRuslan ErmilovShow or negotiate various communication parameters. 11399806e231SRuslan ErmilovSome controllers may 11409806e231SRuslan Ermilovnot support setting or changing some of these values. 11419806e231SRuslan ErmilovFor instance, the 11429deea857SKenneth D. MerryAdaptec 174x controllers do not support changing a device's sync rate or 11439deea857SKenneth D. Merryoffset. 1144e1205e80SPhilippe CharnierThe 11457c7fb079SRuslan Ermilov.Nm 1146e1205e80SPhilippe Charnierutility 11479deea857SKenneth D. Merrywill not attempt to set the parameter if the controller indicates that it 11489806e231SRuslan Ermilovdoes not support setting the parameter. 11499806e231SRuslan ErmilovTo find out what the controller 11509deea857SKenneth D. Merrysupports, use the 11519deea857SKenneth D. Merry.Fl v 11529806e231SRuslan Ermilovflag. 11539806e231SRuslan ErmilovThe meaning of the 11549deea857SKenneth D. Merry.Fl v 11559deea857SKenneth D. Merryflag for the 115633fab22eSKenneth D. Merry.Ic negotiate 11579806e231SRuslan Ermilovcommand is described below. 11580227791bSRuslan ErmilovAlso, some controller drivers do not support 11599deea857SKenneth D. Merrysetting negotiation parameters, even if the underlying controller supports 11609806e231SRuslan Ermilovnegotiation changes. 11619806e231SRuslan ErmilovSome controllers, such as the Advansys wide 11629deea857SKenneth D. Merrycontrollers, support enabling and disabling synchronous negotiation for 11639deea857SKenneth D. Merrya device, but do not support setting the synchronous negotiation rate. 11641252c1bbSRuslan Ermilov.Bl -tag -width 17n 11659deea857SKenneth D. Merry.It Fl a 11669deea857SKenneth D. MerryAttempt to make the negotiation settings take effect immediately by sending 11679deea857SKenneth D. Merrya Test Unit Ready command to the device. 11689deea857SKenneth D. Merry.It Fl c 11699806e231SRuslan ErmilovShow or set current negotiation settings. 11709806e231SRuslan ErmilovThis is the default. 11719deea857SKenneth D. Merry.It Fl D Ar enable|disable 11729deea857SKenneth D. MerryEnable or disable disconnection. 1173b447e682SAlexander Motin.It Fl M Ar mode 1174b447e682SAlexander MotinSet ATA mode. 11759deea857SKenneth D. Merry.It Fl O Ar offset 11769deea857SKenneth D. MerrySet the command delay offset. 11779deea857SKenneth D. Merry.It Fl q 11780227791bSRuslan ErmilovBe quiet, do not print anything. 11799806e231SRuslan ErmilovThis is generally useful when you want to 11800227791bSRuslan Ermilovset a parameter, but do not want any status information. 11819deea857SKenneth D. Merry.It Fl R Ar syncrate 11829806e231SRuslan ErmilovChange the synchronization rate for a device. 11839806e231SRuslan ErmilovThe sync rate is a floating 11849806e231SRuslan Ermilovpoint value specified in MHz. 11859806e231SRuslan ErmilovSo, for instance, 11869deea857SKenneth D. Merry.Sq 20.000 11879deea857SKenneth D. Merryis a legal value, as is 11889deea857SKenneth D. Merry.Sq 20 . 11899deea857SKenneth D. Merry.It Fl T Ar enable|disable 11909deea857SKenneth D. MerryEnable or disable tagged queueing for a device. 11919deea857SKenneth D. Merry.It Fl U 11929806e231SRuslan ErmilovShow or set user negotiation settings. 11939806e231SRuslan ErmilovThe default is to show or set 11949deea857SKenneth D. Merrycurrent negotiation settings. 11959deea857SKenneth D. Merry.It Fl v 11969deea857SKenneth D. MerryThe verbose switch has special meaning for the 119733fab22eSKenneth D. Merry.Ic negotiate 11989806e231SRuslan Ermilovsubcommand. 11999806e231SRuslan ErmilovIt causes 12007c7fb079SRuslan Ermilov.Nm 12019deea857SKenneth D. Merryto print out the contents of a Path Inquiry (XPT_PATH_INQ) CCB sent to the 12029deea857SKenneth D. Merrycontroller driver. 12039deea857SKenneth D. Merry.It Fl W Ar bus_width 12049806e231SRuslan ErmilovSpecify the bus width to negotiate with a device. 12059806e231SRuslan ErmilovThe bus width is 12069806e231SRuslan Ermilovspecified in bits. 12079806e231SRuslan ErmilovThe only useful values to specify are 8, 16, and 32 12089806e231SRuslan Ermilovbits. 12099806e231SRuslan ErmilovThe controller must support the bus width in question in order for 12109deea857SKenneth D. Merrythe setting to take effect. 12119deea857SKenneth D. Merry.El 12129deea857SKenneth D. Merry.Pp 12139deea857SKenneth D. MerryIn general, sync rate and offset settings will not take effect for a 12149806e231SRuslan Ermilovdevice until a command has been sent to the device. 12159806e231SRuslan ErmilovThe 12169deea857SKenneth D. Merry.Fl a 12179deea857SKenneth D. Merryswitch above will automatically send a Test Unit Ready to the device so 12189deea857SKenneth D. Merrynegotiation parameters will take effect. 121933fab22eSKenneth D. Merry.It Ic format 122096a93c63SKenneth D. MerryIssue the 122196a93c63SKenneth D. Merry.Tn SCSI 122296a93c63SKenneth D. MerryFORMAT UNIT command to the named device. 122396a93c63SKenneth D. Merry.Pp 122496a93c63SKenneth D. Merry.Em WARNING! WARNING! WARNING! 122596a93c63SKenneth D. Merry.Pp 12269806e231SRuslan ErmilovLow level formatting a disk will destroy ALL data on the disk. 12279806e231SRuslan ErmilovUse 12289806e231SRuslan Ermilovextreme caution when issuing this command. 12299806e231SRuslan ErmilovMany users low-level format 12309806e231SRuslan Ermilovdisks that do not really need to be low-level formatted. 12319806e231SRuslan ErmilovThere are 123296a93c63SKenneth D. Merryrelatively few scenarios that call for low-level formatting a disk. 123396a93c63SKenneth D. MerryOne reason for 123496a93c63SKenneth D. Merrylow-level formatting a disk is to initialize the disk after changing 12359806e231SRuslan Ermilovits physical sector size. 12369806e231SRuslan ErmilovAnother reason for low-level formatting a disk 123796a93c63SKenneth D. Merryis to revive the disk if you are getting "medium format corrupted" errors 123896a93c63SKenneth D. Merryfrom the disk in response to read and write requests. 123996a93c63SKenneth D. Merry.Pp 12409806e231SRuslan ErmilovSome disks take longer than others to format. 12419806e231SRuslan ErmilovUsers should specify a 12429806e231SRuslan Ermilovtimeout long enough to allow the format to complete. 12439806e231SRuslan ErmilovThe default format 12449806e231SRuslan Ermilovtimeout is 3 hours, which should be long enough for most disks. 12459806e231SRuslan ErmilovSome hard 124696a93c63SKenneth D. Merrydisks will complete a format operation in a very short period of time 12479806e231SRuslan Ermilov(on the order of 5 minutes or less). 12489806e231SRuslan ErmilovThis is often because the drive 12490227791bSRuslan Ermilovdoes not really support the FORMAT UNIT command -- it just accepts the 125096a93c63SKenneth D. Merrycommand, waits a few minutes and then returns it. 125196a93c63SKenneth D. Merry.Pp 125296a93c63SKenneth D. MerryThe 125396a93c63SKenneth D. Merry.Sq format 12549806e231SRuslan Ermilovsubcommand takes several arguments that modify its default behavior. 12559806e231SRuslan ErmilovThe 125696a93c63SKenneth D. Merry.Fl q 125796a93c63SKenneth D. Merryand 125896a93c63SKenneth D. Merry.Fl y 125996a93c63SKenneth D. Merryarguments can be useful for scripts. 12601252c1bbSRuslan Ermilov.Bl -tag -width 6n 126196a93c63SKenneth D. Merry.It Fl q 12620227791bSRuslan ErmilovBe quiet, do not print any status messages. 12639806e231SRuslan ErmilovThis option will not disable 12649806e231SRuslan Ermilovthe questions, however. 12659806e231SRuslan ErmilovTo disable questions, use the 126696a93c63SKenneth D. Merry.Fl y 126796a93c63SKenneth D. Merryargument, below. 1268e9e4d3e4SKenneth D. Merry.It Fl r 1269e9e4d3e4SKenneth D. MerryRun in 1270e9e4d3e4SKenneth D. Merry.Dq report only 1271e9e4d3e4SKenneth D. Merrymode. 1272e9e4d3e4SKenneth D. MerryThis will report status on a format that is already running on the drive. 127396a93c63SKenneth D. Merry.It Fl w 12749806e231SRuslan ErmilovIssue a non-immediate format command. 12759806e231SRuslan ErmilovBy default, 12767c7fb079SRuslan Ermilov.Nm 12779806e231SRuslan Ermilovissues the FORMAT UNIT command with the immediate bit set. 12789806e231SRuslan ErmilovThis tells the 127996a93c63SKenneth D. Merrydevice to immediately return the format command, before the format has 12809806e231SRuslan Ermilovactually completed. 12819806e231SRuslan ErmilovThen, 12827c7fb079SRuslan Ermilov.Nm 128396a93c63SKenneth D. Merrygathers 128496a93c63SKenneth D. Merry.Tn SCSI 128596a93c63SKenneth D. Merrysense information from the device every second to determine how far along 12869806e231SRuslan Ermilovin the format process it is. 12879806e231SRuslan ErmilovIf the 128896a93c63SKenneth D. Merry.Fl w 128996a93c63SKenneth D. Merryargument is specified, 12907c7fb079SRuslan Ermilov.Nm 129196a93c63SKenneth D. Merrywill issue a non-immediate format command, and will be unable to print any 129296a93c63SKenneth D. Merryinformation to let the user know what percentage of the disk has been 129396a93c63SKenneth D. Merryformatted. 129496a93c63SKenneth D. Merry.It Fl y 12950227791bSRuslan ErmilovDo not ask any questions. 12969806e231SRuslan ErmilovBy default, 12977c7fb079SRuslan Ermilov.Nm 129896a93c63SKenneth D. Merrywill ask the user if he/she really wants to format the disk in question, 12999806e231SRuslan Ermilovand also if the default format command timeout is acceptable. 13009806e231SRuslan ErmilovThe user 130196a93c63SKenneth D. Merrywill not be asked about the timeout if a timeout is specified on the 130296a93c63SKenneth D. Merrycommand line. 130396a93c63SKenneth D. Merry.El 1304ffead710SBryan Venteicher.It Ic sanitize 1305c15a591cSAlexander MotinIssue the SANITIZE command to the named device. 1306ffead710SBryan Venteicher.Pp 1307ffead710SBryan Venteicher.Em WARNING! WARNING! WARNING! 1308ffead710SBryan Venteicher.Pp 1309c15a591cSAlexander MotinALL data on the disk will be destroyed or made inaccessible. 1310ffead710SBryan VenteicherRecovery of the data is not possible. 1311ffead710SBryan VenteicherUse extreme caution when issuing this command. 1312ffead710SBryan Venteicher.Pp 1313ffead710SBryan VenteicherThe 1314ffead710SBryan Venteicher.Sq sanitize 1315ffead710SBryan Venteichersubcommand takes several arguments that modify its default behavior. 1316ffead710SBryan VenteicherThe 1317ffead710SBryan Venteicher.Fl q 1318ffead710SBryan Venteicherand 1319ffead710SBryan Venteicher.Fl y 1320ffead710SBryan Venteicherarguments can be useful for scripts. 1321ffead710SBryan Venteicher.Bl -tag -width 6n 1322ffead710SBryan Venteicher.It Fl a Ar operation 1323ffead710SBryan VenteicherSpecify the sanitize operation to perform. 1324ffead710SBryan Venteicher.Bl -tag -width 16n 1325ffead710SBryan Venteicher.It overwrite 1326ffead710SBryan VenteicherPerform an overwrite operation by writing a user supplied 1327ffead710SBryan Venteicherdata pattern to the device one or more times. 1328ffead710SBryan VenteicherThe pattern is given by the 1329ffead710SBryan Venteicher.Fl P 1330ffead710SBryan Venteicherargument. 1331ffead710SBryan VenteicherThe number of times is given by the 1332ffead710SBryan Venteicher.Fl c 1333ffead710SBryan Venteicherargument. 1334ffead710SBryan Venteicher.It block 1335ffead710SBryan VenteicherPerform a block erase operation. 1336ffead710SBryan VenteicherAll the device's blocks are set to a vendor defined 1337ffead710SBryan Venteichervalue, typically zero. 1338ffead710SBryan Venteicher.It crypto 1339ffead710SBryan VenteicherPerform a cryptographic erase operation. 1340ffead710SBryan VenteicherThe encryption keys are changed to prevent the decryption 1341ffead710SBryan Venteicherof the data. 1342ffead710SBryan Venteicher.It exitfailure 1343ffead710SBryan VenteicherExits a previously failed sanitize operation. 1344ffead710SBryan VenteicherA failed sanitize operation can only be exited if it was 1345ffead710SBryan Venteicherrun in the unrestricted completion mode, as provided by the 1346ffead710SBryan Venteicher.Fl U 1347ffead710SBryan Venteicherargument. 1348ffead710SBryan Venteicher.El 1349ffead710SBryan Venteicher.It Fl c Ar passes 1350ffead710SBryan VenteicherThe number of passes when performing an 1351ffead710SBryan Venteicher.Sq overwrite 1352ffead710SBryan Venteicheroperation. 13535bb17266SJoel DahlValid values are between 1 and 31. 13545bb17266SJoel DahlThe default is 1. 1355ffead710SBryan Venteicher.It Fl I 1356ffead710SBryan VenteicherWhen performing an 1357ffead710SBryan Venteicher.Sq overwrite 1358ffead710SBryan Venteicheroperation, the pattern is inverted between consecutive passes. 1359ffead710SBryan Venteicher.It Fl P Ar pattern 1360ffead710SBryan VenteicherPath to the file containing the pattern to use when 1361ffead710SBryan Venteicherperforming an 1362ffead710SBryan Venteicher.Sq overwrite 1363ffead710SBryan Venteicheroperation. 1364ffead710SBryan VenteicherThe pattern is repeated as needed to fill each block. 1365ffead710SBryan Venteicher.It Fl q 1366ffead710SBryan VenteicherBe quiet, do not print any status messages. 1367ffead710SBryan VenteicherThis option will not disable 1368ffead710SBryan Venteicherthe questions, however. 1369ffead710SBryan VenteicherTo disable questions, use the 1370ffead710SBryan Venteicher.Fl y 1371ffead710SBryan Venteicherargument, below. 1372ffead710SBryan Venteicher.It Fl U 1373ffead710SBryan VenteicherPerform the sanitize in the unrestricted completion mode. 1374ffead710SBryan VenteicherIf the operation fails, it can later be exited with the 1375ffead710SBryan Venteicher.Sq exitfailure 1376ffead710SBryan Venteicheroperation. 1377ffead710SBryan Venteicher.It Fl r 1378ffead710SBryan VenteicherRun in 1379ffead710SBryan Venteicher.Dq report only 1380ffead710SBryan Venteichermode. 1381ffead710SBryan VenteicherThis will report status on a sanitize that is already running on the drive. 1382ffead710SBryan Venteicher.It Fl w 1383ffead710SBryan VenteicherIssue a non-immediate sanitize command. 1384ffead710SBryan VenteicherBy default, 1385ffead710SBryan Venteicher.Nm 1386ffead710SBryan Venteicherissues the SANITIZE command with the immediate bit set. 1387ffead710SBryan VenteicherThis tells the 1388ffead710SBryan Venteicherdevice to immediately return the sanitize command, before 1389ffead710SBryan Venteicherthe sanitize has actually completed. 1390ffead710SBryan VenteicherThen, 1391ffead710SBryan Venteicher.Nm 1392ffead710SBryan Venteichergathers 1393ffead710SBryan Venteicher.Tn SCSI 1394ffead710SBryan Venteichersense information from the device every second to determine how far along 1395ffead710SBryan Venteicherin the sanitize process it is. 1396ffead710SBryan VenteicherIf the 1397ffead710SBryan Venteicher.Fl w 1398ffead710SBryan Venteicherargument is specified, 1399ffead710SBryan Venteicher.Nm 1400ffead710SBryan Venteicherwill issue a non-immediate sanitize command, and will be unable to print any 1401ffead710SBryan Venteicherinformation to let the user know what percentage of the disk has been 1402ffead710SBryan Venteichersanitized. 1403ffead710SBryan Venteicher.It Fl y 1404ffead710SBryan VenteicherDo not ask any questions. 1405ffead710SBryan VenteicherBy default, 1406ffead710SBryan Venteicher.Nm 1407ffead710SBryan Venteicherwill ask the user if he/she really wants to sanitize the disk in question, 1408ffead710SBryan Venteicherand also if the default sanitize command timeout is acceptable. 1409ffead710SBryan VenteicherThe user 1410ffead710SBryan Venteicherwill not be asked about the timeout if a timeout is specified on the 1411ffead710SBryan Venteichercommand line. 1412ffead710SBryan Venteicher.El 141350c9a276SAlexander Motin.It Ic idle 14145bb17266SJoel DahlPut ATA device into IDLE state. 14155bb17266SJoel DahlOptional parameter 141672166fbaSAlexander Motin.Pq Fl t 14175bb17266SJoel Dahlspecifies automatic standby timer value in seconds. 14185bb17266SJoel DahlValue 0 disables timer. 141950c9a276SAlexander Motin.It Ic standby 14205bb17266SJoel DahlPut ATA device into STANDBY state. 14215bb17266SJoel DahlOptional parameter 142272166fbaSAlexander Motin.Pq Fl t 14235bb17266SJoel Dahlspecifies automatic standby timer value in seconds. 14245bb17266SJoel DahlValue 0 disables timer. 142550c9a276SAlexander Motin.It Ic sleep 14265bb17266SJoel DahlPut ATA device into SLEEP state. 14275bb17266SJoel DahlNote that the only way get device out of 142850c9a276SAlexander Motinthis state may be reset. 14293bed0179SSteven Hartland.It Ic powermode 14303bed0179SSteven HartlandReport ATA device power mode. 1431e7affda5SAlexander Motin.It Ic apm 1432e7affda5SAlexander MotinIt optional parameter 1433e7affda5SAlexander Motin.Pq Fl l 1434e7affda5SAlexander Motinspecified, enables and sets advanced power management level, where 1435e7affda5SAlexander Motin1 -- minimum power, 127 -- maximum performance with standby, 1436e7affda5SAlexander Motin128 -- minimum power without standby, 254 -- maximum performance. 1437e7affda5SAlexander MotinIf not specified -- APM is disabled. 1438e7affda5SAlexander Motin.It Ic aam 1439e7affda5SAlexander MotinIt optional parameter 1440e7affda5SAlexander Motin.Pq Fl l 1441e7affda5SAlexander Motinspecified, enables and sets automatic acoustic management level, where 1442e7affda5SAlexander Motin1 -- minimum noise, 254 -- maximum performance. 1443e7affda5SAlexander MotinIf not specified -- AAM is disabled. 14441146874aSSteven Hartland.It Ic security 14451146874aSSteven HartlandUpdate or report security settings, using an ATA identify command (0xec). 14461146874aSSteven HartlandBy default, 14471146874aSSteven Hartland.Nm 14481146874aSSteven Hartlandwill print out the security support and associated settings of the device. 14491146874aSSteven HartlandThe 14501146874aSSteven Hartland.Ic security 14511146874aSSteven Hartlandcommand takes several arguments: 14521146874aSSteven Hartland.Bl -tag -width 0n 14531146874aSSteven Hartland.It Fl d Ar pwd 14541146874aSSteven Hartland.Pp 14551146874aSSteven HartlandDisable device security using the given password for the selected user according 14561146874aSSteven Hartlandto the devices configured security level. 14571146874aSSteven Hartland.It Fl e Ar pwd 14581146874aSSteven Hartland.Pp 14591146874aSSteven HartlandErase the device using the given password for the selected user. 14601146874aSSteven Hartland.Pp 14611146874aSSteven Hartland.Em WARNING! WARNING! WARNING! 14621146874aSSteven Hartland.Pp 14631146874aSSteven HartlandIssuing a secure erase will 14641146874aSSteven Hartland.Em ERASE ALL 14651146874aSSteven Hartlanduser data on the device and may take several hours to complete. 14661146874aSSteven Hartland.Pp 14671146874aSSteven HartlandWhen this command is used against an SSD drive all its cells will be marked as 14685bb17266SJoel Dahlempty, restoring it to factory default write performance. 14695bb17266SJoel DahlFor SSD's this action 14701146874aSSteven Hartlandusually takes just a few seconds. 14711146874aSSteven Hartland.It Fl f 14721146874aSSteven Hartland.Pp 14731146874aSSteven HartlandFreeze the security configuration of the specified device. 14741146874aSSteven Hartland.Pp 14751146874aSSteven HartlandAfter command completion any other commands that update the device lock mode 1476e36a4a7eSJoel Dahlshall be command aborted. 1477e36a4a7eSJoel DahlFrozen mode is disabled by power-off or hardware reset. 14781146874aSSteven Hartland.It Fl h Ar pwd 14791146874aSSteven Hartland.Pp 14801146874aSSteven HartlandEnhanced erase the device using the given password for the selected user. 14811146874aSSteven Hartland.Pp 14821146874aSSteven Hartland.Em WARNING! WARNING! WARNING! 14831146874aSSteven Hartland.Pp 14841146874aSSteven HartlandIssuing an enhanced secure erase will 14851146874aSSteven Hartland.Em ERASE ALL 14861146874aSSteven Hartlanduser data on the device and may take several hours to complete. 14871146874aSSteven Hartland.Pp 14881146874aSSteven HartlandAn enhanced erase writes predetermined data patterns to all user data areas, 14891146874aSSteven Hartlandall previously written user data shall be overwritten, including sectors that 14901146874aSSteven Hartlandare no longer in use due to reallocation. 14911146874aSSteven Hartland.It Fl k Ar pwd 14921146874aSSteven Hartland.Pp 14931146874aSSteven HartlandUnlock the device using the given password for the selected user according to 14941146874aSSteven Hartlandthe devices configured security level. 14951146874aSSteven Hartland.It Fl l Ar high|maximum 14961146874aSSteven Hartland.Pp 14971146874aSSteven HartlandSpecifies which security level to set when issuing a 14981146874aSSteven Hartland.Fl s Ar pwd 14995bb17266SJoel Dahlcommand. 15005bb17266SJoel DahlThe security level determines device behavior when the master 15015bb17266SJoel Dahlpassword is used to unlock the device. 15025bb17266SJoel DahlWhen the security level is set to high 15031146874aSSteven Hartlandthe device requires the unlock command and the master password to unlock. 15041146874aSSteven HartlandWhen the security level is set to maximum the device requires a secure erase 15051146874aSSteven Hartlandwith the master password to unlock. 15061146874aSSteven Hartland.Pp 15071146874aSSteven HartlandThis option must be used in conjunction with one of the security action commands. 15081146874aSSteven Hartland.Pp 15091146874aSSteven HartlandDefaults to 15101146874aSSteven Hartland.Em high 15111146874aSSteven Hartland.It Fl q 15121146874aSSteven Hartland.Pp 15131146874aSSteven HartlandBe quiet, do not print any status messages. 15141146874aSSteven HartlandThis option will not disable the questions, however. 15151146874aSSteven HartlandTo disable questions, use the 15161146874aSSteven Hartland.Fl y 15171146874aSSteven Hartlandargument, below. 15181146874aSSteven Hartland.It Fl s Ar pwd 15191146874aSSteven Hartland.Pp 15201146874aSSteven HartlandPassword the device (enable security) using the given password for the selected 15215bb17266SJoel Dahluser. 15225bb17266SJoel DahlThis option can be combined with other options such as 15231146874aSSteven Hartland.Fl e Em pwd 15241146874aSSteven Hartland.Pp 152564440392SGordon BerglingA master password may be set in a addition to the user password. 152664440392SGordon BerglingThe purpose of the master password is to allow an administrator to establish 152764440392SGordon Berglinga password that is kept secret from the user, and which may be used to unlock 152864440392SGordon Berglingthe device if the user password is lost. 15291146874aSSteven Hartland.Pp 15301146874aSSteven Hartland.Em Note: 15311146874aSSteven HartlandSetting the master password does not enable device security. 15321146874aSSteven Hartland.Pp 15331146874aSSteven HartlandIf the master password is set and the drive supports a Master Revision Code 15341146874aSSteven Hartlandfeature the Master Password Revision Code will be decremented. 15351146874aSSteven Hartland.It Fl T Ar timeout 15361146874aSSteven Hartland.Pp 15371146874aSSteven HartlandOverrides the default timeout, specified in seconds, used for both 15381146874aSSteven Hartland.Fl e 15391146874aSSteven Hartlandand 15401146874aSSteven Hartland.Fl h 15411146874aSSteven Hartlandthis is useful if your system has problems processing long timeouts correctly. 15421146874aSSteven Hartland.Pp 15431146874aSSteven HartlandUsually the timeout is calculated from the information stored on the drive if 15441146874aSSteven Hartlandpresent, otherwise it defaults to 2 hours. 15451146874aSSteven Hartland.It Fl U Ar user|master 15461146874aSSteven Hartland.Pp 15471146874aSSteven HartlandSpecifies which user to set / use for the running action command, valid values 15481146874aSSteven Hartlandare user or master and defaults to master if not set. 15491146874aSSteven Hartland.Pp 15501146874aSSteven HartlandThis option must be used in conjunction with one of the security action commands. 15511146874aSSteven Hartland.Pp 15521146874aSSteven HartlandDefaults to 15531146874aSSteven Hartland.Em master 15541146874aSSteven Hartland.It Fl y 15551146874aSSteven Hartland.Pp 15561146874aSSteven HartlandConfirm yes to dangerous options such as 15571146874aSSteven Hartland.Fl e 15581146874aSSteven Hartlandwithout prompting for confirmation. 15591146874aSSteven Hartland.El 1560f636caf1SJoel Dahl.Pp 15615bb17266SJoel DahlIf the password specified for any action commands does not match the configured 15621146874aSSteven Hartlandpassword for the specified user the command will fail. 15631146874aSSteven Hartland.Pp 15641146874aSSteven HartlandThe password in all cases is limited to 32 characters, longer passwords will 15651146874aSSteven Hartlandfail. 15669e68761cSSteven Hartland.It Ic hpa 15679e68761cSSteven HartlandUpdate or report Host Protected Area details. 15689e68761cSSteven HartlandBy default 15699e68761cSSteven Hartland.Nm 15709e68761cSSteven Hartlandwill print out the HPA support and associated settings of the device. 15719e68761cSSteven HartlandThe 15729e68761cSSteven Hartland.Ic hpa 15739e68761cSSteven Hartlandcommand takes several optional arguments: 15749e68761cSSteven Hartland.Bl -tag -width 0n 15759e68761cSSteven Hartland.It Fl f 15769e68761cSSteven Hartland.Pp 15779e68761cSSteven HartlandFreeze the HPA configuration of the specified device. 15789e68761cSSteven Hartland.Pp 15799e68761cSSteven HartlandAfter command completion any other commands that update the HPA configuration 15809e68761cSSteven Hartlandshall be command aborted. 15819e68761cSSteven HartlandFrozen mode is disabled by power-off or hardware reset. 15829e68761cSSteven Hartland.It Fl l 15839e68761cSSteven Hartland.Pp 15849e68761cSSteven HartlandLock the HPA configuration of the device until a successful call to unlock or 15859e68761cSSteven Hartlandthe next power-on reset occurs. 15869e68761cSSteven Hartland.It Fl P 15879e68761cSSteven Hartland.Pp 15889e68761cSSteven HartlandMake the HPA max sectors persist across power-on reset or a hardware reset. 15899e68761cSSteven HartlandThis must be used in combination with 15909e68761cSSteven Hartland.Fl s Ar max_sectors 15919e68761cSSteven Hartland. 15929e68761cSSteven Hartland.It Fl p Ar pwd 15939e68761cSSteven Hartland.Pp 15949e68761cSSteven HartlandSet the HPA configuration password required for unlock calls. 15959e68761cSSteven Hartland.It Fl q 15969e68761cSSteven Hartland.Pp 15979e68761cSSteven HartlandBe quiet, do not print any status messages. 15989e68761cSSteven HartlandThis option will not disable the questions. 15999e68761cSSteven HartlandTo disable questions, use the 16009e68761cSSteven Hartland.Fl y 16019e68761cSSteven Hartlandargument, below. 16029e68761cSSteven Hartland.It Fl s Ar max_sectors 16039e68761cSSteven Hartland.Pp 16049e68761cSSteven HartlandConfigures the maximum user accessible sectors of the device. 16059e68761cSSteven HartlandThis will change the number of sectors the device reports. 16069e68761cSSteven Hartland.Pp 16079e68761cSSteven Hartland.Em WARNING! WARNING! WARNING! 16089e68761cSSteven Hartland.Pp 16099e68761cSSteven HartlandChanging the max sectors of a device using this option will make the data on 16109e68761cSSteven Hartlandthe device beyond the specified value inaccessible. 16119e68761cSSteven Hartland.Pp 16129e68761cSSteven HartlandOnly one successful 16139e68761cSSteven Hartland.Fl s Ar max_sectors 16149e68761cSSteven Hartlandcall can be made without a power-on reset or a hardware reset of the device. 16159e68761cSSteven Hartland.It Fl U Ar pwd 16169e68761cSSteven Hartland.Pp 16179e68761cSSteven HartlandUnlock the HPA configuration of the specified device using the given password. 16185bb17266SJoel DahlIf the password specified does not match the password configured via 16199e68761cSSteven Hartland.Fl p Ar pwd 16209e68761cSSteven Hartlandthe command will fail. 16219e68761cSSteven Hartland.Pp 16229e68761cSSteven HartlandAfter 5 failed unlock calls, due to password miss-match, the device will refuse 16239e68761cSSteven Hartlandadditional unlock calls until after a power-on reset. 16249e68761cSSteven Hartland.It Fl y 16259e68761cSSteven Hartland.Pp 16269e68761cSSteven HartlandConfirm yes to dangerous options such as 16279e68761cSSteven Hartland.Fl e 16289e68761cSSteven Hartlandwithout prompting for confirmation 16299e68761cSSteven Hartland.El 1630f636caf1SJoel Dahl.Pp 16319e68761cSSteven HartlandThe password for all HPA commands is limited to 32 characters, longer passwords 16329e68761cSSteven Hartlandwill fail. 163389b35a52SAlexander Motin.It Ic ama 163489b35a52SAlexander MotinUpdate or report Accessible Max Address Configuration. 163589b35a52SAlexander MotinBy default 163689b35a52SAlexander Motin.Nm 163789b35a52SAlexander Motinwill print out the Accessible Max Address Configuration support and associated 163889b35a52SAlexander Motinsettings of the device. 163989b35a52SAlexander MotinThe 164089b35a52SAlexander Motin.Ic ama 164189b35a52SAlexander Motincommand takes several optional arguments: 164289b35a52SAlexander Motin.Bl -tag -width 0n 164389b35a52SAlexander Motin.It Fl f 164489b35a52SAlexander Motin.Pp 164589b35a52SAlexander MotinFreeze the Accessible Max Address Configuration of the specified device. 164689b35a52SAlexander Motin.Pp 164789b35a52SAlexander MotinAfter command completion any other commands that update the configuration 164889b35a52SAlexander Motinshall be command aborted. 164989b35a52SAlexander MotinFrozen mode is disabled by power-off. 165089b35a52SAlexander Motin.It Fl q 165189b35a52SAlexander Motin.Pp 165289b35a52SAlexander MotinBe quiet, do not print any status messages. 165389b35a52SAlexander Motin.It Fl s Ar max_sectors 165489b35a52SAlexander Motin.Pp 165589b35a52SAlexander MotinConfigures the maximum user accessible sectors of the device. 165689b35a52SAlexander MotinThis will change the number of sectors the device reports. 165789b35a52SAlexander Motin.Pp 165889b35a52SAlexander Motin.Em WARNING! WARNING! WARNING! 165989b35a52SAlexander Motin.Pp 166089b35a52SAlexander MotinChanging the max sectors of a device using this option will make the data on 166189b35a52SAlexander Motinthe device beyond the specified value indeterminate. 166289b35a52SAlexander Motin.Pp 166389b35a52SAlexander MotinOnly one successful 166489b35a52SAlexander Motin.Fl s Ar max_sectors 166589b35a52SAlexander Motincall can be made without a power-on reset of the device. 166689b35a52SAlexander Motin.El 16671f4782a4SEd Maste.It Ic fwdownload 16680e358df0SKenneth D. MerryProgram firmware of the named 16690e358df0SKenneth D. Merry.Tn SCSI 16700e358df0SKenneth D. Merryor ATA device using the image file provided. 16711f4782a4SEd Maste.Pp 16720e358df0SKenneth D. MerryIf the device is a 16730e358df0SKenneth D. Merry.Tn SCSI 16740e358df0SKenneth D. Merrydevice and it provides a recommended timeout for the WRITE BUFFER command 16750e358df0SKenneth D. Merry(see the 16760e358df0SKenneth D. Merry.Nm 16770e358df0SKenneth D. Merryopcodes subcommand), that timeout will be used for the firmware download. 16780e358df0SKenneth D. MerryThe drive-recommended timeout value may be overridden on the command line 16790e358df0SKenneth D. Merrywith the 16800e358df0SKenneth D. Merry.Fl t 16810e358df0SKenneth D. Merryoption. 16820e358df0SKenneth D. Merry.Pp 16830e358df0SKenneth D. MerryCurrent list of supported vendors for SCSI/SAS drives: 16840e358df0SKenneth D. Merry.Bl -tag -width 10n 16850e358df0SKenneth D. Merry.It HGST 16860e358df0SKenneth D. MerryTested with 4TB SAS drives, model number HUS724040ALS640. 16870e358df0SKenneth D. Merry.It HITACHI 16880e358df0SKenneth D. Merry.It HP 16890e358df0SKenneth D. Merry.It IBM 16900e358df0SKenneth D. MerryTested with LTO-5 (ULTRIUM-HH5) and LTO-6 (ULTRIUM-HH6) tape drives. 16910e358df0SKenneth D. MerryThere is a separate table entry for hard drives, because the update method 16920e358df0SKenneth D. Merryfor hard drives is different than the method for tape drives. 16930e358df0SKenneth D. Merry.It PLEXTOR 16940e358df0SKenneth D. Merry.It QUALSTAR 16950e358df0SKenneth D. Merry.It QUANTUM 16960e358df0SKenneth D. Merry.It SAMSUNG 16970e358df0SKenneth D. MerryTested with SM1625 SSDs. 16980e358df0SKenneth D. Merry.It SEAGATE 16990e358df0SKenneth D. MerryTested with Constellation ES (ST32000444SS), ES.2 (ST33000651SS) and 17000e358df0SKenneth D. MerryES.3 (ST1000NM0023) drives. 17010e358df0SKenneth D. Merry.It SmrtStor 17020e358df0SKenneth D. MerryTested with 400GB Optimus SSDs (TXA2D20400GA6001). 1703cd95f18cSKenneth D. Merry.It TOSHIBA 1704cd95f18cSKenneth D. MerryTested with 22TB MG10SFA22TE SAS drives. 17051f4782a4SEd Maste.El 17061f4782a4SEd Maste.Pp 17071f4782a4SEd Maste.Em WARNING! WARNING! WARNING! 17081f4782a4SEd Maste.Pp 17091f4782a4SEd MasteLittle testing has been done to make sure that different device models from 17101f4782a4SEd Masteeach vendor work correctly with the fwdownload command. 17111f4782a4SEd MasteA vendor name appearing in the supported list means only that firmware of at 17121f4782a4SEd Masteleast one device type from that vendor has successfully been programmed with 17131f4782a4SEd Mastethe fwdownload command. 17141f4782a4SEd MasteExtra caution should be taken when using this command since there is no 17151f4782a4SEd Masteguarantee it will not break a device from the listed vendors. 17161f4782a4SEd MasteEnsure that you have a recent backup of the data on the device before 17171f4782a4SEd Masteperforming a firmware update. 17180e358df0SKenneth D. Merry.Pp 17190e358df0SKenneth D. MerryNote that unknown 17200e358df0SKenneth D. Merry.Tn SCSI 17210e358df0SKenneth D. Merryprotocol devices will not be programmed, since there is little chance of 17220e358df0SKenneth D. Merrythe firmware download succeeding. 17230e358df0SKenneth D. Merry.Pp 17240e358df0SKenneth D. Merry.Nm 17250e358df0SKenneth D. Merrywill currently attempt a firmware download to any 17260e358df0SKenneth D. Merry.Tn ATA 17270e358df0SKenneth D. Merryor 17280e358df0SKenneth D. Merry.Tn SATA 17290e358df0SKenneth D. Merrydevice, since the standard 17300e358df0SKenneth D. Merry.Tn ATA 17310e358df0SKenneth D. MerryDOWNLOAD MICROCODE command may work. 17320e358df0SKenneth D. MerryFirmware downloads to 17330e358df0SKenneth D. Merry.Tn ATA 17340e358df0SKenneth D. Merryand 17350e358df0SKenneth D. Merry.Tn SATA 17360e358df0SKenneth D. Merrydevices are supported for devices connected 17370e358df0SKenneth D. Merryto standard 17380e358df0SKenneth D. Merry.Tn ATA 17390e358df0SKenneth D. Merryand 17400e358df0SKenneth D. Merry.Tn SATA 17410e358df0SKenneth D. Merrycontrollers, and devices connected to SAS controllers 17420e358df0SKenneth D. Merrywith 17430e358df0SKenneth D. Merry.Tn SCSI 17440e358df0SKenneth D. Merryto 17450e358df0SKenneth D. Merry.Tn ATA 17460e358df0SKenneth D. Merrytranslation capability. 17470e358df0SKenneth D. MerryIn the latter case, 17480e358df0SKenneth D. Merry.Nm 17490e358df0SKenneth D. Merryuses the 17500e358df0SKenneth D. Merry.Tn SCSI 17510e358df0SKenneth D. Merry.Tn ATA 17520e358df0SKenneth D. MerryPASS-THROUGH command to send the 17530e358df0SKenneth D. Merry.Tn ATA 17540e358df0SKenneth D. MerryDOWNLOAD MICROCODE command to the drive. 17550e358df0SKenneth D. MerrySome 17560e358df0SKenneth D. Merry.Tn SCSI 17570e358df0SKenneth D. Merryto 17580e358df0SKenneth D. Merry.Tn ATA 17590e358df0SKenneth D. Merrytranslation implementations don't work fully when translating 17600e358df0SKenneth D. Merry.Tn SCSI 17610e358df0SKenneth D. MerryWRITE BUFFER commands to 17620e358df0SKenneth D. Merry.Tn ATA 17630e358df0SKenneth D. MerryDOWNLOAD MICROCODE commands, but do support 17640e358df0SKenneth D. Merry.Tn ATA 17650e358df0SKenneth D. Merrypassthrough well enough to do a firmware download. 17661f4782a4SEd Maste.Bl -tag -width 11n 17671f4782a4SEd Maste.It Fl f Ar fw_image 17681f4782a4SEd MastePath to the firmware image file to be downloaded to the specified device. 17690e358df0SKenneth D. Merry.It Fl q 17700e358df0SKenneth D. MerryDo not print informational messages, only print errors. 17710e358df0SKenneth D. MerryThis option should be used with the 17720e358df0SKenneth D. Merry.Fl y 17730e358df0SKenneth D. Merryoption to suppress all output. 17741f4782a4SEd Maste.It Fl s 17751f4782a4SEd MasteRun in simulation mode. 17760e358df0SKenneth D. MerryDevice checks are run and the confirmation dialog is shown, but no firmware 17770e358df0SKenneth D. Merrydownload will occur. 17781f4782a4SEd Maste.It Fl v 17790e358df0SKenneth D. MerryShow 17800e358df0SKenneth D. Merry.Tn SCSI 17810e358df0SKenneth D. Merryor 17820e358df0SKenneth D. Merry.Tn ATA 17830e358df0SKenneth D. Merryerrors in the event of a failure. 17840e358df0SKenneth D. Merry.Pp 17850e358df0SKenneth D. MerryIn simulation mode, print out the 17860e358df0SKenneth D. Merry.Tn SCSI 17870e358df0SKenneth D. MerryCDB 17880e358df0SKenneth D. Merryor 17890e358df0SKenneth D. Merry.Tn ATA 17900e358df0SKenneth D. Merryregister values that would be used for the firmware download command. 17910e358df0SKenneth D. Merry.It Fl y 17920e358df0SKenneth D. MerryDo not ask for confirmation. 17931f4782a4SEd Maste.El 179408df2e3eSKenneth D. Merry.It Ic persist 179508df2e3eSKenneth D. MerryPersistent reservation support. 179608df2e3eSKenneth D. MerryPersistent reservations are a way to reserve a particular 179708df2e3eSKenneth D. Merry.Tn SCSI 179808df2e3eSKenneth D. MerryLUN for use by one or more 179908df2e3eSKenneth D. Merry.Tn SCSI 180008df2e3eSKenneth D. Merryinitiators. 180108df2e3eSKenneth D. MerryIf the 180208df2e3eSKenneth D. Merry.Fl i 180308df2e3eSKenneth D. Merryoption is specified, 180408df2e3eSKenneth D. Merry.Nm 180508df2e3eSKenneth D. Merrywill issue the 180608df2e3eSKenneth D. Merry.Tn SCSI 180708df2e3eSKenneth D. MerryPERSISTENT RESERVE IN 180808df2e3eSKenneth D. Merrycommand using the requested service action. 180908df2e3eSKenneth D. MerryIf the 181008df2e3eSKenneth D. Merry.Fl o 181108df2e3eSKenneth D. Merryoption is specified, 181208df2e3eSKenneth D. Merry.Nm 181308df2e3eSKenneth D. Merrywill issue the 181408df2e3eSKenneth D. Merry.Tn SCSI 181508df2e3eSKenneth D. MerryPERSISTENT RESERVE OUT 181608df2e3eSKenneth D. Merrycommand using the requested service action. 181708df2e3eSKenneth D. MerryOne of those two options is required. 181808df2e3eSKenneth D. Merry.Pp 181908df2e3eSKenneth D. MerryPersistent reservations are complex, and fully explaining them is outside 182008df2e3eSKenneth D. Merrythe scope of this manual. 182108df2e3eSKenneth D. MerryPlease visit 1822c918f50fSWolfram Schneiderhttps://www.t10.org 182308df2e3eSKenneth D. Merryand download the latest SPC spec for a full explanation of persistent 182408df2e3eSKenneth D. Merryreservations. 182508df2e3eSKenneth D. Merry.Bl -tag -width 8n 182608df2e3eSKenneth D. Merry.It Fl i Ar mode 182708df2e3eSKenneth D. MerrySpecify the service action for the PERSISTENT RESERVE IN command. 182808df2e3eSKenneth D. MerrySupported service actions: 182908df2e3eSKenneth D. Merry.Bl -tag -width 19n 183008df2e3eSKenneth D. Merry.It read_keys 183108df2e3eSKenneth D. MerryReport the current persistent reservation generation (PRgeneration) and any 183208df2e3eSKenneth D. Merryregistered keys. 183308df2e3eSKenneth D. Merry.It read_reservation 183408df2e3eSKenneth D. MerryReport the persistent reservation, if any. 183508df2e3eSKenneth D. Merry.It report_capabilities 183608df2e3eSKenneth D. MerryReport the persistent reservation capabilities of the LUN. 183708df2e3eSKenneth D. Merry.It read_full_status 183808df2e3eSKenneth D. MerryReport the full status of persistent reservations on the LUN. 183908df2e3eSKenneth D. Merry.El 184008df2e3eSKenneth D. Merry.It Fl o Ar mode 184108df2e3eSKenneth D. MerrySpecify the service action for the PERSISTENT RESERVE OUT command. 184208df2e3eSKenneth D. MerryFor service actions like register that are components of other service 184308df2e3eSKenneth D. Merryaction names, the entire name must be specified. 184408df2e3eSKenneth D. MerryOtherwise, enough of the service action name must be specified to 184508df2e3eSKenneth D. Merrydistinguish it from other possible service actions. 184608df2e3eSKenneth D. MerrySupported service actions: 184708df2e3eSKenneth D. Merry.Bl -tag -width 15n 184808df2e3eSKenneth D. Merry.It register 184908df2e3eSKenneth D. MerryRegister a reservation key with the LUN or unregister a reservation key. 185008df2e3eSKenneth D. MerryTo register a key, specify the requested key as the Service Action 185108df2e3eSKenneth D. MerryReservation Key. 185208df2e3eSKenneth D. MerryTo unregister a key, specify the previously registered key as the 185308df2e3eSKenneth D. MerryReservation Key. 185408df2e3eSKenneth D. MerryTo change a key, specify the old key as the Reservation Key and the new 185508df2e3eSKenneth D. Merrykey as the Service Action Reservation Key. 185608df2e3eSKenneth D. Merry.It register_ignore 185708df2e3eSKenneth D. MerryThis is similar to the register subcommand, except that the Reservation Key 185808df2e3eSKenneth D. Merryis ignored. 185908df2e3eSKenneth D. MerryThe Service Action Reservation Key will overwrite any previous key 186008df2e3eSKenneth D. Merryregistered for the initiator. 186108df2e3eSKenneth D. Merry.It reserve 186208df2e3eSKenneth D. MerryCreate a reservation. 186308df2e3eSKenneth D. MerryA key must be registered with the LUN before the LUN can be reserved, and 186408df2e3eSKenneth D. Merryit must be specified as the Reservation Key. 186508df2e3eSKenneth D. MerryThe type of reservation must also be specified. 186608df2e3eSKenneth D. MerryThe scope defaults to LUN scope (LU_SCOPE), but may be changed. 186708df2e3eSKenneth D. Merry.It release 186808df2e3eSKenneth D. MerryRelease a reservation. 186908df2e3eSKenneth D. MerryThe Reservation Key must be specified. 187008df2e3eSKenneth D. Merry.It clear 187108df2e3eSKenneth D. MerryRelease a reservation and remove all keys from the device. 187208df2e3eSKenneth D. MerryThe Reservation Key must be specified. 187308df2e3eSKenneth D. Merry.It preempt 187408df2e3eSKenneth D. MerryRemove a reservation belonging to another initiator. 187508df2e3eSKenneth D. MerryThe Reservation Key must be specified. 187608df2e3eSKenneth D. MerryThe Service Action Reservation Key may be specified, depending on the 187708df2e3eSKenneth D. Merryoperation being performed. 187808df2e3eSKenneth D. Merry.It preempt_abort 187908df2e3eSKenneth D. MerryRemove a reservation belonging to another initiator and abort all 188008df2e3eSKenneth D. Merryoutstanding commands from that initiator. 188108df2e3eSKenneth D. MerryThe Reservation Key must be specified. 188208df2e3eSKenneth D. MerryThe Service Action Reservation Key may be specified, depending on the 188308df2e3eSKenneth D. Merryoperation being performed. 188408df2e3eSKenneth D. Merry.It register_move 188508df2e3eSKenneth D. MerryRegister another initiator with the LUN, and establish a reservation on the 188608df2e3eSKenneth D. MerryLUN for that initiator. 188708df2e3eSKenneth D. MerryThe Reservation Key and Service Action Reservation Key must be specified. 188808df2e3eSKenneth D. Merry.It replace_lost 188908df2e3eSKenneth D. MerryReplace Lost Reservation information. 189008df2e3eSKenneth D. Merry.El 189108df2e3eSKenneth D. Merry.It Fl a 189208df2e3eSKenneth D. MerrySet the All Target Ports (ALL_TG_PT) bit. 189308df2e3eSKenneth D. MerryThis requests that the key registration be applied to all target ports and 189408df2e3eSKenneth D. Merrynot just the particular target port that receives the command. 189508df2e3eSKenneth D. MerryThis only applies to the register and register_ignore actions. 189608df2e3eSKenneth D. Merry.It Fl I Ar tid 189708df2e3eSKenneth D. MerrySpecify a Transport ID. 189808df2e3eSKenneth D. MerryThis only applies to the Register and Register and Move service actions for 189908df2e3eSKenneth D. MerryPersistent Reserve Out. 190008df2e3eSKenneth D. MerryMultiple Transport IDs may be specified with multiple 190108df2e3eSKenneth D. Merry.Fl I 190208df2e3eSKenneth D. Merryarguments. 190308df2e3eSKenneth D. MerryWith the Register service action, specifying one or more Transport IDs 190408df2e3eSKenneth D. Merryimplicitly enables the 190508df2e3eSKenneth D. Merry.Fl S 190608df2e3eSKenneth D. Merryoption which turns on the SPEC_I_PT bit. 190708df2e3eSKenneth D. MerryTransport IDs generally have the format protocol,id. 190808df2e3eSKenneth D. Merry.Bl -tag -width 5n 190908df2e3eSKenneth D. Merry.It SAS 191008df2e3eSKenneth D. MerryA SAS Transport ID consists of 191108df2e3eSKenneth D. Merry.Dq sas, 191208df2e3eSKenneth D. Merryfollowed by a 64-bit SAS address. 191308df2e3eSKenneth D. MerryFor example: 191408df2e3eSKenneth D. Merry.Pp 191508df2e3eSKenneth D. Merry.Dl sas,0x1234567812345678 191608df2e3eSKenneth D. Merry.It FC 191708df2e3eSKenneth D. MerryA Fibre Channel Transport ID consists of 191808df2e3eSKenneth D. Merry.Dq fcp, 191908df2e3eSKenneth D. Merryfollowed by a 64-bit Fibre Channel World Wide Name. 192008df2e3eSKenneth D. MerryFor example: 192108df2e3eSKenneth D. Merry.Pp 192208df2e3eSKenneth D. Merry.Dl fcp,0x1234567812345678 192308df2e3eSKenneth D. Merry.It SPI 192408df2e3eSKenneth D. MerryA Parallel SCSI address consists of 192508df2e3eSKenneth D. Merry.Dq spi, 192608df2e3eSKenneth D. Merryfollowed by a SCSI target ID and a relative target port identifier. 192708df2e3eSKenneth D. MerryFor example: 192808df2e3eSKenneth D. Merry.Pp 192908df2e3eSKenneth D. Merry.Dl spi,4,1 193008df2e3eSKenneth D. Merry.It 1394 193108df2e3eSKenneth D. MerryAn IEEE 1394 (Firewire) Transport ID consists of 193208df2e3eSKenneth D. Merry.Dq sbp, 193308df2e3eSKenneth D. Merryfollowed by a 64-bit EUI-64 IEEE 1394 node unique identifier. 193408df2e3eSKenneth D. MerryFor example: 193508df2e3eSKenneth D. Merry.Pp 193608df2e3eSKenneth D. Merry.Dl sbp,0x1234567812345678 193708df2e3eSKenneth D. Merry.It RDMA 193808df2e3eSKenneth D. MerryA SCSI over RDMA Transport ID consists of 193908df2e3eSKenneth D. Merry.Dq srp, 194008df2e3eSKenneth D. Merryfollowed by a 128-bit RDMA initiator port identifier. 194108df2e3eSKenneth D. MerryThe port identifier must be exactly 32 or 34 (if the leading 0x is 194208df2e3eSKenneth D. Merryincluded) hexadecimal digits. 194308df2e3eSKenneth D. MerryOnly hexadecimal (base 16) numbers are supported. 194408df2e3eSKenneth D. MerryFor example: 194508df2e3eSKenneth D. Merry.Pp 194608df2e3eSKenneth D. Merry.Dl srp,0x12345678123456781234567812345678 194708df2e3eSKenneth D. Merry.It iSCSI 194808df2e3eSKenneth D. MerryAn iSCSI Transport ID consists an iSCSI name and optionally a separator and 194908df2e3eSKenneth D. MerryiSCSI session ID. 195008df2e3eSKenneth D. MerryFor example, if only the iSCSI name is specified: 195108df2e3eSKenneth D. Merry.Pp 195208df2e3eSKenneth D. Merry.Dl iqn.2012-06.com.example:target0 195308df2e3eSKenneth D. Merry.Pp 195408df2e3eSKenneth D. MerryIf the iSCSI separator and initiator session ID are specified: 195508df2e3eSKenneth D. Merry.Pp 195608df2e3eSKenneth D. Merry.Dl iqn.2012-06.com.example:target0,i,0x123 195708df2e3eSKenneth D. Merry.It PCIe 195808df2e3eSKenneth D. MerryA SCSI over PCIe Transport ID consists of 195908df2e3eSKenneth D. Merry.Dq sop, 196008df2e3eSKenneth D. Merryfollowed by a PCIe Routing ID. 196108df2e3eSKenneth D. MerryThe Routing ID consists of a bus, device and function or in the alternate 196208df2e3eSKenneth D. Merryform, a bus and function. 196308df2e3eSKenneth D. MerryThe bus must be in the range of 0 to 255 inclusive and the device must be 196408df2e3eSKenneth D. Merryin the range of 0 to 31 inclusive. 196508df2e3eSKenneth D. MerryThe function must be in the range of 0 to 7 inclusive if the standard form 196608df2e3eSKenneth D. Merryis used, and in the range of 0 to 255 inclusive if the alternate form is 196708df2e3eSKenneth D. Merryused. 196808df2e3eSKenneth D. MerryFor example, if a bus, device and function are specified for the standard 196908df2e3eSKenneth D. MerryRouting ID form: 197008df2e3eSKenneth D. Merry.Pp 197108df2e3eSKenneth D. Merry.Dl sop,4,5,1 197208df2e3eSKenneth D. Merry.Pp 197308df2e3eSKenneth D. MerryIf the alternate Routing ID form is used: 197408df2e3eSKenneth D. Merry.Pp 197508df2e3eSKenneth D. Merry.Dl sop,4,1 197608df2e3eSKenneth D. Merry.El 197708df2e3eSKenneth D. Merry.It Fl k Ar key 197808df2e3eSKenneth D. MerrySpecify the Reservation Key. 197908df2e3eSKenneth D. MerryThis may be in decimal, octal or hexadecimal format. 198008df2e3eSKenneth D. MerryThe value is zero by default if not otherwise specified. 198108df2e3eSKenneth D. MerryThe value must be between 0 and 2^64 - 1, inclusive. 198208df2e3eSKenneth D. Merry.It Fl K Ar key 198308df2e3eSKenneth D. MerrySpecify the Service Action Reservation Key. 198408df2e3eSKenneth D. MerryThis may be in decimal, octal or hexadecimal format. 198508df2e3eSKenneth D. MerryThe value is zero by default if not otherwise specified. 198608df2e3eSKenneth D. MerryThe value must be between 0 and 2^64 - 1, inclusive. 198708df2e3eSKenneth D. Merry.It Fl p 198808df2e3eSKenneth D. MerryEnable the Activate Persist Through Power Loss bit. 198908df2e3eSKenneth D. MerryThis is only used for the register and register_ignore actions. 199008df2e3eSKenneth D. MerryThis requests that the reservation persist across power loss events. 199108df2e3eSKenneth D. Merry.It Fl s Ar scope 199208df2e3eSKenneth D. MerrySpecify the scope of the reservation. 199308df2e3eSKenneth D. MerryThe scope may be specified by name or by number. 199408df2e3eSKenneth D. MerryThe scope is ignored for register, register_ignore and clear. 199508df2e3eSKenneth D. MerryIf the desired scope isn't available by name, you may specify the number. 199608df2e3eSKenneth D. Merry.Bl -tag -width 7n 199708df2e3eSKenneth D. Merry.It lun 199808df2e3eSKenneth D. MerryLUN scope (0x00). 199908df2e3eSKenneth D. MerryThis encompasses the entire LUN. 200008df2e3eSKenneth D. Merry.It extent 200108df2e3eSKenneth D. MerryExtent scope (0x01). 200208df2e3eSKenneth D. Merry.It element 200308df2e3eSKenneth D. MerryElement scope (0x02). 200408df2e3eSKenneth D. Merry.El 200508df2e3eSKenneth D. Merry.It Fl R Ar rtp 200608df2e3eSKenneth D. MerrySpecify the Relative Target Port. 200708df2e3eSKenneth D. MerryThis only applies to the Register and Move service action of the Persistent 200808df2e3eSKenneth D. MerryReserve Out command. 200908df2e3eSKenneth D. Merry.It Fl S 201008df2e3eSKenneth D. MerryEnable the SPEC_I_PT bit. 201108df2e3eSKenneth D. MerryThis only applies to the Register service action of Persistent Reserve Out. 201208df2e3eSKenneth D. MerryYou must also specify at least one Transport ID with 201308df2e3eSKenneth D. Merry.Fl I 201408df2e3eSKenneth D. Merryif this option is set. 201508df2e3eSKenneth D. MerryIf you specify a Transport ID, this option is automatically set. 201608df2e3eSKenneth D. MerryIt is an error to specify this option for any service action other than 201708df2e3eSKenneth D. MerryRegister. 201808df2e3eSKenneth D. Merry.It Fl T Ar type 201908df2e3eSKenneth D. MerrySpecify the reservation type. 202008df2e3eSKenneth D. MerryThe reservation type may be specified by name or by number. 202108df2e3eSKenneth D. MerryIf the desired reservation type isn't available by name, you may specify 202208df2e3eSKenneth D. Merrythe number. 202308df2e3eSKenneth D. MerrySupported reservation type names: 202408df2e3eSKenneth D. Merry.Bl -tag -width 11n 202508df2e3eSKenneth D. Merry.It read_shared 202608df2e3eSKenneth D. MerryRead Shared mode. 202708df2e3eSKenneth D. Merry.It wr_ex 202808df2e3eSKenneth D. MerryWrite Exclusive mode. 202908df2e3eSKenneth D. MerryMay also be specified as 203008df2e3eSKenneth D. Merry.Dq write_exclusive . 203108df2e3eSKenneth D. Merry.It rd_ex 203208df2e3eSKenneth D. MerryRead Exclusive mode. 203308df2e3eSKenneth D. MerryMay also be specified as 203408df2e3eSKenneth D. Merry.Dq read_exclusive . 203508df2e3eSKenneth D. Merry.It ex_ac 203608df2e3eSKenneth D. MerryExclusive access mode. 203708df2e3eSKenneth D. MerryMay also be specified as 203808df2e3eSKenneth D. Merry.Dq exclusive_access . 203908df2e3eSKenneth D. Merry.It wr_ex_ro 204008df2e3eSKenneth D. MerryWrite Exclusive Registrants Only mode. 204108df2e3eSKenneth D. MerryMay also be specified as 204208df2e3eSKenneth D. Merry.Dq write_exclusive_reg_only . 204308df2e3eSKenneth D. Merry.It ex_ac_ro 204408df2e3eSKenneth D. MerryExclusive Access Registrants Only mode. 204508df2e3eSKenneth D. MerryMay also be specified as 204608df2e3eSKenneth D. Merry.Dq exclusive_access_reg_only . 204708df2e3eSKenneth D. Merry.It wr_ex_ar 204808df2e3eSKenneth D. MerryWrite Exclusive All Registrants mode. 204908df2e3eSKenneth D. MerryMay also be specified as 205008df2e3eSKenneth D. Merry.Dq write_exclusive_all_regs . 205108df2e3eSKenneth D. Merry.It ex_ac_ar 205208df2e3eSKenneth D. MerryExclusive Access All Registrants mode. 205308df2e3eSKenneth D. MerryMay also be specified as 205408df2e3eSKenneth D. Merry.Dq exclusive_access_all_regs . 205508df2e3eSKenneth D. Merry.El 205608df2e3eSKenneth D. Merry.It Fl U 205708df2e3eSKenneth D. MerrySpecify that the target should unregister the initiator that sent 205808df2e3eSKenneth D. Merrythe Register and Move request. 205908df2e3eSKenneth D. MerryBy default, the target will not unregister the initiator that sends the 206008df2e3eSKenneth D. MerryRegister and Move request. 206108df2e3eSKenneth D. MerryThis option only applies to the Register and Move service action of the 206208df2e3eSKenneth D. MerryPersistent Reserve Out command. 206308df2e3eSKenneth D. Merry.El 20645672fac9SKenneth D. Merry.It Ic attrib 20655672fac9SKenneth D. MerryIssue the 20665672fac9SKenneth D. Merry.Tn SCSI 20675672fac9SKenneth D. MerryREAD or WRITE ATTRIBUTE commands. 20685672fac9SKenneth D. MerryThese commands are used to read and write attributes in Medium Auxiliary 20695672fac9SKenneth D. MerryMemory (MAM). 20705672fac9SKenneth D. MerryThe most common place Medium Auxiliary Memory is found is small flash chips 20715672fac9SKenneth D. Merryincluded tape cartriges. 20725672fac9SKenneth D. MerryFor instance, 20735672fac9SKenneth D. Merry.Tn LTO 20745672fac9SKenneth D. Merrytapes have MAM. 20755672fac9SKenneth D. MerryEither the 20765672fac9SKenneth D. Merry.Fl r 20775672fac9SKenneth D. Merryoption or the 20785672fac9SKenneth D. Merry.Fl w 20795672fac9SKenneth D. Merryoption must be specified. 20805672fac9SKenneth D. Merry.Bl -tag -width 14n 20815672fac9SKenneth D. Merry.It Fl r Ar action 20825672fac9SKenneth D. MerrySpecify the READ ATTRIBUTE service action. 20835672fac9SKenneth D. Merry.Bl -tag -width 11n 20845672fac9SKenneth D. Merry.It attr_values 20855672fac9SKenneth D. MerryIssue the ATTRIBUTE VALUES service action. 20865672fac9SKenneth D. MerryRead and decode the available attributes and their values. 20875672fac9SKenneth D. Merry.It attr_list 20885672fac9SKenneth D. MerryIssue the ATTRIBUTE LIST service action. 20895672fac9SKenneth D. MerryList the attributes that are available to read and write. 20905672fac9SKenneth D. Merry.It lv_list 20915672fac9SKenneth D. MerryIssue the LOGICAL VOLUME LIST service action. 20925672fac9SKenneth D. MerryList the available logical volumes in the MAM. 20935672fac9SKenneth D. Merry.It part_list 20945672fac9SKenneth D. MerryIssue the PARTITION LIST service action. 20955672fac9SKenneth D. MerryList the available partitions in the MAM. 20965672fac9SKenneth D. Merry.It supp_attr 20975672fac9SKenneth D. MerryIssue the SUPPORTED ATTRIBUTES service action. 20985672fac9SKenneth D. MerryList attributes that are supported for reading or writing. 20995672fac9SKenneth D. MerryThese attributes may or may not be currently present in the MAM. 21005672fac9SKenneth D. Merry.El 21015672fac9SKenneth D. Merry.It Fl w Ar attr 21025672fac9SKenneth D. MerrySpecify an attribute to write to the MAM. 21035672fac9SKenneth D. MerryThis option is not yet implemented. 21045672fac9SKenneth D. Merry.It Fl a Ar num 21055672fac9SKenneth D. MerrySpecify the attribute number to display. 21065672fac9SKenneth D. MerryThis option only works with the attr_values, attr_list and supp_attr 21075672fac9SKenneth D. Merryarguments to 21085672fac9SKenneth D. Merry.Fl r . 21095672fac9SKenneth D. Merry.It Fl c 21105672fac9SKenneth D. MerryDisplay cached attributes. 21115672fac9SKenneth D. MerryIf the device supports this flag, it allows displaying attributes for the 21125672fac9SKenneth D. Merrylast piece of media loaded in the drive. 21135672fac9SKenneth D. Merry.It Fl e Ar num 21145672fac9SKenneth D. MerrySpecify the element address. 21155672fac9SKenneth D. MerryThis is used for specifying which element number in a medium changer to 21165672fac9SKenneth D. Merryaccess when reading attributes. 21175672fac9SKenneth D. MerryThe element number could be for a picker, portal, slot or drive. 21185672fac9SKenneth D. Merry.It Fl F Ar form1,form2 21195672fac9SKenneth D. MerrySpecify the output format for the attribute values (attr_val) display as a 21205672fac9SKenneth D. Merrycomma separated list of options. 21215672fac9SKenneth D. MerryThe default output is currently set to field_all,nonascii_trim,text_raw. 21225672fac9SKenneth D. MerryOnce this code is ported to FreeBSD 10, any text fields will be converted 21235672fac9SKenneth D. Merryfrom their codeset to the user's native codeset with 21245672fac9SKenneth D. Merry.Xr iconv 3 . 21255672fac9SKenneth D. Merry.Pp 21265672fac9SKenneth D. MerryThe text options are mutually exclusive; if you specify more than one, you 21275672fac9SKenneth D. Merrywill get unpredictable results. 21285672fac9SKenneth D. MerryThe nonascii options are also mutually exclusive. 21295672fac9SKenneth D. MerryMost of the field options may be logically ORed together. 21305672fac9SKenneth D. Merry.Bl -tag -width 12n 21315672fac9SKenneth D. Merry.It text_esc 21325672fac9SKenneth D. MerryPrint text fields with non-ASCII characters escaped. 21335672fac9SKenneth D. Merry.It text_raw 21345672fac9SKenneth D. MerryPrint text fields natively, with no codeset conversion. 21355672fac9SKenneth D. Merry.It nonascii_esc 21365672fac9SKenneth D. MerryIf any non-ASCII characters occur in fields that are supposed to be ASCII, 21375672fac9SKenneth D. Merryescape the non-ASCII characters. 21385672fac9SKenneth D. Merry.It nonascii_trim 21395672fac9SKenneth D. MerryIf any non-ASCII characters occur in fields that are supposed to be ASCII, 21405672fac9SKenneth D. Merryomit the non-ASCII characters. 21415672fac9SKenneth D. Merry.It nonascii_raw 21425672fac9SKenneth D. MerryIf any non-ASCII characters occur in fields that are supposed to be ASCII, 21435672fac9SKenneth D. Merryprint them as they are. 21445672fac9SKenneth D. Merry.It field_all 21455672fac9SKenneth D. MerryPrint all of the prefix fields: description, attribute number, attribute 21465672fac9SKenneth D. Merrysize, and the attribute's readonly status. 21475672fac9SKenneth D. MerryIf field_all is specified, specifying any other field options will not have 21485672fac9SKenneth D. Merryan effect. 21495672fac9SKenneth D. Merry.It field_none 21505672fac9SKenneth D. MerryPrint none of the prefix fields, and only print out the attribute value. 21515672fac9SKenneth D. MerryIf field_none is specified, specifying any other field options will result 21525672fac9SKenneth D. Merryin those fields being printed. 21535672fac9SKenneth D. Merry.It field_desc 21545672fac9SKenneth D. MerryPrint out the attribute description. 21555672fac9SKenneth D. Merry.It field_num 21565672fac9SKenneth D. MerryPrint out the attribute number. 21575672fac9SKenneth D. Merry.It field_size 21585672fac9SKenneth D. MerryPrint out the attribute size. 21595672fac9SKenneth D. Merry.It field_rw 21605672fac9SKenneth D. MerryPrint out the attribute's readonly status. 21615672fac9SKenneth D. Merry.El 21625672fac9SKenneth D. Merry.It Fl p Ar part 21635672fac9SKenneth D. MerrySpecify the partition. 21645672fac9SKenneth D. MerryWhen the media has multiple partitions, specifying different partition 21655672fac9SKenneth D. Merrynumbers allows seeing the values for each individual partition. 21665672fac9SKenneth D. Merry.It Fl s Ar start_num 21675672fac9SKenneth D. MerrySpecify the starting attribute number. 21685672fac9SKenneth D. MerryThis requests that the target device return attribute information starting 21695672fac9SKenneth D. Merryat the given number. 21705672fac9SKenneth D. Merry.It Fl T Ar elem_type 21715672fac9SKenneth D. MerrySpecify the element type. 21725672fac9SKenneth D. MerryFor medium changer devices, this allows specifying the type the element 21735672fac9SKenneth D. Merryreferenced in the element address ( 21745672fac9SKenneth D. Merry.Fl e ) . 21755672fac9SKenneth D. MerryValid types are: 21765672fac9SKenneth D. Merry.Dq all , 21775672fac9SKenneth D. Merry.Dq picker , 21785672fac9SKenneth D. Merry.Dq slot , 21795672fac9SKenneth D. Merry.Dq portal , 21805672fac9SKenneth D. Merryand 21815672fac9SKenneth D. Merry.Dq drive . 21825672fac9SKenneth D. Merry.It Fl V Ar vol_num 21835672fac9SKenneth D. MerrySpecify the number of the logical volume to operate on. 21845672fac9SKenneth D. MerryIf the media has multiple logical volumes, this will allow displaying 21855672fac9SKenneth D. Merryor writing attributes on the given logical volume. 21869a6844d5SKenneth D. Merry.El 21870e358df0SKenneth D. Merry.It Ic opcodes 21880e358df0SKenneth D. MerryIssue the REPORT SUPPORTED OPCODES service action of the 21890e358df0SKenneth D. Merry.Tn SCSI 21900e358df0SKenneth D. MerryMAINTENANCE IN 21910e358df0SKenneth D. Merrycommand. 21920e358df0SKenneth D. MerryWithout arguments, this command will return a list of all 21930e358df0SKenneth D. Merry.Tn SCSI 21940e358df0SKenneth D. Merrycommands supported by the device, including service actions of commands 21950e358df0SKenneth D. Merrythat support service actions. 21960e358df0SKenneth D. MerryIt will also include the 21970e358df0SKenneth D. Merry.Tn SCSI 21980e358df0SKenneth D. MerryCDB (Command Data Block) length for each command, and the description of 21990e358df0SKenneth D. Merryeach command if it is known. 22000e358df0SKenneth D. Merry.Bl -tag -width 18n 22010e358df0SKenneth D. Merry.It Fl o Ar opcode 22020e358df0SKenneth D. MerryRequest information on a specific opcode instead of the list of supported 22030e358df0SKenneth D. Merrycommands. 22040e358df0SKenneth D. MerryIf supported, the target will return a CDB-like structure that indicates 22050e358df0SKenneth D. Merrythe opcode, service action (if any), and a mask of bits that are supported 22060e358df0SKenneth D. Merryin that CDB. 22070e358df0SKenneth D. Merry.It Fl s Ar service_action 22080e358df0SKenneth D. MerryFor commands that support a service action, specify the service action to 22090e358df0SKenneth D. Merryquery. 22100e358df0SKenneth D. Merry.It Fl N 22110e358df0SKenneth D. MerryIf a service action is specified for a given opcode, and the device does 22120e358df0SKenneth D. Merrynot support the given service action, the device should not return a 22130e358df0SKenneth D. Merry.Tn SCSI 22140e358df0SKenneth D. Merryerror, but rather indicate in the returned parameter data that the command 22150e358df0SKenneth D. Merryis not supported. 22160e358df0SKenneth D. MerryBy default, if a service action is specified for an opcode, and service 22170e358df0SKenneth D. Merryactions are not supported for the opcode in question, the device will 22180e358df0SKenneth D. Merryreturn an error. 22190e358df0SKenneth D. Merry.It Fl T 22200e358df0SKenneth D. MerryInclude timeout values. 22210e358df0SKenneth D. MerryThis option works with the default display, which includes all commands 22220e358df0SKenneth D. Merrysupported by the device, and with the 22230e358df0SKenneth D. Merry.Fl o 22240e358df0SKenneth D. Merryand 22250e358df0SKenneth D. Merry.Fl s 22260e358df0SKenneth D. Merryoptions, which request information on a specific command and service 22270e358df0SKenneth D. Merryaction. 22280e358df0SKenneth D. MerryThis requests that the device report Nominal and Recommended timeout values 22290e358df0SKenneth D. Merryfor the given command or commands. 22300e358df0SKenneth D. MerryThe timeout values are in seconds. 22310e358df0SKenneth D. MerryThe timeout descriptor also includes a command-specific 22320e358df0SKenneth D. Merry.El 22339a6844d5SKenneth D. Merry.It Ic zone 22349a6844d5SKenneth D. MerryManage 22359a6844d5SKenneth D. Merry.Tn SCSI 22369a6844d5SKenneth D. Merryand 22379a6844d5SKenneth D. Merry.Tn ATA 22389a6844d5SKenneth D. MerryZoned Block devices. 22399a6844d5SKenneth D. MerryThis allows managing devices that conform to the 22409a6844d5SKenneth D. Merry.Tn SCSI 22419a6844d5SKenneth D. MerryZoned Block Commands (ZBC) and 22429a6844d5SKenneth D. Merry.Tn ATA 22439a6844d5SKenneth D. MerryZoned ATA Command Set (ZAC) 22449a6844d5SKenneth D. Merryspecifications. 22459a6844d5SKenneth D. MerryDevices using these command sets are usually hard drives using Shingled 22469a6844d5SKenneth D. MerryMagnetic Recording (SMR). 22479a6844d5SKenneth D. MerryThere are three types of SMR drives: 22489a6844d5SKenneth D. Merry.Bl -tag -width 13n 22499a6844d5SKenneth D. Merry.It Drive Managed 22509a6844d5SKenneth D. MerryDrive Managed drives look and act just like a standard random access block 22519a6844d5SKenneth D. Merrydevice, but underneath, the drive reads and writes the bulk of its capacity 22529a6844d5SKenneth D. Merryusing SMR zones. 22539a6844d5SKenneth D. MerrySequential writes will yield better performance, but writing sequentially 22549a6844d5SKenneth D. Merryis not required. 22559a6844d5SKenneth D. Merry.It Host Aware 22569a6844d5SKenneth D. MerryHost Aware drives expose the underlying zone layout via 22579a6844d5SKenneth D. Merry.Tn SCSI 22589a6844d5SKenneth D. Merryor 22599a6844d5SKenneth D. Merry.Tn ATA 22609a6844d5SKenneth D. Merrycommands and allow the host to manage the zone conditions. 22619a6844d5SKenneth D. MerryThe host is not required to manage the zones on the drive, though. 22629a6844d5SKenneth D. MerrySequential writes will yield better performance in Sequential Write 22639a6844d5SKenneth D. MerryPreferred zones, but the host can write randomly in those zones. 22649a6844d5SKenneth D. Merry.It Host Managed 22659a6844d5SKenneth D. MerryHost Managed drives expose the underlying zone layout via 22669a6844d5SKenneth D. Merry.Tn SCSI 22679a6844d5SKenneth D. Merryor 22689a6844d5SKenneth D. Merry.Tn ATA 22699a6844d5SKenneth D. Merrycommands. 22709a6844d5SKenneth D. MerryThe host is required to access the zones according to the rules described 22719a6844d5SKenneth D. Merryby the zone layout. 22729a6844d5SKenneth D. MerryAny commands that violate the rules will be returned with an error. 22739a6844d5SKenneth D. Merry.El 22749a6844d5SKenneth D. Merry.Pp 22759a6844d5SKenneth D. MerrySMR drives are divided into zones (typically in the range of 256MB each) 22769a6844d5SKenneth D. Merrythat fall into three general categories: 22779a6844d5SKenneth D. Merry.Bl -tag -width 20n 22789a6844d5SKenneth D. Merry.It Conventional 22799a6844d5SKenneth D. MerryThese are also known as Non Write Pointer zones. 22809a6844d5SKenneth D. MerryThese zones can be randomly written without an unexpected performance penalty. 22819a6844d5SKenneth D. Merry.It Sequential Preferred 22829a6844d5SKenneth D. MerryThese zones should be written sequentially starting at the write pointer 22839a6844d5SKenneth D. Merryfor the zone. 22849a6844d5SKenneth D. MerryThey may be written randomly. 22859a6844d5SKenneth D. MerryWrites that do not conform to the zone layout may be significantly slower 22869a6844d5SKenneth D. Merrythan expected. 22879a6844d5SKenneth D. Merry.It Sequential Required 22889a6844d5SKenneth D. MerryThese zones must be written sequentially. 22899a6844d5SKenneth D. MerryIf they are not written sequentially, starting at the write pointer, the 22909a6844d5SKenneth D. Merrycommand will fail. 22919a6844d5SKenneth D. Merry.El 22929a6844d5SKenneth D. Merry.Bl -tag -width 12n 22939a6844d5SKenneth D. Merry.It Fl c Ar cmd 22949a6844d5SKenneth D. MerrySpecify the zone subcommand: 22959a6844d5SKenneth D. Merry.Bl -tag -width 6n 22969a6844d5SKenneth D. Merry.It rz 22979a6844d5SKenneth D. MerryIssue the Report Zones command. 22989a6844d5SKenneth D. MerryAll zones are returned by default. 22999a6844d5SKenneth D. MerrySpecify report options with 23009a6844d5SKenneth D. Merry.Fl o 23019a6844d5SKenneth D. Merryand printing options with 23029a6844d5SKenneth D. Merry.Fl P . 23039a6844d5SKenneth D. MerrySpecify the starting LBA with 23049a6844d5SKenneth D. Merry.Fl l . 23059a6844d5SKenneth D. MerryNote that 23069a6844d5SKenneth D. Merry.Dq reportzones 23079a6844d5SKenneth D. Merryis also accepted as a command argument. 23089a6844d5SKenneth D. Merry.It open 23099a6844d5SKenneth D. MerryExplicitly open the zone specified by the starting LBA. 23109a6844d5SKenneth D. Merry.It close 23119a6844d5SKenneth D. MerryClose the zone specified by starting LBA. 23129a6844d5SKenneth D. Merry.It finish 23139a6844d5SKenneth D. MerryFinish the zone specified by the starting LBA. 23149a6844d5SKenneth D. Merry.It rwp 23159a6844d5SKenneth D. MerryReset the write pointer for the zone specified by the starting LBA. 23169a6844d5SKenneth D. Merry.El 23179a6844d5SKenneth D. Merry.It Fl a 23189a6844d5SKenneth D. MerryFor the Open, Close, Finish, and Reset Write Pointer operations, apply the 23199a6844d5SKenneth D. Merryoperation to all zones on the drive. 23209a6844d5SKenneth D. Merry.It Fl l Ar lba 23219a6844d5SKenneth D. MerrySpecify the starting LBA. 23229a6844d5SKenneth D. MerryFor the Report Zones command, this tells the drive to report starting with 23239a6844d5SKenneth D. Merrythe zone that starts at the given LBA. 23249a6844d5SKenneth D. MerryFor the other commands, this allows the user to identify the zone requested 23259a6844d5SKenneth D. Merryby its starting LBA. 23269a6844d5SKenneth D. MerryThe LBA may be specified in decimal, hexadecimal or octal notation. 23279a6844d5SKenneth D. Merry.It Fl o Ar rep_opt 23289a6844d5SKenneth D. MerryFor the Report Zones command, specify a subset of zones to report. 23299a6844d5SKenneth D. Merry.Bl -tag -width 8n 23309a6844d5SKenneth D. Merry.It all 23319a6844d5SKenneth D. MerryReport all zones. 23329a6844d5SKenneth D. MerryThis is the default. 2333*d1e652bfSGordon Bergling.It empty 23349a6844d5SKenneth D. MerryReport only empty zones. 23359a6844d5SKenneth D. Merry.It imp_open 23369a6844d5SKenneth D. MerryReport zones that are implicitly open. 23379a6844d5SKenneth D. MerryThis means that the host has sent a write to the zone without explicitly 23389a6844d5SKenneth D. Merryopening the zone. 23399a6844d5SKenneth D. Merry.It exp_open 23409a6844d5SKenneth D. MerryReport zones that are explicitly open. 23419a6844d5SKenneth D. Merry.It closed 23429a6844d5SKenneth D. MerryReport zones that have been closed by the host. 23439a6844d5SKenneth D. Merry.It full 23449a6844d5SKenneth D. MerryReport zones that are full. 23459a6844d5SKenneth D. Merry.It ro 23469a6844d5SKenneth D. MerryReport zones that are in the read only state. 23479a6844d5SKenneth D. MerryNote that 23489a6844d5SKenneth D. Merry.Dq readonly 23499a6844d5SKenneth D. Merryis also accepted as an argument. 23509a6844d5SKenneth D. Merry.It offline 23519a6844d5SKenneth D. MerryReport zones that are in the offline state. 23529a6844d5SKenneth D. Merry.It reset 23539a6844d5SKenneth D. MerryReport zones where the device recommends resetting write pointers. 23549a6844d5SKenneth D. Merry.It nonseq 23559a6844d5SKenneth D. MerryReport zones that have the Non Sequential Resources Active flag set. 23569a6844d5SKenneth D. MerryThese are zones that are Sequential Write Preferred, but have been written 23579a6844d5SKenneth D. Merrynon-sequentially. 23589a6844d5SKenneth D. Merry.It nonwp 23599a6844d5SKenneth D. MerryReport Non Write Pointer zones, also known as Conventional zones. 23609a6844d5SKenneth D. Merry.El 23619a6844d5SKenneth D. Merry.It Fl P Ar print_opt 23629a6844d5SKenneth D. MerrySpecify a printing option for Report Zones: 23639a6844d5SKenneth D. Merry.Bl -tag -width 7n 23649a6844d5SKenneth D. Merry.It normal 23659a6844d5SKenneth D. MerryNormal Report Zones output. 23669a6844d5SKenneth D. MerryThis is the default. 23679a6844d5SKenneth D. MerryThe summary and column headings are printed, fields are separated by spaces 23689a6844d5SKenneth D. Merryand the fields themselves may contain spaces. 23699a6844d5SKenneth D. Merry.It summary 23709a6844d5SKenneth D. MerryJust print the summary: the number of zones, the maximum LBA (LBA of the 23719a6844d5SKenneth D. Merrylast logical block on the drive), and the value of the 23729a6844d5SKenneth D. Merry.Dq same 23739a6844d5SKenneth D. Merryfield. 23749a6844d5SKenneth D. MerryThe 23759a6844d5SKenneth D. Merry.Dq same 23769a6844d5SKenneth D. Merryfield describes whether the zones on the drive are all identical, all 23779a6844d5SKenneth D. Merrydifferent, or whether they are the same except for the last zone, etc. 23789a6844d5SKenneth D. Merry.It script 23799a6844d5SKenneth D. MerryPrint the zones in a script friendly format. 23809a6844d5SKenneth D. MerryThe summary and column headings are omitted, the fields are separated by 23819a6844d5SKenneth D. Merrycommas, and the fields do not contain spaces. 23829a6844d5SKenneth D. MerryThe fields contain underscores where spaces would normally be used. 23839a6844d5SKenneth D. Merry.El 23849a6844d5SKenneth D. Merry.El 23859a6844d5SKenneth D. Merry.It Ic epc 23869a6844d5SKenneth D. MerryIssue 23879a6844d5SKenneth D. Merry.Tn ATA 23889a6844d5SKenneth D. MerryExtended Power Conditions (EPC) feature set commands. 23899a6844d5SKenneth D. MerryThis only works on 23909a6844d5SKenneth D. Merry.Tn ATA 23919a6844d5SKenneth D. Merryprotocol drives, and will not work on 23929a6844d5SKenneth D. Merry.Tn SCSI 23939a6844d5SKenneth D. Merryprotocol drives. 23949a6844d5SKenneth D. MerryIt will work on 23959a6844d5SKenneth D. Merry.Tn SATA 23969a6844d5SKenneth D. Merrydrives behind a 23979a6844d5SKenneth D. Merry.Tn SCSI 23989a6844d5SKenneth D. Merryto 23999a6844d5SKenneth D. Merry.Tn ATA 24009a6844d5SKenneth D. Merrytranslation layer (SAT). 24019a6844d5SKenneth D. MerryIt may be helpful to read the ATA Command Set - 4 (ACS-4) description of 24029a6844d5SKenneth D. Merrythe Extended Power Conditions feature set, available at t13.org, to 24039a6844d5SKenneth D. Merryunderstand the details of this particular 24049a6844d5SKenneth D. Merry.Nm 24059a6844d5SKenneth D. Merrysubcommand. 24069a6844d5SKenneth D. Merry.Bl -tag -width 6n 24079a6844d5SKenneth D. Merry.It Fl c Ar cmd 24089a6844d5SKenneth D. MerrySpecify the epc subcommand 24099a6844d5SKenneth D. Merry.Bl -tag -width 7n 24109a6844d5SKenneth D. Merry.It restore 24119a6844d5SKenneth D. MerryRestore drive power condition settings. 24129a6844d5SKenneth D. Merry.Bl -tag -width 6n 24139a6844d5SKenneth D. Merry.It Fl r Ar src 24149a6844d5SKenneth D. MerrySpecify the source for the restored power settings, either 24159a6844d5SKenneth D. Merry.Dq default 24169a6844d5SKenneth D. Merryor 24179a6844d5SKenneth D. Merry.Dq saved . 24189a6844d5SKenneth D. MerryThis argument is required. 24199a6844d5SKenneth D. Merry.It Fl s 24209a6844d5SKenneth D. MerrySave the settings. 24219a6844d5SKenneth D. MerryThis only makes sense to specify when restoring from defaults. 24229a6844d5SKenneth D. Merry.El 24239a6844d5SKenneth D. Merry.It goto 24249a6844d5SKenneth D. MerryGo to the specified power condition. 24259a6844d5SKenneth D. Merry.Bl -tag -width 7n 24269a6844d5SKenneth D. Merry.It Fl p Ar cond 24279a6844d5SKenneth D. MerrySpecify the power condition: Idle_a, Idle_b, Idle_c, Standby_y, Standby_z. 24289a6844d5SKenneth D. MerryThis argument is required. 24299a6844d5SKenneth D. Merry.It Fl D 24309a6844d5SKenneth D. MerrySpecify delayed entry to the power condition. 24319a6844d5SKenneth D. MerryThe drive, if it supports this, can enter the power condition after the 24329a6844d5SKenneth D. Merrycommand completes. 24339a6844d5SKenneth D. Merry.It Fl H 24349a6844d5SKenneth D. MerryHold the power condition. 24359a6844d5SKenneth D. MerryIf the drive supports this option, it will hold the power condition and 24369a6844d5SKenneth D. Merryreject all commands that would normally cause it to exit that power 24379a6844d5SKenneth D. Merrycondition. 24389a6844d5SKenneth D. Merry.El 24399a6844d5SKenneth D. Merry.It timer 24409a6844d5SKenneth D. MerrySet the timer value for a power condition and enable or disable the 24419a6844d5SKenneth D. Merrycondition. 24429a6844d5SKenneth D. MerrySee the 24439a6844d5SKenneth D. Merry.Dq list 24449a6844d5SKenneth D. Merrydisplay described below to see what the current timer settings are for each 24459a6844d5SKenneth D. MerryIdle and Standby mode supported by the drive. 24469a6844d5SKenneth D. Merry.Bl -tag -width 8n 24479a6844d5SKenneth D. Merry.It Fl e 24489a6844d5SKenneth D. MerryEnable the power condition. 24499a6844d5SKenneth D. MerryOne of 24509a6844d5SKenneth D. Merry.Fl e 24519a6844d5SKenneth D. Merryor 24529a6844d5SKenneth D. Merry.Fl d 24539a6844d5SKenneth D. Merryis required. 24549a6844d5SKenneth D. Merry.It Fl d 24559a6844d5SKenneth D. MerryDisable the power condition. 24569a6844d5SKenneth D. MerryOne of 24579a6844d5SKenneth D. Merry.Fl d 24589a6844d5SKenneth D. Merryor 24599a6844d5SKenneth D. Merry.Fl e 24609a6844d5SKenneth D. Merryis required. 24619a6844d5SKenneth D. Merry.It Fl T Ar timer 24629a6844d5SKenneth D. MerrySpecify the timer in seconds. 24639a6844d5SKenneth D. MerryThe user may specify a timer as a floating point number with a maximum 24649a6844d5SKenneth D. Merrysupported resolution of tenths of a second. 24659a6844d5SKenneth D. MerryDrives may or may not support sub-second timer values. 24669a6844d5SKenneth D. Merry.It Fl p Ar cond 24679a6844d5SKenneth D. MerrySpecify the power condition: Idle_a, Idle_b, Idle_c, Standby_y, Standby_z. 24689a6844d5SKenneth D. MerryThis argument is required. 24699a6844d5SKenneth D. Merry.It Fl s 24709a6844d5SKenneth D. MerrySave the timer and power condition enable/disable state. 24719a6844d5SKenneth D. MerryBy default, if this option is not specified, only the current values for 24729a6844d5SKenneth D. Merrythis power condition will be affected. 24739a6844d5SKenneth D. Merry.El 24749a6844d5SKenneth D. Merry.It state 24759a6844d5SKenneth D. MerryEnable or disable a particular power condition. 24769a6844d5SKenneth D. Merry.Bl -tag -width 7n 247777d9b0efSAlan Somers.It Fl e 247877d9b0efSAlan SomersEnable the power condition. 247977d9b0efSAlan SomersOne of 248077d9b0efSAlan Somers.Fl e 248177d9b0efSAlan Somersor 248277d9b0efSAlan Somers.Fl d 248377d9b0efSAlan Somersis required. 248477d9b0efSAlan Somers.It Fl d 248577d9b0efSAlan SomersDisable the power condition. 248677d9b0efSAlan SomersOne of 248777d9b0efSAlan Somers.Fl d 248877d9b0efSAlan Somersor 248977d9b0efSAlan Somers.Fl e 249077d9b0efSAlan Somersis required. 24919a6844d5SKenneth D. Merry.It Fl p Ar cond 24929a6844d5SKenneth D. MerrySpecify the power condition: Idle_a, Idle_b, Idle_c, Standby_y, Standby_z. 24939a6844d5SKenneth D. MerryThis argument is required. 24949a6844d5SKenneth D. Merry.It Fl s 24959a6844d5SKenneth D. MerrySave the power condition enable/disable state. 24969a6844d5SKenneth D. MerryBy default, if this option is not specified, only the current values for 24979a6844d5SKenneth D. Merrythis power condition will be affected. 24989a6844d5SKenneth D. Merry.El 24999a6844d5SKenneth D. Merry.It enable 25009a6844d5SKenneth D. MerryEnable the Extended Power Condition (EPC) feature set. 25019a6844d5SKenneth D. Merry.It disable 25029a6844d5SKenneth D. MerryDisable the Extended Power Condition (EPC) feature set. 25039a6844d5SKenneth D. Merry.It source 25049a6844d5SKenneth D. MerrySpecify the EPC power source. 25059a6844d5SKenneth D. Merry.Bl -tag -width 6n 25069a6844d5SKenneth D. Merry.It Fl S Ar src 25079a6844d5SKenneth D. MerrySpecify the power source, either 25089a6844d5SKenneth D. Merry.Dq battery 25099a6844d5SKenneth D. Merryor 25109a6844d5SKenneth D. Merry.Dq nonbattery . 25119a6844d5SKenneth D. Merry.El 25129a6844d5SKenneth D. Merry.It status 25139a6844d5SKenneth D. MerryGet the current status of several parameters related to the Extended Power 25149a6844d5SKenneth D. MerryCondition (EPC) feature set, including whether APM and EPC are supported 25159a6844d5SKenneth D. Merryand enabled, whether Low Power Standby is supported, whether setting the 25169a6844d5SKenneth D. MerryEPC power source is supported, whether Low Power Standby is supported and 25179a6844d5SKenneth D. Merrythe current power condition. 25189a6844d5SKenneth D. Merry.Bl -tag -width 3n 25199a6844d5SKenneth D. Merry.It Fl P 25209a6844d5SKenneth D. MerryOnly report the current power condition. 25219a6844d5SKenneth D. MerrySome drives will exit their current power condition if a command other than 25229a6844d5SKenneth D. Merrythe 25239a6844d5SKenneth D. Merry.Tn ATA 25249a6844d5SKenneth D. MerryCHECK POWER MODE command is received. 25259a6844d5SKenneth D. MerryIf this flag is specified, 25269a6844d5SKenneth D. Merry.Nm 25279a6844d5SKenneth D. Merrywill only issue the 25289a6844d5SKenneth D. Merry.Tn ATA 25299a6844d5SKenneth D. MerryCHECK POWER MODE command to the drive. 25309a6844d5SKenneth D. Merry.El 25319a6844d5SKenneth D. Merry.It list 25329a6844d5SKenneth D. MerryDisplay the 25339a6844d5SKenneth D. Merry.Tn ATA 25349a6844d5SKenneth D. MerryPower Conditions log (Log Address 0x08). 25359a6844d5SKenneth D. MerryThis shows the list of Idle and Standby power conditions the drive 25369a6844d5SKenneth D. Merrysupports, and a number of parameters about each condition, including 25379a6844d5SKenneth D. Merrywhether it is enabled and what the timer value is. 25389a6844d5SKenneth D. Merry.El 25399a6844d5SKenneth D. Merry.El 254028db0a5eSKenneth D. Merry.It Ic timestamp 254128db0a5eSKenneth D. MerryIssue REPORT TIMESTAMP or SET TIMESTAMP 254228db0a5eSKenneth D. Merry.Tn SCSI 254364440392SGordon Berglingcommands. 254464440392SGordon BerglingEither the 254528db0a5eSKenneth D. Merry.Fl r 254628db0a5eSKenneth D. Merryoption or the 254728db0a5eSKenneth D. Merry.Fl s 254828db0a5eSKenneth D. Merryoption must be specified. 254928db0a5eSKenneth D. Merry.Bl -tag -width 6n 255028db0a5eSKenneth D. Merry.It Fl r 255128db0a5eSKenneth D. MerryReport the device's timestamp. 255228db0a5eSKenneth D. MerryIf no more arguments are specified, the timestamp will be reported using 255328db0a5eSKenneth D. Merrythe national representation of the date and time, followed by the time 255428db0a5eSKenneth D. Merryzone. 255528db0a5eSKenneth D. Merry.Bl -tag -width 9n 255628db0a5eSKenneth D. Merry.It Fl f Ar format 255728db0a5eSKenneth D. MerrySpecify the strftime format string, as documented in strftime(3), to be used 255828db0a5eSKenneth D. Merryto format the reported timestamp. 255928db0a5eSKenneth D. Merry.It Fl m 256028db0a5eSKenneth D. MerryReport the timestamp as milliseconds since the epoch. 256128db0a5eSKenneth D. Merry.It Fl U 256228db0a5eSKenneth D. MerryReport the timestamp using the national representation of the date and 256328db0a5eSKenneth D. Merrytime, but override the system time zone and use UTC instead. 256428db0a5eSKenneth D. Merry.El 256528db0a5eSKenneth D. Merry.El 256628db0a5eSKenneth D. Merry.Bl -tag -width 6n 256728db0a5eSKenneth D. Merry.It Fl s 256864440392SGordon BerglingSet the device's timestamp. 256964440392SGordon BerglingEither the 257028db0a5eSKenneth D. Merry.Fl f 257128db0a5eSKenneth D. Merryand 257228db0a5eSKenneth D. Merry.Fl T 257328db0a5eSKenneth D. Merryoptions or the 257428db0a5eSKenneth D. Merry.Fl U 257528db0a5eSKenneth D. Merryoption must be specified. 257628db0a5eSKenneth D. Merry.Bl -tag -width 9n 257728db0a5eSKenneth D. Merry.It Fl f Ar format 257828db0a5eSKenneth D. MerrySpecify the strptime format string, as documented in strptime(3). 257928db0a5eSKenneth D. MerryThe time must also be specified with the 258028db0a5eSKenneth D. Merry.Fl T 258128db0a5eSKenneth D. Merryoption. 2582d618624cSKenneth D. Merry.It Fl T Ar time 258328db0a5eSKenneth D. MerryProvide the time in the format specified with the 258428db0a5eSKenneth D. Merry.Fl f 258528db0a5eSKenneth D. Merryoption. 258628db0a5eSKenneth D. Merry.It Fl U 258728db0a5eSKenneth D. MerrySet the timestamp to the host system's time in UTC. 258828db0a5eSKenneth D. Merry.El 258928db0a5eSKenneth D. Merry.El 2590d455c0d0SWarner Losh.It Ic devtype 2591d455c0d0SWarner LoshPrint out the device type for specified device. 2592d455c0d0SWarner Losh.Bl -tag -width 10n 2593d455c0d0SWarner Losh.It ata 2594d455c0d0SWarner LoshAn ATA device attached directly to an ATA controller 2595d455c0d0SWarner Losh.It satl 2596d455c0d0SWarner LoshAn SATA device attached behind a SAS controller via SCSI-ATA Translation Layer (SATL) 2597d455c0d0SWarner Losh.It scsi 2598d455c0d0SWarner LoshA SCSI device 2599d455c0d0SWarner Losh.It nvme 2600d455c0d0SWarner LoshAn directly attached NVMe device 2601d455c0d0SWarner Losh.It mmcsd 2602d455c0d0SWarner LoshAn MMC or SD device attached via a mmcsd bus 2603d455c0d0SWarner Losh.It none 2604d455c0d0SWarner LoshNo device type reported 2605d455c0d0SWarner Losh.It unknown 2606d455c0d0SWarner LoshDevice type is unknown 2607d455c0d0SWarner Losh.It illegal 2608d455c0d0SWarner LoshA programming error occurred 2609d455c0d0SWarner Losh.El 261053cce2e7SWarner Losh.It Ic depop 261153cce2e7SWarner LoshCommands necessary to support the depopulation (depop) of defective elements of a device 261253cce2e7SWarner Losh(typically heads for hard drives) or setting capacity point (typically used on 261353cce2e7SWarner Loshflash drives). 261453cce2e7SWarner LoshIssues either GET PHYSICAL ELEMENT STATUS, REMOVE ELEMENT AND TRUNCATE, or RESTORE 261553cce2e7SWarner LoshELEMENT AND REBUILD command to manage storage elements of a drive. 261653cce2e7SWarner LoshRemoval or restoration of elements may take up to a day to complete. 261753cce2e7SWarner LoshOne of the 261853cce2e7SWarner Losh.Fl d , 261953cce2e7SWarner Losh.Fl l , 262053cce2e7SWarner Loshor 262153cce2e7SWarner Losh.Fl r 262253cce2e7SWarner Loshoptions must be specified. 262353cce2e7SWarner LoshThese options are mutually exclusive. 262453cce2e7SWarner LoshOnly SCSI drives are supported. 262553cce2e7SWarner LoshChanging the storage elements of a storage drive may result in the loss of all 262653cce2e7SWarner Loshdata on that storage drive. 262753cce2e7SWarner LoshThe drive may need to reinitialize after 262853cce2e7SWarner Losh.Fl d 262953cce2e7SWarner Loshor 263053cce2e7SWarner Losh.Fl r 263153cce2e7SWarner Loshcommands. 263253cce2e7SWarner LoshThe data on the drive is inaccessible until one of these commands complete. 263353cce2e7SWarner LoshOnce one of these commands start, the drive is format corrupt until the 263453cce2e7SWarner Loshoperation successfully completes. 263553cce2e7SWarner LoshWhile format corrupt, no read or write I/O is possible to the drive. 263653cce2e7SWarner LoshIf the drive power cycles, it will remain format corrupt and the operation 263753cce2e7SWarner Loshmust be restarted. 263853cce2e7SWarner LoshTEST UNIT READY or 263953cce2e7SWarner Losh.Dq camcontrol tur 264053cce2e7SWarner Loshcan monitor an in-progress depop operation. 264153cce2e7SWarner Losh.Bl -tag -width 6n 264253cce2e7SWarner Losh.It Fl c Ar capacity 264353cce2e7SWarner LoshSpecify the desired capacity point for the drive. 264453cce2e7SWarner LoshValid only for the 264553cce2e7SWarner Losh.Fl d 264653cce2e7SWarner Loshflag. 264753cce2e7SWarner Losh.It Fl d 264853cce2e7SWarner LoshRemove the physical element from service or set the capacity point specified by the 264953cce2e7SWarner Losh.Fl e 265053cce2e7SWarner Loshor 265153cce2e7SWarner Losh.Fl c 265253cce2e7SWarner Loshflags. 265353cce2e7SWarner LoshThe drive's capacity may be reduced by this operation. 265453cce2e7SWarner Losh.It Fl e Ar element 265553cce2e7SWarner LoshSpecify the physical element to remove from service. 265653cce2e7SWarner LoshValid only for the 265753cce2e7SWarner Losh.Fl d 265853cce2e7SWarner Loshflag. 265953cce2e7SWarner Losh.It Fl l 266053cce2e7SWarner LoshReport the current status of the physical elements of a drive. 266153cce2e7SWarner Losh.It Fl r 266253cce2e7SWarner LoshRestore all the eligible physical elements to service. 266353cce2e7SWarner Losh.El 266433fab22eSKenneth D. Merry.It Ic help 26655a251d70SKenneth D. MerryPrint out verbose usage information. 2666525689f1SJustin T. Gibbs.El 2667525689f1SJustin T. Gibbs.Sh ENVIRONMENT 2668525689f1SJustin T. GibbsThe 2669525689f1SJustin T. Gibbs.Ev SCSI_MODES 2670525689f1SJustin T. Gibbsvariable allows the user to specify an alternate mode page format file. 2671525689f1SJustin T. Gibbs.Pp 2672525689f1SJustin T. GibbsThe 2673525689f1SJustin T. Gibbs.Ev EDITOR 2674525689f1SJustin T. Gibbsvariable determines which text editor 26757c7fb079SRuslan Ermilov.Nm 2676525689f1SJustin T. Gibbsstarts when editing mode pages. 2677525689f1SJustin T. Gibbs.Sh FILES 2678525689f1SJustin T. Gibbs.Bl -tag -width /usr/share/misc/scsi_modes -compact 2679525689f1SJustin T. Gibbs.It Pa /usr/share/misc/scsi_modes 2680525689f1SJustin T. Gibbsis the SCSI mode format database. 2681525689f1SJustin T. Gibbs.It Pa /dev/xpt0 2682525689f1SJustin T. Gibbsis the transport layer device. 2683525689f1SJustin T. Gibbs.It Pa /dev/pass* 2684525689f1SJustin T. Gibbsare the CAM application passthrough devices. 2685525689f1SJustin T. Gibbs.El 2686525689f1SJustin T. Gibbs.Sh EXAMPLES 2687525689f1SJustin T. Gibbs.Dl camcontrol eject -n cd -u 1 -v 2688525689f1SJustin T. Gibbs.Pp 2689525689f1SJustin T. GibbsEject the CD from cd1, and print SCSI sense information if the command 2690525689f1SJustin T. Gibbsfails. 2691525689f1SJustin T. Gibbs.Pp 2692b3550398SKenneth D. Merry.Dl camcontrol tur da0 2693525689f1SJustin T. Gibbs.Pp 2694525689f1SJustin T. GibbsSend the SCSI test unit ready command to da0. 2695e1205e80SPhilippe CharnierThe 26967c7fb079SRuslan Ermilov.Nm 2697e1205e80SPhilippe Charnierutility will report whether the disk is ready, but will not display sense 2698525689f1SJustin T. Gibbsinformation if the command fails since the 2699525689f1SJustin T. Gibbs.Fl v 2700525689f1SJustin T. Gibbsswitch was not specified. 2701c7938743SMike Pritchard.Bd -literal -offset indent 2702492a2ef5SKenneth D. Merrycamcontrol tur da1 -E -C 4 -t 50 -Q head -v 2703525689f1SJustin T. Gibbs.Ed 2704525689f1SJustin T. Gibbs.Pp 27059806e231SRuslan ErmilovSend a test unit ready command to da1. 27069806e231SRuslan ErmilovEnable kernel error recovery. 27079806e231SRuslan ErmilovSpecify a retry count of 4, and a timeout of 50 seconds. 27089806e231SRuslan ErmilovEnable sense 2709525689f1SJustin T. Gibbsprinting (with the 2710525689f1SJustin T. Gibbs.Fl v 27119806e231SRuslan Ermilovflag) if the command fails. 27129806e231SRuslan ErmilovSince error recovery is turned on, the 2713525689f1SJustin T. Gibbsdisk will be spun up if it is not currently spinning. 2714e1205e80SPhilippe CharnierThe 2715492a2ef5SKenneth D. Merry.Tn SCSI 2716492a2ef5SKenneth D. Merrytask attribute for the command will be set to Head of Queue. 2717492a2ef5SKenneth D. MerryThe 27187c7fb079SRuslan Ermilov.Nm 2719e1205e80SPhilippe Charnierutility will report whether the disk is ready. 2720c7938743SMike Pritchard.Bd -literal -offset indent 2721525689f1SJustin T. Gibbscamcontrol cmd -n cd -u 1 -v -c "3C 00 00 00 00 00 00 00 0e 00" \e 2722525689f1SJustin T. Gibbs -i 0xe "s1 i3 i1 i1 i1 i1 i1 i1 i1 i1 i1 i1" 2723525689f1SJustin T. Gibbs.Ed 2724525689f1SJustin T. Gibbs.Pp 27259806e231SRuslan ErmilovIssue a READ BUFFER command (0x3C) to cd1. 27269806e231SRuslan ErmilovDisplay the buffer size of cd1, 27279806e231SRuslan Ermilovand display the first 10 bytes from the cache on cd1. 27289806e231SRuslan ErmilovDisplay SCSI sense 2729525689f1SJustin T. Gibbsinformation if the command fails. 2730c7938743SMike Pritchard.Bd -literal -offset indent 27318604fe2eSSADA Kenjicamcontrol cmd -n cd -u 1 -v -c "3B 00 00 00 00 00 00 00 0e 00" \e 2732525689f1SJustin T. Gibbs -o 14 "00 00 00 00 1 2 3 4 5 6 v v v v" 7 8 9 8 2733525689f1SJustin T. Gibbs.Ed 2734525689f1SJustin T. Gibbs.Pp 27359806e231SRuslan ErmilovIssue a WRITE BUFFER (0x3B) command to cd1. 27369806e231SRuslan ErmilovWrite out 10 bytes of data, 27379806e231SRuslan Ermilovnot including the (reserved) 4 byte header. 27389806e231SRuslan ErmilovPrint out sense information if 27399806e231SRuslan Ermilovthe command fails. 27409806e231SRuslan ErmilovBe very careful with this command, improper use may 2741525689f1SJustin T. Gibbscause data corruption. 2742c7938743SMike Pritchard.Bd -literal -offset indent 2743c60e19a8SKenneth D. Merrycamcontrol modepage da3 -m 1 -e -P 3 274494d09127SKenneth D. Merry.Ed 2745525689f1SJustin T. Gibbs.Pp 2746525689f1SJustin T. GibbsEdit mode page 1 (the Read-Write Error Recover page) for da3, and save the 27479806e231SRuslan Ermilovsettings on the drive. 27489806e231SRuslan ErmilovMode page 1 contains a disk drive's auto read and 2749525689f1SJustin T. Gibbswrite reallocation settings, among other things. 2750525689f1SJustin T. Gibbs.Pp 27515710d224SKenneth D. Merry.Dl camcontrol rescan all 27525710d224SKenneth D. Merry.Pp 2753db4fcadfSConrad MeyerRescan all SCSI buses in the system for devices that have been added, 27545710d224SKenneth D. Merryremoved or changed. 27555710d224SKenneth D. Merry.Pp 2756525689f1SJustin T. Gibbs.Dl camcontrol rescan 0 2757525689f1SJustin T. Gibbs.Pp 2758525689f1SJustin T. GibbsRescan SCSI bus 0 for devices that have been added, removed or changed. 2759525689f1SJustin T. Gibbs.Pp 2760525689f1SJustin T. Gibbs.Dl camcontrol rescan 0:1:0 2761525689f1SJustin T. Gibbs.Pp 2762525689f1SJustin T. GibbsRescan SCSI bus 0, target 1, lun 0 to see if it has been added, removed, or 2763525689f1SJustin T. Gibbschanged. 27649deea857SKenneth D. Merry.Pp 2765c60e19a8SKenneth D. Merry.Dl camcontrol tags da5 -N 24 27669deea857SKenneth D. Merry.Pp 27679deea857SKenneth D. MerrySet the number of concurrent transactions for da5 to 24. 2768c7938743SMike Pritchard.Bd -literal -offset indent 27699deea857SKenneth D. Merrycamcontrol negotiate -n da -u 4 -T disable 27709deea857SKenneth D. Merry.Ed 27719deea857SKenneth D. Merry.Pp 27729deea857SKenneth D. MerryDisable tagged queueing for da4. 2773c7938743SMike Pritchard.Bd -literal -offset indent 27749deea857SKenneth D. Merrycamcontrol negotiate -n da -u 3 -R 20.000 -O 15 -a 27759deea857SKenneth D. Merry.Ed 27769deea857SKenneth D. Merry.Pp 27779806e231SRuslan ErmilovNegotiate a sync rate of 20MHz and an offset of 15 with da3. 27789806e231SRuslan ErmilovThen send a 27799deea857SKenneth D. MerryTest Unit Ready command to make the settings take effect. 278006e79492SKenneth D. Merry.Bd -literal -offset indent 278106e79492SKenneth D. Merrycamcontrol smpcmd ses0 -v -r 4 "40 0 00 0" -R 1020 "s9 i1" 278206e79492SKenneth D. Merry.Ed 278306e79492SKenneth D. Merry.Pp 278406e79492SKenneth D. MerrySend the SMP REPORT GENERAL command to ses0, and display the number of PHYs 278506e79492SKenneth D. Merryit contains. 278606e79492SKenneth D. MerryDisplay SMP errors if the command fails. 27871146874aSSteven Hartland.Bd -literal -offset indent 27881146874aSSteven Hartlandcamcontrol security ada0 27891146874aSSteven Hartland.Ed 27901146874aSSteven Hartland.Pp 27911146874aSSteven HartlandReport security support and settings for ada0 27921146874aSSteven Hartland.Bd -literal -offset indent 279391804910SGavin Atkinsoncamcontrol security ada0 -U user -s MyPass 27941146874aSSteven Hartland.Ed 27951146874aSSteven Hartland.Pp 27961146874aSSteven HartlandEnable security on device ada0 with the password MyPass 27971146874aSSteven Hartland.Bd -literal -offset indent 279891804910SGavin Atkinsoncamcontrol security ada0 -U user -e MyPass 27991146874aSSteven Hartland.Ed 28001146874aSSteven Hartland.Pp 28011146874aSSteven HartlandSecure erase ada0 which has had security enabled with user password MyPass 28021146874aSSteven Hartland.Pp 28031146874aSSteven Hartland.Em WARNING! WARNING! WARNING! 28041146874aSSteven Hartland.Pp 28051146874aSSteven HartlandThis will 28061146874aSSteven Hartland.Em ERASE ALL 28071146874aSSteven Hartlanddata from the device, so backup your data before using! 28081146874aSSteven Hartland.Pp 28095bb17266SJoel DahlThis command can be used against an SSD drive to restoring it to 28101146874aSSteven Hartlandfactory default write performance. 28119e68761cSSteven Hartland.Bd -literal -offset indent 28129e68761cSSteven Hartlandcamcontrol hpa ada0 28139e68761cSSteven Hartland.Ed 28149e68761cSSteven Hartland.Pp 28159e68761cSSteven HartlandReport HPA support and settings for ada0 (also reported via 28169e68761cSSteven Hartlandidentify). 28179e68761cSSteven Hartland.Bd -literal -offset indent 28189e68761cSSteven Hartlandcamcontrol hpa ada0 -s 10240 28199e68761cSSteven Hartland.Ed 28209e68761cSSteven Hartland.Pp 28219e68761cSSteven HartlandEnables HPA on ada0 setting the maximum reported sectors to 10240. 28229e68761cSSteven Hartland.Pp 28239e68761cSSteven Hartland.Em WARNING! WARNING! WARNING! 28249e68761cSSteven Hartland.Pp 28259e68761cSSteven HartlandThis will 28269e68761cSSteven Hartland.Em PREVENT ACCESS 28279e68761cSSteven Hartlandto all data on the device beyond this limit until HPA is disabled by setting 28289e68761cSSteven HartlandHPA to native max sectors of the device, which can only be done after a 28299e68761cSSteven Hartlandpower-on or hardware reset! 28309e68761cSSteven Hartland.Pp 28319e68761cSSteven Hartland.Em DO NOT 28329e68761cSSteven Hartlanduse this on a device which has an active filesystem! 283308df2e3eSKenneth D. Merry.Bd -literal -offset indent 283408df2e3eSKenneth D. Merrycamcontrol persist da0 -v -i read_keys 283508df2e3eSKenneth D. Merry.Ed 283608df2e3eSKenneth D. Merry.Pp 283708df2e3eSKenneth D. MerryThis will read any persistent reservation keys registered with da0, and 283808df2e3eSKenneth D. Merrydisplay any errors encountered when sending the PERSISTENT RESERVE IN 283908df2e3eSKenneth D. Merry.Tn SCSI 284008df2e3eSKenneth D. Merrycommand. 284108df2e3eSKenneth D. Merry.Bd -literal -offset indent 284208df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o register -a -K 0x12345678 284308df2e3eSKenneth D. Merry.Ed 284408df2e3eSKenneth D. Merry.Pp 284508df2e3eSKenneth D. MerryThis will register the persistent reservation key 0x12345678 with da0, 284608df2e3eSKenneth D. Merryapply that registration to all ports on da0, and display any errors that 284708df2e3eSKenneth D. Merryoccur when sending the PERSISTENT RESERVE OUT command. 284808df2e3eSKenneth D. Merry.Bd -literal -offset indent 284908df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o reserve -s lun -k 0x12345678 -T ex_ac 285008df2e3eSKenneth D. Merry.Ed 285108df2e3eSKenneth D. Merry.Pp 285208df2e3eSKenneth D. MerryThis will reserve da0 for the exlusive use of the initiator issuing the 285308df2e3eSKenneth D. Merrycommand. 285408df2e3eSKenneth D. MerryThe scope of the reservation is the entire LUN. 285508df2e3eSKenneth D. MerryAny errors sending the PERSISTENT RESERVE OUT command will be displayed. 285608df2e3eSKenneth D. Merry.Bd -literal -offset indent 285708df2e3eSKenneth D. Merrycamcontrol persist da0 -v -i read_full 285808df2e3eSKenneth D. Merry.Ed 285908df2e3eSKenneth D. Merry.Pp 286008df2e3eSKenneth D. MerryThis will display the full status of all reservations on da0 and print out 286108df2e3eSKenneth D. Merrystatus if there are any errors. 286208df2e3eSKenneth D. Merry.Bd -literal -offset indent 286308df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o release -k 0x12345678 -T ex_ac 286408df2e3eSKenneth D. Merry.Ed 286508df2e3eSKenneth D. Merry.Pp 286608df2e3eSKenneth D. MerryThis will release a reservation on da0 of the type ex_ac 286708df2e3eSKenneth D. Merry(Exclusive Access). 286808df2e3eSKenneth D. MerryThe Reservation Key for this registration is 0x12345678. 286908df2e3eSKenneth D. MerryAny errors that occur will be displayed. 287008df2e3eSKenneth D. Merry.Bd -literal -offset indent 287108df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o register -K 0x12345678 -S \e 287208df2e3eSKenneth D. Merry -I sas,0x1234567812345678 -I sas,0x8765432187654321 287308df2e3eSKenneth D. Merry.Ed 287408df2e3eSKenneth D. Merry.Pp 287508df2e3eSKenneth D. MerryThis will register the key 0x12345678 with da0, specifying that it applies 287608df2e3eSKenneth D. Merryto the SAS initiators with SAS addresses 0x1234567812345678 and 287708df2e3eSKenneth D. Merry0x8765432187654321. 287808df2e3eSKenneth D. Merry.Bd -literal -offset indent 287908df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o register_move -k 0x87654321 \e 288008df2e3eSKenneth D. Merry -K 0x12345678 -U -p -R 2 -I fcp,0x1234567812345678 288108df2e3eSKenneth D. Merry.Ed 288208df2e3eSKenneth D. Merry.Pp 288308df2e3eSKenneth D. MerryThis will move the registration from the current initiator, whose 288408df2e3eSKenneth D. MerryRegistration Key is 0x87654321, to the Fibre Channel initiator with the 288508df2e3eSKenneth D. MerryFiber Channel World Wide Node Name 0x1234567812345678. 288608df2e3eSKenneth D. MerryA new registration key, 0x12345678, will be registered for the initiator 288708df2e3eSKenneth D. Merrywith the Fibre Channel World Wide Node Name 0x1234567812345678, and the 288808df2e3eSKenneth D. Merrycurrent initiator will be unregistered from the target. 288908df2e3eSKenneth D. MerryThe reservation will be moved to relative target port 2 on the target 289008df2e3eSKenneth D. Merrydevice. 289108df2e3eSKenneth D. MerryThe registration will persist across power losses. 28925672fac9SKenneth D. Merry.Bd -literal -offset indent 28935672fac9SKenneth D. Merrycamcontrol attrib sa0 -v -i attr_values -p 1 28945672fac9SKenneth D. Merry.Ed 28955672fac9SKenneth D. Merry.Pp 28965672fac9SKenneth D. MerryThis will read and decode the attribute values from partition 1 on the tape 28975672fac9SKenneth D. Merryin tape drive sa0, and will display any 28985672fac9SKenneth D. Merry.Tn SCSI 28995672fac9SKenneth D. Merryerrors that result. 29009a6844d5SKenneth D. Merry.Bd -literal -offset indent 29019a6844d5SKenneth D. Merrycamcontrol zone da0 -v -c rz -P summary 29029a6844d5SKenneth D. Merry.Ed 29039a6844d5SKenneth D. Merry.Pp 29049a6844d5SKenneth D. MerryThis will request the SMR zone list from disk da0, and print out a 29059a6844d5SKenneth D. Merrysummary of the zone parameters, and display any 29069a6844d5SKenneth D. Merry.Tn SCSI 29079a6844d5SKenneth D. Merryor 29089a6844d5SKenneth D. Merry.Tn ATA 29099a6844d5SKenneth D. Merryerrors that result. 29109a6844d5SKenneth D. Merry.Bd -literal -offset indent 29119a6844d5SKenneth D. Merrycamcontrol zone da0 -v -c rz -o reset 29129a6844d5SKenneth D. Merry.Ed 29139a6844d5SKenneth D. Merry.Pp 29149a6844d5SKenneth D. MerryThis will request the list of SMR zones that should have their write 29159a6844d5SKenneth D. Merrypointer reset from the disk da0, and display any 29169a6844d5SKenneth D. Merry.Tn SCSI 29179a6844d5SKenneth D. Merryor 29189a6844d5SKenneth D. Merry.Tn ATA 29199a6844d5SKenneth D. Merryerrors that result. 29209a6844d5SKenneth D. Merry.Bd -literal -offset indent 29219a6844d5SKenneth D. Merrycamcontrol zone da0 -v -c rwp -l 0x2c80000 29229a6844d5SKenneth D. Merry.Ed 29239a6844d5SKenneth D. Merry.Pp 29249a6844d5SKenneth D. MerryThis will issue the Reset Write Pointer command to disk da0 for the zone 29259a6844d5SKenneth D. Merrythat starts at LBA 0x2c80000 and display any 29269a6844d5SKenneth D. Merry.Tn SCSI 29279a6844d5SKenneth D. Merryor 29289a6844d5SKenneth D. Merry.Tn ATA 29299a6844d5SKenneth D. Merryerrors that result. 29309a6844d5SKenneth D. Merry.Bd -literal -offset indent 29319a6844d5SKenneth D. Merrycamcontrol epc ada0 -c timer -T 60.1 -p Idle_a -e -s 29329a6844d5SKenneth D. Merry.Ed 29339a6844d5SKenneth D. Merry.Pp 29349a6844d5SKenneth D. MerrySet the timer for the Idle_a power condition on drive 29359a6844d5SKenneth D. Merry.Pa ada0 29369a6844d5SKenneth D. Merryto 60.1 seconds, enable that particular power condition, and save the timer 29379a6844d5SKenneth D. Merryvalue and the enabled state of the power condition. 29389a6844d5SKenneth D. Merry.Bd -literal -offset indent 29399a6844d5SKenneth D. Merrycamcontrol epc da4 -c goto -p Standby_z -H 29409a6844d5SKenneth D. Merry.Ed 29419a6844d5SKenneth D. Merry.Pp 29429a6844d5SKenneth D. MerryTell drive 29439a6844d5SKenneth D. Merry.Pa da4 29449a6844d5SKenneth D. Merryto go to the Standby_z power state (which is 29459a6844d5SKenneth D. Merrythe drive's lowest power state) and hold in that state until it is 29469a6844d5SKenneth D. Merryexplicitly released by another 29479a6844d5SKenneth D. Merry.Cm goto 29489a6844d5SKenneth D. Merrycommand. 29499a6844d5SKenneth D. Merry.Bd -literal -offset indent 29509a6844d5SKenneth D. Merrycamcontrol epc da2 -c status -P 29519a6844d5SKenneth D. Merry.Ed 29529a6844d5SKenneth D. Merry.Pp 29539a6844d5SKenneth D. MerryReport only the power state of 29549a6844d5SKenneth D. Merrydrive 29559a6844d5SKenneth D. Merry.Pa da2 . 29569a6844d5SKenneth D. MerrySome drives will power up in response to the commands sent by the 29579a6844d5SKenneth D. Merry.Pa status 29589a6844d5SKenneth D. Merrysubcommand, and the 29599a6844d5SKenneth D. Merry.Fl P 29609a6844d5SKenneth D. Merryoption causes 29619a6844d5SKenneth D. Merry.Nm 29629a6844d5SKenneth D. Merryto only send the 29639a6844d5SKenneth D. Merry.Tn ATA 29649a6844d5SKenneth D. MerryCHECK POWER MODE command, which should not trigger a change in the drive's 29659a6844d5SKenneth D. Merrypower state. 29669a6844d5SKenneth D. Merry.Bd -literal -offset indent 29679a6844d5SKenneth D. Merrycamcontrol epc ada0 -c list 29689a6844d5SKenneth D. Merry.Ed 29699a6844d5SKenneth D. Merry.Pp 29709a6844d5SKenneth D. MerryDisplay the ATA Power Conditions log (Log Address 0x08) for 29719a6844d5SKenneth D. Merrydrive 29729a6844d5SKenneth D. Merry.Pa ada0 . 297328db0a5eSKenneth D. Merry.Bd -literal -offset indent 2974d618624cSKenneth D. Merrycamcontrol timestamp sa0 -s -f "%a, %d %b %Y %T %z" \e 2975d618624cSKenneth D. Merry -T "Wed, 26 Oct 2016 21:43:57 -0600" 297628db0a5eSKenneth D. Merry.Ed 297728db0a5eSKenneth D. Merry.Pp 297828db0a5eSKenneth D. MerrySet the timestamp of drive 297928db0a5eSKenneth D. Merry.Pa sa0 298028db0a5eSKenneth D. Merryusing a 298128db0a5eSKenneth D. Merry.Xr strptime 3 298228db0a5eSKenneth D. Merryformat string followed by a time string 298328db0a5eSKenneth D. Merrythat was created using this format string. 2984525689f1SJustin T. Gibbs.Sh SEE ALSO 2985525689f1SJustin T. Gibbs.Xr cam 3 , 29869deea857SKenneth D. Merry.Xr cam_cdbparse 3 , 2987c0bdb22bSMatthew Hunt.Xr cam 4 , 2988525689f1SJustin T. Gibbs.Xr pass 4 , 298928b475b0SEdward Tomasz Napierala.Xr xpt 4 , 29902675b8bdSTom Hukins.Xr diskinfo 8 , 299128b475b0SEdward Tomasz Napierala.Xr trim 8 , 299228b475b0SEdward Tomasz Napierala.Xr zonectl 8 2993525689f1SJustin T. Gibbs.Sh HISTORY 2994525689f1SJustin T. GibbsThe 29957c7fb079SRuslan Ermilov.Nm 2996e1205e80SPhilippe Charnierutility first appeared in 2997525689f1SJustin T. Gibbs.Fx 3.0 . 2998525689f1SJustin T. Gibbs.Pp 2999525689f1SJustin T. GibbsThe mode page editing code and arbitrary SCSI command code are based upon 3000525689f1SJustin T. Gibbscode in the old 3001525689f1SJustin T. Gibbs.Xr scsi 8 3002525689f1SJustin T. Gibbsutility and 3003525689f1SJustin T. Gibbs.Xr scsi 3 30049806e231SRuslan Ermilovlibrary, written by Julian Elischer and Peter Dufault. 30059806e231SRuslan ErmilovThe 3006525689f1SJustin T. Gibbs.Xr scsi 8 3007753d686dSRuslan Ermilovprogram first appeared in 3008753d686dSRuslan Ermilov.Bx 386 0.1.2.4 , 3009753d686dSRuslan Ermilovand first appeared in 301033fab22eSKenneth D. Merry.Fx 3011525689f1SJustin T. Gibbsin 3012525689f1SJustin T. Gibbs.Fx 2.0.5 . 3013525689f1SJustin T. Gibbs.Sh AUTHORS 3014bd0891ceSBaptiste Daroussin.An Kenneth Merry Aq Mt ken@FreeBSD.org 3015525689f1SJustin T. Gibbs.Sh BUGS 30160227791bSRuslan ErmilovThe code that parses the generic command line arguments does not know that 30179806e231SRuslan Ermilovsome of the subcommands take multiple arguments. 30189806e231SRuslan ErmilovSo if, for instance, you 3019525689f1SJustin T. Gibbstried something like this: 3020c7938743SMike Pritchard.Bd -literal -offset indent 3021b9e3972aSKenneth D. Merrycamcontrol cmd -n da -u 1 -c "00 00 00 00 00 v" 0x00 -v 3022525689f1SJustin T. Gibbs.Ed 3023525689f1SJustin T. Gibbs.Pp 3024525689f1SJustin T. GibbsThe sense information from the test unit ready command would not get 3025525689f1SJustin T. Gibbsprinted out, since the first 3026525689f1SJustin T. Gibbs.Xr getopt 3 3027525689f1SJustin T. Gibbscall in 30287c7fb079SRuslan Ermilov.Nm 3029525689f1SJustin T. Gibbsbails out when it sees the second argument to 3030525689f1SJustin T. Gibbs.Fl c 3031c4d9468eSRuslan Ermilov(0x00), 30329806e231SRuslan Ermilovabove. 30339806e231SRuslan ErmilovFixing this behavior would take some gross code, or changes to the 3034525689f1SJustin T. Gibbs.Xr getopt 3 30359806e231SRuslan Ermilovinterface. 30369806e231SRuslan ErmilovThe best way to circumvent this problem is to always make sure 3037525689f1SJustin T. Gibbsto specify generic 30387c7fb079SRuslan Ermilov.Nm 3039525689f1SJustin T. Gibbsarguments before any command-specific arguments. 3040