disklabel man page on BSDi

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDi logo
[printable version]

DISKLABEL(5)		    BSD Programmer's Manual		  DISKLABEL(5)

NAME
     disklabel - disk pack label

SYNOPSIS
     #include <sys/disklabel.h>

DESCRIPTION
     Each disk or disk pack on a system may contain a disk label which pro-
     vides detailed information about the geometry of the disk and the parti-
     tions into which the disk is divided.  It should be initialized when the
     disk is formatted, and may be changed later with the disksetup(8) pro-
     gram.  This information is used by the system disk driver and by the
     bootstrap program to determine how to program the drive and where to find
     the filesystems on the disk partitions.  Additional information is used
     by the filesystem in order to use the disk most efficiently and to locate
     important filesystem information.	The description of each partition con-
     tains an identifier for the partition type (standard filesystem, swap
     area, etc.).  The filesystem updates the in-core copy of the label if it
     contains incomplete information about the filesystem.

     The label is located in sector number LABELSECTOR of the drive, usually
     sector 0 where it may be found without any information about the disk ge-
     ometry.  It is at an offset LABELOFFSET from the beginning of the sector,
     to allow room for the initial bootstrap.  The disk sector containing the
     label is normally made read-only so that it is not accidentally overwrit-
     ten by pack-to-pack copies or swap operations; the DIOCWLABEL ioctl(2),
     which is done as needed by the disklabel program.

     A copy of the in-core label for a disk can be obtained with the
     DIOCGDINFO ioctl;	this works with a file descriptor for a block or char-
     acter (``raw'') device for any partition of the disk.  The in-core copy
     of the label is set by the DIOCSDINFO ioctl.  The offset of a partition
     cannot generally be changed while it is open, nor can it be made smaller
     while it is open.	One exception is that any change is allowed if no la-
     bel was found on the disk, and the driver was able to construct only a
     skeletal label without partition information.  Finally, the DIOCWDINFO
     ioctl operation sets the in-core label and then updates the on-disk la-
     bel; there must be an existing label on the disk for this operation to
     succeed.  Thus, the initial label for a disk or disk pack must be in-
     stalled by writing to the raw disk.  All of these operations are normally
     done using disklabel.

     Please refer to <sys/disklabel.h> for the actual format of the disk la-
     bel.

SEE ALSO
     disktab(5),  disksetup(8)

HISTORY
     The disklabel file format is currently under development.

BSDI BSD/OS			January 8, 1998				     1
[top]

List of man pages available for BSDi

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net