table of contents
other versions
- jessie 3.74-1
- jessie-backports 4.10-2~bpo8+1
- stretch 4.10-2
- testing 4.16-1
- stretch-backports 4.16-1~bpo9+1
- unstable 4.16-1
SD(4) | Linux Programmer's Manual | SD(4) |
NAME¶
sd - driver for SCSI disk drivesSYNOPSIS¶
#include <linux/hdreg.h> /* for HDIO_GETGEO */ #include <linux/fs.h> /* for BLKGETSIZE and BLKRRPART */
CONFIGURATION¶
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 driveDESCRIPTION¶
The following ioctls are provided:- HDIO_GETGEO
Returns the BIOS disk parameters in the following
structure:
A pointer to this structure is passed as the ioctl(2) 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 fdisk(1), efdisk(1), and lilo(1). If the geometry information is not available, zero will be returned for all of the parameters.
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) 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 fdisk(1), efdisk(1), and lilo(1). 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) 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) operations are also supported. If the ioctl(2) parameter is required, and it is NULL, then ioctl(2) will fail with the error EINVAL.
FILES¶
/dev/sd[a-h]: the whole deviceCOLOPHON¶
This page is part of release 4.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/.2012-05-03 | Linux |