OSDN Git Service

3be6d912df6ce64354a5a818065ead5b411242b4
[linuxjm/LDP_man-pages.git] / draft / man4 / sd.4
1 .\" sd.4
2 .\" Copyright 1992 Rickard E. Faith (faith@cs.unc.edu)
3 .\"
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\"
24 .\" Japanese Version Copyright (c) 1996,1997 ISHIKAWA Mutsumi
25 .\"         all rights reserved.
26 .\" Translated 1997-02-06, ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
27 .\" Updated 2005-11-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
28 .\"
29 .\" WORD:       pointer         ポインタ
30 .\" WORD:       structure       構造体
31 .\" WORD:       geometry        ジオメトリ
32 .\" WORD:       sector          セクタ
33 .\" WORD:       implement       実装
34 .\" WORD:       raw device      ローデバイス
35 .\"
36 .TH SD 4 1992-12-17 "Linux" "Linux Programmer's Manual"
37 .\"O .SH NAME
38 .SH 名前
39 .\"O sd \- Driver for SCSI Disk Drives
40 sd \- SCSI ディスクドライブのためのドライバ
41 .\"O .SH SYNOPSIS
42 .SH 書式
43 .nf
44 .BR "#include <linux/hdreg.h>        " "/* for HDIO_GETGEO */"
45 .BR "#include <linux/fs.h>           " "/* for BLKGETSIZE and BLKRRPART */"
46 .fi
47 .\"O .SH CONFIGURATION
48 .SH 設定
49 .\"O The block device name has the following form:
50 .\"O .BI sd lp,
51 .\"O where
52 .\"O .I l
53 .\"O is a letter denoting the physical drive, and
54 .\"O .I p
55 .\"O is a number denoting the partition on that physical drive.
56 .\"O Often, the partition number,
57 .\"O .IR p ,
58 .\"O will be left off when the device corresponds to the whole drive.
59 このブロックデバイス (block device) の名前は、次のような形式をとる:
60 .BI sd lp,
61 このうち、
62 .I l
63 は物理ドライブを意味する文字であり、
64 .I p
65 はその物理ドライブ上のパーティション (partition) を意味する数字である。
66 パーティションナンバー
67 .I p
68 がない場合は、そのデバイスファイルはドライブ全体をさす。
69
70 .\"O SCSI disks have a major device number of 8, and a minor device number of
71 .\"O the form (16 *
72 .\"O .IR drive_number ") + " partition_number ,
73 .\"O where
74 .\"O .I drive_number
75 .\"O is the number of the physical drive in order of detection, and
76 .\"O .I partition_number
77 .\"O is as follows:
78 SCSI ディスクはメジャーナンバー 8 を持ち、次のような形式のマイナーナンバー
79 を持つ。(16 *
80 .IR drive_number ") + " partition_number 、
81 この
82 .I drive_number
83 は検出された物理ドライブの番号であり、
84 .I partition_number
85 は次のようになる:
86 .sp
87 .\"O partition 0 is the whole drive
88 .\"O .br
89 .\"O partitions 1-4 are the DOS "primary" partitions
90 .\"O .br
91 .\"O partitions 5-8 are the DOS "extended" (or "logical") partitions
92 パーティション 0 はドライブ全体
93 .br
94 パーティション 1 〜 4 は DOS の "基本 (primary)" パーティション
95 .br
96 パーティション 5 〜 8 は DOS の "拡張 (extended)" (または、"論理
97 (logical)") パーティション。
98
99 .\"O For example,
100 .\"O .I /dev/sda
101 .\"O will have major 8, minor 0, and will refer to all of the first SCSI drive
102 .\"O in the system; and
103 .\"O .I /dev/sdb3
104 .\"O will have major 8, minor 19, and will refer to the third DOS "primary"
105 .\"O partition on the second SCSI drive in the system.
106 例えば、
107 .I /dev/sda
108 はメジャーナンバー 8 マイナーナンバー 0 を持ち、システムの最初の SCSI
109 ドライブ全体を参照する。そして、
110 .I /dev/sdb3
111 はメジャーナンバー 8 マイナーナンバー 19 を持ち、システムの二つ目の
112 SCSI ドライブの三番目の DOS "基本" パーティションを参照する。
113
114 .\"O At this time, only block devices are provided.
115 .\"O Raw devices have not yet been implemented.
116 現在は、ブロックデバイスだけが提供されている。ロー・デバイス (raw device)
117 はまだ実装されていない。
118 .\"O .SH DESCRIPTION
119 .SH 説明
120 .\"O The following
121 .\"O .IR ioctl s
122 .\"O are provided:
123 次の
124 .I ioctl
125 が提供されている:
126 .TP
127 .B HDIO_GETGEO
128 .RS
129 .\"O Returns the BIOS disk parameters in the following structure:
130 次のような構造体を用いて BIOS のディスクパラメータを返す:
131 .in +4n
132 .nf
133
134 struct hd_geometry {
135     unsigned char  heads;
136     unsigned char  sectors;
137     unsigned short cylinders;
138     unsigned long  start;
139 };
140 .fi
141 .in
142
143 .\"O A pointer to this structure is passed as the
144 .\"O .BR ioctl (2)
145 .\"O parameter.
146 この構造体へのポインタが
147 .BR ioctl (2)
148 へのパラメータとして渡される。
149
150 .\"O The information returned in the parameter is the disk geometry of the drive
151 .\"O .I "as understood by DOS!"
152 .\"O This geometry is
153 .\"O .I not
154 .\"O the physical geometry of the drive.
155 .\"O It is used when constructing the
156 .\"O drive's partition table, however, and is needed for convenient operation
157 .\"O of
158 .\"O .BR fdisk (1),
159 .\"O .BR efdisk (1),
160 .\"O and
161 .\"O .BR lilo (1).
162 .\"O If the geometry information is not available, zero will be returned for all
163 .\"O of the parameters.
164 このパラメータに入れられて返される情報は、
165 .I "DOS によって理解されるような"
166 ドライブのジオメトリである。
167 このジオメトリは、ドライブの物理的なジオメトリ
168 .I ではない。
169 この情報はドライブのパーティションテーブルを作成する時に用いられる、
170 また、
171 .BR fdisk (1),
172 .BR efdisk (1),
173 .BR lilo (1)
174 の適切な操作に必要である。
175 もし、ジオメトリの情報が得られなければ、それぞれの値全てにゼロが入れ
176 られて返される。
177 .RE
178 .TP
179 .B BLKGETSIZE
180 .\"O Returns the device size in sectors.
181 .\"O The
182 .\"O .BR ioctl (2)
183 .\"O parameter should be a pointer to a
184 .\"O .IR long .
185 セクタの数で表したデバイスのサイズが返される。
186 .BR ioctl (2)
187 のパラメータは、
188 .I long
189 へのポインタでなければならない。
190 .TP
191 .B BLKRRPART
192 .\"O Forces a reread of the SCSI disk partition tables.
193 .\"O No parameter is needed.
194 強制的に、SCSI ディスクのパーティションテーブルの再読み込みを行う。
195 パラメータは必要ない。
196
197 .\"O The
198 .\"O .BR scsi (4)
199 .\"O .BR ioctl (2)
200 .\"O operations are also supported.
201 .\"O If the
202 .\"O .BR ioctl (2)
203 .\"O parameter is required, and it is NULL, then
204 .\"O .BR ioctl (2)
205 .\"O will fail with the error
206 .\"O .BR EINVAL .
207 .BR scsi (4)
208
209 .BR ioctl (2)
210 操作も同様にサポートされる。
211 .BR ioctl (2)
212 のパラメータが必要で、それが NULL ならば、
213 .BR ioctl (2)
214 はエラー
215 .B EINVAL
216 で失敗する。
217 .\"O .SH FILES
218 .SH ファイル
219 .\"O /dev/sd[a\-h]: the whole device
220 /dev/sd[a\-h]: ドライブ全体
221 .br
222 .\"O /dev/sd[a\-h][0\-8]: individual block partitions
223 /dev/sd[a\-h][0\-8]: 個々のブロックパーティション
224 .\"O .\".SH "SEE ALSO"
225 .\" .SH 関連項目
226 .\"O .\".BR scsi (4)
227 .\" .BR scsi (4)