# phpman > man > SD(4)

[SD(4)](https://www.chedong.com/phpMan.php/man/SD/4/markdown)                                 Linux Programmer's Manual                                [SD(4)](https://www.chedong.com/phpMan.php/man/SD/4/markdown)



## NAME
       sd - driver for SCSI disk drives

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

## CONFIGURATION
       The block device name has the following form: **sd**_lp,_ 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:

       +3     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 [**ioctl**(2)](https://www.chedong.com/phpMan.php/man/ioctl/2/markdown) parameter.

              The  information returned in the parameter is the disk geometry of the drive _as_ _under__‐
              _stood_ _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 [**fdisk**(1)](https://www.chedong.com/phpMan.php/man/fdisk/1/markdown), [**efdisk**(1)](https://www.chedong.com/phpMan.php/man/efdisk/1/markdown), and [**lilo**(1)](https://www.chedong.com/phpMan.php/man/lilo/1/markdown).  If the  geometry  information  is  not
              available, zero will be returned for all of the parameters.

       **BLKGETSIZE**
              Returns  the  device size in sectors.  The [**ioctl**(2)](https://www.chedong.com/phpMan.php/man/ioctl/2/markdown) parameter should be a pointer to a
              _long_.

       **BLKRRPART**
              Forces a reread of the SCSI disk partition tables.  No parameter is needed.

              The SCSI [**ioctl**(2)](https://www.chedong.com/phpMan.php/man/ioctl/2/markdown) operations are also supported.  If the  [**ioctl**(2)](https://www.chedong.com/phpMan.php/man/ioctl/2/markdown)  parameter  is  re‐
              quired, and it is NULL, then [**ioctl**(2)](https://www.chedong.com/phpMan.php/man/ioctl/2/markdown) fails with the error **EINVAL**.

## FILES
       _/dev/sd[a-h]_
              the whole device

       _/dev/sd[a-h][0-8]_
              individual block partitions

## COLOPHON
       This  page  is  part  of  release  5.10 of the Linux _man-pages_ project.  A description of the
       project, information about reporting bugs, and the latest version of this page, can be  found
       at <https://www.kernel.org/doc/man-pages/>.



Linux                                        2017-09-15                                        [SD(4)](https://www.chedong.com/phpMan.php/man/SD/4/markdown)
