This file is indexed.

/usr/share/doc/HOWTO/ja-html/SCSI-Programming-HOWTO-4.html is in doc-linux-ja-html 2006.05.25-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
 <TITLE>The Linux SCSI programming HOWTO: $B;HMQ$K$"$?$C$FI,MW$J$b$N$O!)(B</TITLE>
 <LINK HREF="SCSI-Programming-HOWTO-5.html" REL=next>
 <LINK HREF="SCSI-Programming-HOWTO-3.html" REL=previous>
 <LINK HREF="SCSI-Programming-HOWTO.html#toc4" REL=contents>
</HEAD>
<BODY>
<A HREF="SCSI-Programming-HOWTO-5.html">$B<!$N%Z!<%8(B</A>
<A HREF="SCSI-Programming-HOWTO-3.html">$BA0$N%Z!<%8(B</A>
<A HREF="SCSI-Programming-HOWTO.html#toc4">$BL\<!$X(B</A>
<HR>
<H2><A NAME="s4">4.</A> <A HREF="SCSI-Programming-HOWTO.html#toc4">$B;HMQ$K$"$?$C$FI,MW$J$b$N$O!)(B</A></H2>


<H2><A NAME="ss4.1">4.1</A> <A HREF="SCSI-Programming-HOWTO.html#toc4.1">$B%+!<%M%k$N%3%s%U%#%.%e%l!<%7%g%s(B</A>
</H2>


<P>$B$"$J$?$,(B Linux $B$K$h$C$F%5%]!<%H$5$l$F$$$k(B SCSI $B%3%s%H%m!<%i$r;}$C$F$$(B
$B$J$1$l$P$J$i$J$$$N$OL@$i$+$G$9!#2C$($F!"$"$J$?$N%+!<%M%k$KHFMQ(B SCSI $B%5(B
$B%]!<%H$@$1$G$J$/%3%s%H%m!<%i$N%5%]!<%H$bAH9~$^$M$P$J$j$^$;$s!#(B Linux 
$B%+!<%M%k$N(B(/usr/src/linux $B$G$N(B <CODE>make config</CODE> $B$K$h$k(B)$B%3%s%U%#%.%e%l!<(B
$B%7%g%s$OE57?E*$K$O<!$N$h$&$K$J$j$^$9!#(B</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
 ...
*
* SCSI support
*
SCSI support? (CONFIG_SCSI) [n] y
*
* SCSI support type (disk, tape, CDrom)
*
 ...
Scsi generic support (CONFIG_CHR_DEV_SG) [n] y
*
* SCSI low-level drivers
*
 ...
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>$B$b$7MxMQ$G$-$k$J$i$P!"Be$o$j$K%b%8%e!<%k$r:n@.$7$F$b$+$^$$$^$;$s!#(B
[$BLuCm(B]
<PRE>
make menuconfig
</PRE>
$B$r;HMQ$9$kJ}$,IaDL$O3Z$G$9!#(B</P>

<H2><A NAME="ss4.2">4.2</A> <A HREF="SCSI-Programming-HOWTO.html#toc4.2">$B%G%P%$%9%U%!%$%k(B</A>
</H2>


<P>$BHFMQ(B SCSI $B%I%i%$%P$O!"B>$N(B SCSI $B%G%P%$%9%I%i%$%P$K$h$C$FMQ$$$i$l$k$b$N$H$OJL$N!"8GM-$N%G%P%$%9%U%!%$%k$r;HMQ$7$^$9!#(B
$B$=$l$i$N%G%P%$%9%U%!%$%k$O!"DL>o$O(B <CODE>/dev</CODE>$B%G%#%l%/%H%j$K$"$k!"(B<CODE>MAKEDEV</CODE> $B%9%/%j%W%H$K$h$C$F@8@.$9$k$3$H$,$G$-$^$9!#(B<CODE>MAKEDEV sg</CODE>$B$rAv$i$;$k$H0J2<$N%U%!%$%k$,:n@.$5$l$^$9!'(B</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
crw-------   1 root     system    21,   0 Aug 20 20:09 /dev/sga
crw-------   1 root     system    21,   1 Aug 20 20:09 /dev/sgb
crw-------   1 root     system    21,   2 Aug 20 20:09 /dev/sgc
crw-------   1 root     system    21,   3 Aug 20 20:09 /dev/sgd
crw-------   1 root     system    21,   4 Aug 20 20:09 /dev/sge
crw-------   1 root     system    21,   5 Aug 20 20:09 /dev/sgf
crw-------   1 root     system    21,   6 Aug 20 20:09 /dev/sgg
crw-------   1 root     system    21,   7 Aug 20 20:09 /dev/sgh
                                   |    |
                               major,   minor device numbers
                            $B%a%8%c!<(B,   $B%^%$%J!<(B  $B%G%P%$%9HV9f(B
</PRE>
</CODE></BLOCKQUOTE>
</P>

<P>$B$3$l$i$OD>$K%"%/%;%9$9$k$?$a$K%-%c%i%/%?%G%P%$%9$G$"$k$3$H$KCm0U$7$F$/(B
$B$@$5$$!#%7%9%F%`$K$h$C$F$O$3$l$i$N%G%P%$%9$O(B <CODE>/dev/{sg0,
sg1,...}</CODE> $B$H8F$P$l$F$$$k$+$b$7$l$^$;$s$,!"%$%s%9%H!<%k$7$?$b$N(B($BLu(B
$BCm(B:Slackware,RedHat,Debian$B$J$I$N%Q%C%1!<%8(B)$B$K0MB8$7$^$9$N$G!"0J2<$NNc(B
$B$OE,Ev$KFI$_49$($F$/$@$5$$!#(B</P>

<H2><A NAME="ss4.3">4.3</A> <A HREF="SCSI-Programming-HOWTO.html#toc4.3">$B%G%P%$%9$NBP1~IU$1(B</A>
</H2>


<P>$B$3$l$i$N%G%P%$%9%U%!%$%k$O(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P>$B$H$J$j$^$9!#(B</P>

<P>ID 5 $B$K4X$9$kJQ2=$KCm0U$7$^$7$g$&!#BP1~$9$k%G%P%$%9(B($B%U%!%$%k(B)$B$O$b$O$d(B
<CODE>/dev/sgc</CODE>$B$G$O$J$/$F!":#$d(B<CODE>/dev/sgd</CODE>$B$N2<$KBP1~$5$;$i$l$F(B
$B$$$^$9!#(B</P>

<P>$B9,$$$K$b!"?7$7$$%+!<%M%k$G$O=gHV$rJQ99$9$k$3$H$,$G$-$^$9!#(B</P>

<H3>SCSI $BAuCV$NF0E*$JA^F~$H:o=|(B</H3>


<P>$B?7$7$$%+!<%M%k$H(B<CODE>/proc</CODE>$B%U%!%$%k%7%9%F%`$,Av$C$F$$$k$J$i$P!";HMQ(B
$B$5$l$F$$$J$$AuCV$r%7%9%F%`2TF/Cf$K<h$j30$7$?$jF3F~$9$k$3$H$,$G$-$^$9!#(B</P>

<P>SCSI $BAuCV$r<h$j30$9$K$O!'(B
<BLOCKQUOTE><CODE>
<PRE>
echo "scsi remove-single-device a b c d" > /proc/scsi/scsi
</PRE>
</CODE></BLOCKQUOTE>
</P>

<P>$BF1MM$K$7$F!"(BSCSI $BAuCV$rDI2C$9$k$K$O!"(B
<BLOCKQUOTE><CODE>
<PRE>
echo "scsi add-single-device a b c d" > /proc/scsi/scsi
</PRE>
</CODE></BLOCKQUOTE>

$B$H$7$^$9!#(B</P>

<P>$B$3$3$G(B
<BLOCKQUOTE><CODE>
<PRE>
      a == $B%[%9%H%"%@%W%?$NHV9f(B ($B:G=i$N$b$N$,(B 0)
      b == $B%[%9%H%"%@%W%?>e$N(B SCSI $B%A%c%M%k(B ($B:G=i$N$b$N$,(B 0)
      c == ID
      d == LUN ($B:G=i$N$b$N$,(B 0)
</PRE>
</CODE></BLOCKQUOTE>
</P>

<P>$B$G$9$+$iA0=R$NNc$K$*$1$k(B <CODE>/dev/sgc</CODE> $B$H(B <CODE>/dev/sgd</CODE> $B$NBP1~IU$1$rF~$lBX$($k$?$a$K$O!"<!$N$h$&$K$9$l$P$G$-$k$G$7$g$&!#(B
[$BLuCm!'(B<CODE>cat /proc/scsi/scsi</CODE>$B$r<B9T$9$l$P!"$3$l$i$N(B4$B$D$NCM$K$J$K$r@_Dj$9$l$P$$$$$+$,$D$+$a$k$H;W$$$^$9!#(B]</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
echo "scsi remove-single-device 0 0 4 0" > /proc/scsi/scsi
echo "scsi remove-single-device 0 0 5 0" > /proc/scsi/scsi
echo "scsi add-single-device 0 0 5 0" > /proc/scsi/scsi
echo "scsi add-single-device 0 0 4 0" > /proc/scsi/scsi
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>$B$J$<$J$i!"HFMQ%G%P%$%9$O$=$l$i$,A^F~$5$l$?=gHV$GBP1~IU$1$i$l$k$+$i$G$9!#(B</P>

<P>$B$5$i$KAuCV$r(B SCSI $B%P%9$KDI2C$9$k$H$-$O!"?7$7$$AuCV$K$OEPO?$G$-$kM=Hw$,(B
$B8B$i$l$F$$$k$3$H$r?4$KN1$a$F$*$-$^$7$g$&!#$3$N%a%b%j$O%V!<%H;~$K3dEv$F(B
$B$i$l!"Fs$D$NAuCV$r2C$($k$?$a$NM>CO$,$"$j$^$9!#(B</P>
<P>[$BLuCm(B]initrd$B5!9=$HAH$_9g$o$;$k$3$H$K$h$j!"$3$N;EAH$_$rMQ$$$F5!4o9=@.$NJQ2=$KBP$7=@Fp$J%7%9%F%`$r9=C[$9$k$3$H$,$G$-$k$G$7$g$&!#(B</P>


<HR>
<A HREF="SCSI-Programming-HOWTO-5.html">$B<!$N%Z!<%8(B</A>
<A HREF="SCSI-Programming-HOWTO-3.html">$BA0$N%Z!<%8(B</A>
<A HREF="SCSI-Programming-HOWTO.html#toc4">$BL\<!$X(B</A>
</BODY>
</HTML>