*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> disklabel (4)              



NAME    [Toc]    [Back]

       disklabel - Disk pack label

SYNOPSIS    [Toc]    [Back]

       #include <sys/disklabel.h>

DESCRIPTION    [Toc]    [Back]

       Each  disk  or  disk  pack  on a system may contain a disk
       label which provides detailed information about the geometry
  of the disk and the partitions into which the disk is
       divided. It should be initialized when the disk is formatted,
  and may be changed later with the disklabel program.
       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 file systems on the disk  partitions.
 Additional information is used by the file system
       in order to use the disk most efficiently  and  to  locate
       important file system information. The description of each
       partition contains an identifier for  the  partition  type
       (standard  file  system, swap area, etc.). The file system
       updates the in-core copy  of  the  label  if  it  contains
       incomplete information about the file system.

       The  label  is located in sector number LABELSECTOR of the
       drive, usually sector 0 (zero) where it may be found without
  any  information about the disk geometry. 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 overwritten by pack-to-pack copies or
       swap operations; the DIOCWLABEL ioctl, which  is  done  as
       needed  by  the  disklabel program, allows modification of
       the label sector.

       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 character (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, nor made smaller while it is open.
       One exception is that any change is allowed  if  no  label
       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  label;  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 installed by writing to the raw disk. All of
       these operations are normally  done  using  the  disklabel

SEE ALSO    [Toc]    [Back]

       Files: disktab(4)

       Commands: disklabel(8)

[ Back ]
 Similar pages
Name OS Title
disklabel Tru64 Reads and writes a disk pack label and formats disk partitions
disklabel OpenBSD read and write disk pack label
bsdlabel FreeBSD read and write disk pack label
disklabel FreeBSD read and write disk pack label
createlabel Tru64 creates a disk label structure for a disk device
set_usage Tru64 checks whether a disk partition is in use and sets the fstype of the partition in the disk label
disklabel OpenBSD disk label management routines
readdisklabel OpenBSD disk label management routines
writedisklabel OpenBSD disk label management routines
disklabel NetBSD disk label management routines
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service