{
    "content": [
        {
            "type": "text",
            "text": "# sd(4) (man)\n\n**Summary:** sd - driver for SCSI disk drives\n\n**Synopsis:** #include <linux/hdreg.h>        /* for HDIOGETGEO */\n#include <linux/fs.h>           /* for BLKGETSIZE and BLKRRPART */\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **CONFIGURATION** (20 lines)\n- **DESCRIPTION** (30 lines)\n- **FILES** (6 lines)\n- **COLOPHON** (7 lines)\n\n## Full Content\n\n### NAME\n\nsd - driver for SCSI disk drives\n\n### SYNOPSIS\n\n#include <linux/hdreg.h>        /* for HDIOGETGEO */\n#include <linux/fs.h>           /* for BLKGETSIZE and BLKRRPART */\n\n### CONFIGURATION\n\nThe block device name has the following form: sdlp, where l is a letter denoting the physical\ndrive, and p is a number denoting the partition on that physical drive.  Often, the partition\nnumber, p, will be left off when the device corresponds to the whole drive.\n\nSCSI  disks  have  a  major  device  number of 8, and a minor device number of the form (16 *\ndrivenumber) + partitionnumber, where drivenumber is the number of the physical  drive  in\norder of detection, and partitionnumber is as follows:\n\n+3     partition 0 is the whole drive\n\npartitions 1–4 are the DOS \"primary\" partitions\n\npartitions 5–8 are the DOS \"extended\" (or \"logical\") partitions\n\nFor  example,  /dev/sda  will  have major 8, minor 0, and will refer to all of the first SCSI\ndrive in the system; and /dev/sdb3 will have major 8, minor 19, and will refer to  the  third\nDOS \"primary\" partition on the second SCSI drive in the system.\n\nAt this time, only block devices are provided.  Raw devices have not yet been implemented.\n\n### DESCRIPTION\n\nThe following ioctls are provided:\n\nHDIOGETGEO\nReturns the BIOS disk parameters in the following structure:\n\nstruct hdgeometry {\nunsigned char  heads;\nunsigned char  sectors;\nunsigned short cylinders;\nunsigned long  start;\n};\n\nA pointer to this structure is passed as the ioctl(2) parameter.\n\nThe  information returned in the parameter is the disk geometry of the drive as under‐\nstood by DOS!  This geometry is not the physical geometry of the drive.   It  is  used\nwhen  constructing  the drive's partition table, however, and is needed for convenient\noperation of fdisk(1), efdisk(1), and lilo(1).  If the  geometry  information  is  not\navailable, zero will be returned for all of the parameters.\n\nBLKGETSIZE\nReturns  the  device size in sectors.  The ioctl(2) parameter should be a pointer to a\nlong.\n\nBLKRRPART\nForces a reread of the SCSI disk partition tables.  No parameter is needed.\n\nThe SCSI ioctl(2) operations are also supported.  If the  ioctl(2)  parameter  is  re‐\nquired, and it is NULL, then ioctl(2) fails with the error EINVAL.\n\n### FILES\n\n/dev/sd[a-h]\nthe whole device\n\n/dev/sd[a-h][0-8]\nindividual block partitions\n\n### COLOPHON\n\nThis  page  is  part  of  release  5.10 of the Linux man-pages project.  A description of the\nproject, information about reporting bugs, and the latest version of this page, can be  found\nat https://www.kernel.org/doc/man-pages/.\n\n\n\nLinux                                        2017-09-15                                        SD(4)\n\n"
        }
    ],
    "structuredContent": {
        "command": "sd",
        "section": "4",
        "mode": "man",
        "summary": "sd - driver for SCSI disk drives",
        "synopsis": "#include <linux/hdreg.h>        /* for HDIOGETGEO */\n#include <linux/fs.h>           /* for BLKGETSIZE and BLKRRPART */",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "CONFIGURATION",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 30,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "COLOPHON",
                "lines": 7,
                "subsections": []
            }
        ]
    }
}