About Red Hat Partner Programmes Training Support and Docs Products and Services
  downloadstorecart
red hat logo search    
redhat.comredhat network
Red Hat Documentation: man pages: man4: Linux Programmer's Manual (4)

Manpage of SD

SD

Section: Linux Programmer's Manual (4)
Updated: Thu Dec 17 10:15:53 1992
Index  

NAME

sd - Driver for SCSI Disk Drives  

SYNOPSIS

#include <linux/hdreg.h> /* for HDIO_GETGEO */ #include <linux/fs.h> /* for BLKGETSIZE and BLKRRPART */  

CONFIG

The block device name has the following form: sdlp, where l is a letter denoting the physical drive, and p is a number denoting the partition on that physical drive. Often, the partition number, p, will be left off when the device corresponds to the whole drive.

SCSI disks have a major device number of 8, and a minor device number of the form (16 * drive_number) + partition_number, where drive_number is the number of the physical drive in order of detection, and partition_number is as follows:

partition 0 is the whole drive
partitions 1-4 are the DOS "primary" partitions
partitions 5-8 are the DOS "extended" (or "logical") partitions

For example, /dev/sda will have major 8, minor 0, and will refer to all of the first SCSI drive in the system; and /dev/sdb3 will have major 8, minor 19, and will refer to the third DOS "primary" partition on the second SCSI drive in the system.

At this time, only block devices are provided. Raw devices have not yet been implemented.  

DESCRIPTION

The following ioctl's are provided:
HDIO_GETGEO
Returns the BIOS disk parameters in the following structure:
struct hd_geometry {
      unsigned char heads;
      unsigned char sectors;
      unsigned short cylinders;
      unsigned long start;
};

A pointer to this structure is passed as the parameter.

The information returned in the parameter is the disk geometry of the drive as understood by DOS! This geometry is not the physical geometry of the drive. It is used when constructing the drive's partition table, however, and is needed for convenient operation of If the geometry information is not available, zero will be returned for all of the parameters.

BLKGETSIZE
Returns the device size in sectors. The parameter should be a pointer to a long.
BLKRRPART
Forces a re-read of the SCSI disk partition tables. No parameter is needed.

The ioctls are also supported. If the parameter is required, and it is NULL, then will return -EINVAL.

 

FILES

/dev/sd[a-h]: the whole device
/dev/sd[a-h][0-8]: individual block partitions  

SEE ALSO


 

Index

NAME
SYNOPSIS
CONFIG
DESCRIPTION
FILES
SEE ALSO

This document was created by using the manual pages.
Time: 12:11:43 GMT, March 24, 2025

 

 
 
© 2001 Red Hat, Inc. All rights reserved.       About Red Hat   :   Legal statement   :   Privacy statement   :   Y2K statement   :   Contact Red Hat