OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / 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)