MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Devices                                                    md(7D)



NAME
     md - user configurable pseudo device driver

DESCRIPTION
     md is a user configurable pseudo device driver that provides
     disk  concatenation, striping, mirroring, RAID5 metadevices,
     trans metadevices, and hot spare  utilities.  Trans  devices
     are  no  longer supported and have been replaced by UFS log-
     ging. See mountufs(1M).


     The block devices access the disk using the system's  normal
     buffering  mechanism and are read and written without regard
     to physical disk records. There is  also  a  ``raw''  device
     which  provides for direct transmission between the disk and
     the user's read or write buffer. A single read or write call
     usually  results  in one I/O operation; raw I/O is therefore
     considerably more efficient when many bytes are transmitted.
     The names of the block devices are found in /dev/md/dsk; the
     names of the raw devices are found in /dev/md/rdsk. Metadev-
     ices have the appearance of whole disks; there are no slices
     (partitions).


     I/O requests (such as lseek(2)) to the metadevices must have
     an  offset  that  is a multiple of 512 bytes (DEVBSIZE), or
     the driver returns an EINVAL error. If the  transfer  length
     is not a multiple of 512 bytes, the tranfer count is rounded
     up by the driver.


     The md pseudo device drivers support all disk devices on all
     Solaris 2.4 or later Solaris systems.

IOCTLS
     This section provides a list of the ioctls supported by  the
     metadisk driver.


     The following ioctls are valid when issued to the raw  meta-
     device, such as /dev/md/rdsk/d0. See dkio(7I) for additional
     information.

     DKIOCGEOM    This ioctl is used to get the  disk  geometry.
                   The  metadisk  driver  fills in the dkgnhead,
                   dkgnsect, dkgrpm,  dkgwritereinstruct  and
                   dkgreadreinstruct  from  the first component
                   of the metadevice (at metainit time). dkgncyl
                   is calculated using the size of the metadevice
                   (reported by metastat) divided by (dkgnhead *
                   dkgnsect).  The total size is always a multi-
                   ple of (dkgnhead * dkgnsect). If  the  first



SunOS 5.11          Last change: 29 Aug 2003                    1






Devices                                                    md(7D)



                   component  of  a  metadevice does not start on
                   cylinder  number  0,  then  the  dkgncyl   is
                   increased  by one cylinder; because DKIOCGVTOC
                   reports the metadevice as starting on cylinder
                   1.  The side effect here is that it looks like
                   cylinder 0 is not  being  used,  but  all  the
                   arithmetic  works  out correctly. If the meta-
                   device is not set up, then ENXIO is returned.


     DKIOCINFO     When issued to the  administrative  device  or
                   metadevice,  this  ioctl  sets dkiunit to the
                   unit number of the metadevice, dkictype to  a
                   value  of  DKCMD,  and  dkipartition  to  0,
                   because there are no slices.


     DKIOCGVTOC    This ioctl returns the current  vtoc.  If  one
                   has  not  been written, then a default vtoc is
                   returned.    vnparts     is     always     1.
                   vpart[0].pstart  is 0 if the first component
                   of the metadevice starts on cylinder 0. Other-
                   wise, the pstart field is the starting sector
                   of cylinder 1. vpart[0].psize is the same as
                   the total size reported by metastat.


     DKIOCSVTOC    This ioctl stores the vtoc in  the  metadevice
                   state  database  so  it  is  persistent across
                   reboots.


DIAGNOSTICS
  Notice Log Messages
     The informative log messages include:

       md: dnum: Hotspared device dev with dev



     The first device name listed has  been  hot  spare  replaced
     with the second device name listed.

       md: dnum: Hotspared device dev(num,num) with dev(num,num)



     The first device number listed has been hot  spare  replaced
     with the second device number listed.

       md: Could not load misc /dev




SunOS 5.11          Last change: 29 Aug 2003                    2






Devices                                                    md(7D)



     The named misc module is not loadable. It is possibly  miss-
     ing, or something else has been copied over it.

       md: dnum: no mem for property dev



     Memory could not be allocated in the propop entry point.

       md: db: Parsing error on 'dev'





     Set command in  /kernel/drv/md.conf  for  the  mddb.bootlist
       is not in the correct format. metadb -p can be run
     to put the correct set commands into the /kernel/drv/md.conf
     file.

       md: dnum: dev(num,num) needs maintenance
       md: dnum: dev needs maintenance



     An I/O or open error has occurred on a device within a  mir-
     ror  causing  a  component  in  the  mirror to change to the
     Maintenance state.


     md: dnum: dev(num,num) last erred md: dnum: dev last erred


     An I/O or open error has occurred on a device within a  mir-
     ror  and the data is not replicated elsewhere in the mirror.
     This is causing the component in the mirror to change to the
     Last Erred state.

  Warning Log Messages
     The warning log messages include:

       md: State database is stale



     This error message comes when there are  not  enough  usable
     replicas for the state database to be able to update records
     in the database. All accesses to the metadevice driver  will
     fail. To fix this problem, more replicas need to be added or
     inaccessible replicas need to be deleted.

       md: dnum: read error on devmd: dnum: write error on dev



SunOS 5.11          Last change: 29 Aug 2003                    3






Devices                                                    md(7D)



     A read or write error has occurred on the specified  submir-
     ror,  at the specified device name. This happens if any read
     or write errors occur on a submirror.

       md: dnum: read error on dev(num,num)md: dnum: write error on dev(
       num,num)



     A read or write error has occurred on the specified  submir-
     ror,  at  the  specified  device number. This happens if any
     read or write errors occur on a submirror.

       md: State database commit failed
       md: State database delete failed



     These messages occur when there have been device  errors  on
     components  where  the state database replicas reside. These
     errors only occur when more than half of the  replicas  have
     had  device  errors  returned  to them. For instance, if you
     have three components with state database replicas  and  two
     of  the  components  report  errors,  then  these errors may
     occur. The  state  database  commit  or  delete  is  retried
     periodically.  If  a  replica  is  added, then the commit or
     delete will finish and the system will be operational.  Oth-
     erwise the system will timeout and panic.

       md: dnum: Cannot load dev driver




     Underlying named driver module is not loadable (for example,
     sd,  id,  xy,  or a third-party driver). This could indicate
     that the driver module has been removed.

       md: Open error of hotspare devmd: Open error of hotspare dev(num,num)



     Named hotspare is not openable, or underlying driver is  not
     loadable.

  Panic Log Messages
     The panic log messages include:

       md: dnum: Unknown close typemd: dnum: Unknown open type






SunOS 5.11          Last change: 29 Aug 2003                    4






Devices                                                    md(7D)



     Metadevice is being opened/closed with an unknown open  type
     (OTYP).

       md: State database problem



     Failed metadevice state database commit or delete  has  been
     retried the default 100 times.

FILES
     /dev/md/dsk/dn                block device (where n  is  the
                                   device number)


     /dev/md/rdsk/dn               raw device  (where  n  is  the
                                   device number)


     /dev/md/setname/dsk/dn        block device (where setname is
                                   the  name of the diskset and n
                                   is the device number)


     /dev/md/setname/rdsk/dn       raw device (where  setname  is
                                   the  name of the diskset and n
                                   is the device number)


     /dev/md/admin                 administrative device


     /kernel/drv/md                driver module


     /kernel/drv/md.conf           driver configuration file


     /kernel/misc/mdstripe        stripe driver misc module


     /kernel/misc/mdmirror        mirror driver misc module


     /kernel/misc/mdhotspares     hotspares driver misc module


     /kernel/misc/mdtrans         metatrans driver for UFS  log-
                                   ging






SunOS 5.11          Last change: 29 Aug 2003                    5






Devices                                                    md(7D)



     /kernel/misc/mdraid          RAID5 driver misc module


SEE ALSO
     mdmonitord(1M), metaclear(1M),  metadb(1M),  metadetach(1M),
     metahs(1M),  metainit(1M),  metaoffline(1M), metaonline(1M),
     metaparam(1M),       metarecover(1M),        metarename(1M),
     metareplace(1M),  metaroot(1M),  metassist(1M), metaset(1M),
     metastat(1M),   metasync(1M),    metattach(1M),    md.cf(4),
     md.tab(4), attributes(5),


     Solaris Volume Manager Administration Guide

NOTES
     Trans metadevices have been replaced by UFS logging.  Exist-
     ing  trans  devices are not logging--they pass data directly
     through to the underlying device. See mountufs(1M) for more
     information about UFS logging.




































SunOS 5.11          Last change: 29 Aug 2003                    6



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™