.\" sd.4 .\" Copyright 1992 Rickard E. Faith (faith@cs.unc.edu) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1996,1997 ISHIKAWA Mutsumi .\" all rights reserved. .\" Translated 1997-02-06, ISHIKAWA Mutsumi .\" Updated 2005-11-19, Akihiro MOTOKI .\" .TH SD 4 " 2017\-09\-15" Linux "Linux Programmer's Manual" .SH 名前 sd \- SCSI ディスクドライブのためのドライバ .SH 書式 .nf \fB#include \fP/* for HDIO_GETGEO */ \fB#include \fP/* for BLKGETSIZE and BLKRRPART */ .fi .SH 設定 このブロックデバイス (block device) の名前は、次のような形式をとる: \fBsd\fP\fIlp,\fP このうち、 \fIl\fP は物理ドライブを意味する文字であり、 \fIp\fP はその物理ドライブ上のパーティション (partition) を意味する数字である。 パーティションナンバー \fIp\fP がない場合は、そのデバイスファイルはドライブ全体をさす。 .PP SCSI ディスクはメジャーナンバー 8 を持ち、次のような形式のマイナーナンバー を持つ。(16 * \fIdrive_number\fP) + \fIpartition_number\fP、 この \fIdrive_number\fP は検出された物理ドライブの番号であり、 \fIpartition_number\fP は次のようになる: .IP " +3" パーティション 0 はドライブ全体 .IP パーティション 1 〜 4 は DOS の "基本 (primary)" パーティション .IP パーティション 5 〜 8 は DOS の "拡張 (extended)" (または、"論理 (logical)") パーティション。 .PP 例えば、 \fI/dev/sda\fP はメジャーナンバー 8 マイナーナンバー 0 を持ち、システムの最初の SCSI ドライブ全体を参照する。そして、 \fI/dev/sdb3\fP はメジャーナンバー 8 マイナーナンバー 19 を持ち、システムの二つ目の SCSI ドライブの三番目の DOS "基本" パーティションを参照する。 .PP 現在は、ブロックデバイスだけが提供されている。ローデバイス (raw device) はまだ実装されていない。 .SH 説明 次の \fIioctl\fP が提供されている: .TP \fBHDIO_GETGEO\fP 次のような構造体を用いて BIOS のディスクパラメーターを返す: .PP .in +4n .EX struct hd_geometry { unsigned char heads; unsigned char sectors; unsigned short cylinders; unsigned long start; }; .EE .in .IP この構造体へのポインターが \fBioctl\fP(2) へのパラメーターとして渡される。 .IP このパラメーターに入れられて返される情報は、 \fIDOS によって理解されるような\fP ドライブのジオメトリである。 このジオメトリは、ドライブの物理的なジオメトリ \fIではない。\fP この情報はドライブのパーティションテーブルを作成する時に用いられる、 また、 \fBfdisk\fP(1), \fBefdisk\fP(1), \fBlilo\fP(1) の適切な操作に必要である。 もし、ジオメトリの情報が得られなければ、それぞれの値全てにゼロが入れ られて返される。 .TP \fBBLKGETSIZE\fP セクタの数で表したデバイスのサイズが返される。 \fBioctl\fP(2) のパラメーターは、 \fIlong\fP へのポインターでなければならない。 .TP \fBBLKRRPART\fP 強制的に、SCSI ディスクのパーティションテーブルの再読み込みを行う。 パラメーターは必要ない。 .IP SCSI の \fBioctl\fP(2) 操作も同様にサポートされる。 \fBioctl\fP(2) の パラメーターが必要で、そのパラメーターが NULL の場合は、 \fBioctl\fP(2) はエラー \fBEINVAL\fP で失敗する。 .SH ファイル .TP \fI/dev/sd[a\-h]\fP デバイス全体 .TP \fI/dev/sd[a\-h][0\-8]\fP .\".SH SEE ALSO .\".BR scsi (4) 個々のブロックパーティション .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。