# man vxvol
Reformatting page.  Wait... done

Maintenance Commands                                    vxvol(1M)

NAME
     vxvol - perform Volume Manager operations on volumes

SYNOPSIS
     vxvol [-fV] [-g diskgroup ] [-U  usetype]  [-o  useopt]  [-t
     tasktag] init init_type volume [arg ...]

     vxvol [-fV] [-g diskgroup ] [-U  usetype]  [-o  useopt]  [-t
     tasktag] maint volume ...

     vxvol [-fV] [-g diskgroup ] [-U  usetype]  [-o  useopt]  [-t
     tasktag] noderecover volume ...

     vxvol [-fV] [-g diskgroup ] [-U  usetype]  [-o  useopt]  [-t
     tasktag] rdpol policy volume [plex]

     vxvol [-fV] [-g diskgroup ] [-U usetype] [-o useopt] recover
     volume [subdisk] ...

     vxvol [-fV] [-g diskgroup ] [-U  usetype]  [-o  useopt]  [-t
     tasktag] resync volume ...

     vxvol [-fV] [-g diskgroup]  [-U  usetype]  [-o  useopt]  [-t
     tasktag] set attribute=value ... [ -- ] volume ...

     vxvol [-fV] [-g diskgroup ] [-U  usetype]  [-o  useopt]  [-t
     tasktag] start volume ...

     vxvol [-fV] [-g diskgroup ] [-U  usetype]  [-o  useopt]  [-t
     tasktag] startall

     vxvol [-fV] [-g diskgroup ] [-U  usetype]  [-o  useopt]  [-t
     tasktag] stop volume ...

     vxvol [-fV] [-g diskgroup ] [-U  usetype]  [-o  useopt]  [-t
     tasktag] stopall

DESCRIPTION
     The vxvol utility  performs  Volume  Manager  operations  on
     volumes.  The first operand is a keyword that determines the
     specific  operation  to  perform.   The  remaining  operands
     specify  configuration  records to which the operation is to
     be applied.

     Each operation can be applied to only one disk  group  at  a
     time,  due  to  internal  implementation  constraints.   Any
     volume operands will be used to  determine  a  default  disk
     group,  according to the standard disk group selection rules
     described in vxintro(1M).  A  specific  disk  group  can  be
     selected with -g diskgroup.

VxVM 3.0            Last change: 11 Dec 1998                    1

Maintenance Commands                                    vxvol(1M)

KEYWORDS
     init      Perform an  initialization  action  on  a  volume.
               This  can  be applied to volumes that were created
               by vxmake and that have not yet been  initialized,
               or volumes that have been set to the uninitialized
               state with vxmend fix empty.  The action  to  per-
               form  is specified by the init_type operand, which
               is  usage-type-dependent.   The   volume   operand
               determines  which usage type to use for performing
               the operation.

     maint     Detach each volume named by the  volume  operands.
               When  a  volume is detached, normal read and write
               operations  to  the  volume  fail,  although  most
               volume ioctl operations can still be used.

     noderecover
               When a node in a cluster aborts or crashes, it  is
               not allowed to rejoin the cluster until the active
               logs of the volumes  affected  by  the  crash  are
               recovered.  The noderecover operation examines all
               volumes named by the volume operands and  recovers
               the  active  log maps corresponding to the crashed
               nodes, but does not initiate mirror resynchroniza-
               tion.   Mirrors are subsequently resynchronized by
               a vxvol -o force resync volume... command.

               This operation is currently applicable only to the
               volumes  with  DRL  logs  and  is relevant only in
               clustered systems.

     rdpol     Set the read policy for a volume based on the pol-
               icy  operand.  These are the recognized read poli-
               cies:

               prefer    Read preferentially from the plex  named
                         by  the  plex  operand.   If the plex is
                         enabled, readable, and  associated  with
                         the  volume,  then any read operation on
                         the volume results in a read  from  that
                         plex if all blocks requested in the read
                         are contained in  the  plex.   The  plex
                         operand   is  required  for  the  prefer
                         read-policy type.

               round     Use a round-robin read order  among  the
                         enabled, readable plexes associated with
                         the volume.  No plex operand  should  be
                         specified   for  the  round  read-policy
                         type.

               select    Select a default policy  based  on  plex

VxVM 3.0            Last change: 11 Dec 1998                    2

Maintenance Commands                                    vxvol(1M)

                         associations   to  the  volume.   For  a
                         volume  that   contains   one   enabled,
                         striped  plex,  the default is to prefer
                         that plex.  For any other  set  of  plex
                         associations,  the  default  is to use a
                         round-robin  policy.   No  plex  operand
                         should   be  specified  for  the  select
                         read-policy type.

     recover   Some usage types support the concept  of  recovery
               of data for objects within a volume different from
               the mirror resynchronization  model.  The  recover
               operation   is   used  to  specify  this  type  of
               recovery. The exact procedure for  this  operation
               is usage type specific.

     resync    Examine all volumes named by the  volume  operands
               and  perform  any  synchronization operations that
               are required. The exact procedure for this  opera-
               tion is usage-type specific.

     set       Change  specific  volume   characteristics.    The
               changes  to be made are given by arguments immedi-
               ately  after  the  set   keyword   of   the   form
               attribute=value.   The  set of volumes affected by
               the operation are given after these operands; thus
               the  attribute list ends with an operand that does
               not contain an equal sign.  To  allow  for  volume
               names that contain an equal sign, an operand of --
               can be used to terminate the attribute list.  Each
               usage  type  represented  by  the  list  of volume
               operands is called  once,  with  the  set  of  all
               volumes with that usage type.

               The set  of  attribute=value  attribute  arguments
               that  are recognized depends upon the volume usage
               type (see the sections on  usage  types  later  in
               this  manual  page  for  information  on available
               attributes). However, an attribute argument of the
               form  len=number is expected to be interpreted (if
               at all) as requesting a change in the length of  a
               volume,  regardless  of  the  volume's usage type.
               The number value  is  interpreted  as  a  standard
               length number (see vxintro(1M)).

     start     Enable disabled or detached volumes named  by  the
               volume operands.  The process of enabling a volume
               is a highly usage-type-dependent operation and may
               result in transfers of data between plexes associ-
               ated with the volume.

               If  the  start  operation   is   applied   to   an

VxVM 3.0            Last change: 11 Dec 1998                    3

Maintenance Commands                                    vxvol(1M)

               uninitialized  volume  (for example, a volume just
               created by vxmake), a default initialization  will
               be used to initialize and enable the volume.

               If the volume  is  not  normally  started  because
               failures  and  disk removals have left all associ-
               ated plexes with invalid data, the -f  option  can
               be  used to try to start the volume, anyway.  This
               can be used after replacing disks  to  enable  the
               volume  so  that its contents can be restored from
               backup or reinitialized.

     startall  Attempt to start all volumes  that  are  disabled.
               If  a -U usetype option is specified, then attempt
               to start all disabled volumes with  the  indicated
               usage  type.  This operation will not start unini-
               tialized volumes.  By default, start  all  volumes
               in  the rootdg disk group.  A different disk group
               can be specified with the -g option.

     stop      Disable the enabled or detached volumes  named  by
               the volume operands.

               The stop operation provides an  interface  to  the
               usage  type  of  a volume for shutting down opera-
               tions on a volume in a clean manner.  The specific
               method for cleanly stopping a volume, and the pre-
               cise meaning of ``clean'' are both  highly  usage-
               type-dependent.   By convention, -f can be used to
               force stopping of a volume that is in use, forcing
               I/O failures to be returned for any further volume
               device operations.

     stopall   Attempt to stop all volumes that are enabled.   If
               a  -o usetype option is specified, then attempt to
               stop all disabled volumes with the indicated usage
               type.   By default, stop all volumes in the rootdg
               disk group.  A different disk group can be  speci-
               fied with the -g option.

OPTIONS
     -f        Force an operation in some  situations  where  the
               operation  has  questionable semantics.  For exam-
               ple, -f may be used to  reduce  the  length  of  a
               volume  with  vxvol  set, to stop a volume that is
               currently open or mounted as a file system, or  to
               attempt  to start a volume that has no plexes with
               valid data.

     -g diskgroup
               Specify the disk group  for  the  operation.   The
               disk  group  can be specified either by name or by

VxVM 3.0            Last change: 11 Dec 1998                    4

Maintenance Commands                                    vxvol(1M)

               disk group ID.  See vxdg(1M) for more  information
               on disk groups.

     -o useopt Pass in usage-type-specific options to the  opera-
               tion.   By  convention,  the following usage-type-
               specific options  should  be  implemented  by  all
               usage types:

               bg        Perform any extended  revive  operations
                         in background processes after the volume
                         and  one  or  more  plexes   have   been
                         enabled.   A  volume  that is started or
                         whose  length  is  changed  successfully
                         with  this option will be usable immedi-
                         ately  after  the  operation  completes,
                         although  recovery operations may affect
                         performance  of  the   volume   for   an
                         extended period of time.

               delayrecover
                         Do not perform any  plex  revive  opera-
                         tions  when  starting  a volume.  Simply
                         enable the volume and any plexes.   This
                         may  leave  some  stale  plexes, and may
                         leave a mirrored  volume  in  a  special
                         read-writeback  (NEEDSYNC) recover state
                         that performs limited plex recovery  for
                         each read to the volume.

               iosize=size
                         Perform recovery operations  in  regions
                         with the length specified by size, which
                         is  a  standard  Volume  Manager  length
                         number  (see vxintro(1M)).  Specifying a
                         larger  number  typically   causes   the
                         operation  to  complete sooner, but with
                         greater impact on other processes  using
                         the  volume.   The  default  I/O size is
                         typically 32 kilobytes.

               plexfork[=count]
                         Perform up to the  specified  number  of
                         plex  revive  operations simultaneously.
                         If no count is specified, then  a  suit-
                         able small number is used (normally 10).

               slow[=iodelay]
                         Reduce the system performance impact  of
                         plex   recovery  operations  and  volume
                         length changes.   Startup  recovery  and
                         length change consistency operations are
                         usually a set  of  short  operations  on

VxVM 3.0            Last change: 11 Dec 1998                    5

Maintenance Commands                                    vxvol(1M)

                         small  regions  of  the volume (normally
                         from 16K bytes  to  128K  bytes).   This
                         option   inserts  a  delay  between  the
                         recovery  of  each   such   region.    A
                         specific  delay  can  be  specified with
                         iodelay as a number of milliseconds,  or
                         else  a  default is chosen (normally 250
                         milliseconds).

               verbose   Print a message for each volume that  is
                         successfully   started.    Without  this
                         option, messages appear only for volumes
                         that fail to start.

     -t tasktag
               If any tasks are registered to track the  progress
               of the operation, mark them with the tag tasktag.

     -U usetype
               Force the operation to be performed by the  usage-
               type utility for this usage type.

     -V        Display a list of utilities that would  be  called
               from vxvol, along with the arguments that would be
               passed.  The -V option performs a ``mock run''  so
               the  utilities  are  not  actually  called, and no
               changes are made to the volume configuration data-
               base.

FSGEN and GEN Usage Types
     The fsgen and gen usage types provide the same semantics for
     all  operations of the vxvol utility.  However, some options
     are provided only by the gen usage type.

     In addition to the standard  -o  options  required  for  all
     usage  types, the fsgen and gen usage types provide the fol-
     lowing additional options:

     force     Force an operation that is not normally  performed
               as  part  of  the  operational model of the Volume
               Manager and may  have  adverse  effects  on  data.
               This is the same as -f.

     norecov   This can only be used with  the  gen  usage  type.
               Prevent the start operation from recovering plexes
               through the vxplex utility.   Instead,  all  STALE
               and ACTIVE plexes are simply treated as equivalent
               to CLEAN plexes,  and  are  thus  enabled  without
               being  made  consistent.   This  can  be  used for
               volumes whose contents are recreated for each use.

               An example of a possible use for this attribute is

VxVM 3.0            Last change: 11 Dec 1998                    6

Maintenance Commands                                    vxvol(1M)

               a swap area and the /tmp file system.  In the case
               of /tmp, the model assumes that mkfs  is  used  to
               create  an  empty file system after the volume has
               been started.

     Limitations and extensions for the fsgen and gen usage types
     consist of the following:

     init      These are the recognized uses of  the  vxvol  init
               operation:

               vxvol init active  volume
                         Set the state for all plexes  associated
                         with  volume  to  ACTIVE  and enable the
                         volume and its plexes.  This is used  to
                         initialize  a  single  or  multiple-plex
                         volume where all  plexes  are  known  to
                         have identical contents.

               vxvol init clean  volume  [plex]
                         Set the state for the specified plex  to
                         CLEAN,  and  set  all  other  plexes  to
                         STALE.  The vxvol  start  operation  can
                         then  be used to recover the volume from
                         the CLEAN plex.  This operation requires
                         that the volume not be enabled.

                         If the specified  volume  has  only  one
                         plex,  then  the  plex  argument  is not
                         required as it defaults  to  that  plex.
                         If  specified,  then  the  plex argument
                         must represent a plex that is associated
                         with the volume.

               vxvol init enable volume
                         Enable the volume  and  its  plexes  but
                         leave  the  volume  uninitialized.  This
                         operation can  be  used  only  for  non-
                         enabled  volumes.   It  is  used to tem-
                         porarily enable a volume  so  that  data
                         can  be  loaded  onto it to make it con-
                         sistent.  Once the data has been loaded,
                         init  active  should  be  used  to fully
                         enable the volume.  init active could be
                         used,  for  example, if a complete image
                         of the volume is to  be  loaded  from  a
                         tape.

               vxvol init zero volume
                         Write zero blocks to all plexes  in  the
                         volume,  up to the length of the volume.
                         After the writes complete, the state  of

VxVM 3.0            Last change: 11 Dec 1998                    7

Maintenance Commands                                    vxvol(1M)

                         each  plex  is  set  to  ACTIVE  and the
                         volume and its plexes are enabled.  init
                         zero  volume could be used, for example,
                         before running mkfs to put a file system
                         on the volume.

                         If this operation is  interrupted  by  a
                         signal,  then  an  attempt  is  made  to
                         restore all affected  records  to  their
                         original  state,  or  to a state that is
                         roughly  equivalent  to  their  original
                         state.   If this attempt is interrupted,
                         such as through another signal, then the
                         user  many need to perform some cleanup.
                         A  set  of  commands  to  perform   this
                         cleanup  are  written  to  the  standard
                         error before the volume utility exits.

     maint     The -f option is required  to  detach  an  enabled
               volume.   Also,  a warning is written to the stan-
               dard error for volumes that are open or mounted.

     resync    Volumes that have possibly differing plex contents
               will  be  re-synchronized  to  contain  consistent
               data.  Any such volumes that are in  the  NEEDSYNC
               state  will  be  recovered using a read/write-back
               recovery mode and then put into the ACTIVE state.

               Plexes in the SYNC  state  may  already  be  under
               recovery  and  the  volume  command  will  take no
               action to recover  them  unless  the  command  was
               invoked with the -o force option.

     set       The attributes that can be changed are:

               exclusive=yes|y|on|true|no|n|off|false
                         Sets or clears the EXCLUSIVE flag on the
                         volume.   A  volume  in  exclusive  open
                         state can be opened by only one node  in
                         the cluster at a time. Multiple opens of
                         an exclusive volume from the  same  node
                         are  permitted.   Non-exclusive  volumes
                         can be  simultaneously  opened  by  more
                         than  one  node.   After a node opens an
                         exclusive  volume,  every  other  node's
                         open  attempt fails until the last close
                         of the volume by the first opener.  Such
                         an  open  failure  returns a EBUSY error
                         code.   Available  only   with   Cluster
                         Volume Manager.

               len=number

VxVM 3.0            Last change: 11 Dec 1998                    8

Maintenance Commands                                    vxvol(1M)

                         Change the length of each volume  speci-
                         fied  by  the  volume operands to number
                         sectors.  number is  a  standard  Volume
                         Manager length number (see vxintro(1M)).
                         Decreasing  the  length  of   a   volume
                         requires use of -f.

                         If the volume is enabled, then count the
                         number  of  enabled,  read-write  plexes
                         that would  remain  complete  after  the
                         length  change.   The operation fails if
                         this number would become zero,  but  the
                         number  of  sparse  plexes  would become
                         greater than 1.  Changing the length  of
                         a  volume  with  one enabled plex beyond
                         the length of the plex requires  use  of
                         the -f option.

                         If the volume is not enabled, count  the
                         number  of  CLEAN and ACTIVE plexes that
                         would remain complete after  the  length
                         change, then use the algorithm mentioned
                         previously for determining  whether  the
                         operation  is allowed or requires use of
                         -f.

                         To ensure that the  new  region  of  the
                         volume  is  consistent across all plexes
                         of the volume, the volume is put into  a
                         SYNC state and read/write-back mode, and
                         a read loop is  then  performed  against
                         the  volume.   Once  this  loop has com-
                         pleted, the volume is put back into  the
                         ACTIVE state.

               loglen=size
                         Set the size  for  logs  used  with  the
                         volume.  The  size  value  is a standard
                         Volume  Manager  length   numbers   (see
                         vxintro(1M)).

               logtype=type
                         Set the type of logging to  be  used  on
                         the  volume.  This change can be applied
                         only to volumes  that  are  stopped  and
                         that have no ACTIVE plexes.  Allowed log
                         types are drl (logs the regions involved
                         in  all volume writes), none (never does
                         logging), and  undef  (never  does  log-
                         ging).   If  the  logging type is set to
                         undef,  then  a  future  vxsd  aslog  or
                         vxplex  att  operation will change it to

VxVM 3.0            Last change: 11 Dec 1998                    9

Maintenance Commands                                    vxvol(1M)

                         drl.  See the fsgen and gen sections  of
                         vxsd(1M)  and vxplex(1M) for more infor-
                         mation.

               startopts=volume_options
                         Set options  that  are  applied  to  the
                         volume every time the volume is started,
                         independently of options specified  with
                         the volume start command.  This is a set
                         of comma-separated options of  the  same
                         form used with the -o option letter.  At
                         the present time, only the noattach  and
                         verbose   options   can  be  applied  to
                         volumes in this manner.  Unrecognized or
                         inappropriate options are ignored.

     start     Starting an  uninitialized  gen  or  fsgen  volume
               enables the volume and its plexes, sets the plexes
               to the ACTIVE state, and recovers  the  plexes  to
               ensure  that  each plex has the same contents.  If
               the volume has only one plex, then the  volume  is
               immediately  set  to  the ACTIVE state; otherwise,
               the volume is set to the SYNC state and a  special
               read/write-back  mode is set to recover regions of
               the volume on every read operation.  The volume is
               then read from beginning to end to make all plexes
               consistent, then the volume is set to  the  ACTIVE
               state.

               Starting a volume with no active dirty region log-
               ging involves enabling all CLEAN and ACTIVE plexes
               and putting them in the ACTIVE state.  If  an  I/O
               failure  was logged against the plex, or if a disk
               replacement caused a plex to  become  stale,  then
               the  plex is considered STALE.  If any of the sub-
               disks for the plex reside on a removed or inacces-
               sible  disk, then the plex is ignored for the pur-
               poses of starting the volume.

               If two or more plexes were  enabled,  and  if  the
               volume  was  active  at  the  time the system went
               down, then the state for the volume is set to SYNC
               and  a  special  read/write-back  recovery mode is
               used  to  recover  consistency  of   the   volume,
               segment-by-segment,  on  every read.  A process is
               then started (in the  background  with  the  -o bg
               option)  to  recover  consistency  for  the entire
               length of the volume.

               If any plexes were considered  STALE,  then  those
               plexes  are  attached  by calling vxplex att.  The
               number of concurrent plex  attach  operations  are

VxVM 3.0            Last change: 11 Dec 1998                   10

Maintenance Commands                                    vxvol(1M)

               limited based on the rules for -o plexfork.

               Recovery of plexes with a dirty  region  log  uses
               the  same  rules  as  for  volumes without a valid
               dirty region log, except  that  recovery  of  non-
               stale  plexes  is done by scanning the contents of
               the dirty region log  and  recovering  consistency
               for  those  regions listed in the log as requiring
               recovery.

               In addition to enabling the  volume  and  managing
               the  recovery  of  plex  consistency,  starting  a
               volume clears any transient operations  that  were
               being  applied  to  a volume before the system was
               rebooted.   Starting  a  volume  dissociates   and
               removes temporary plexes or subdisks, and dissoci-
               ates plexes that were being attached if the attach
               operation   did  not  complete.   Snapshot  plexes
               created by vxassist are also removed.

               If the volume is unstartable because there are  no
               valid,  non-stale  plexes  and the -f flag is then
               specified, all STALE plexes that  do  not  contain
               unusable  subdisks  (subdisks on failed or removed
               disks) will be changed to ACTIVE.  The volume will
               then   be  started  and  synchronized  from  those
               plexes.

     stop      Stopping an  fsgen  or  gen  volume  disables  the
               volume  and  its  associated plexes.  In addition,
               the utility state for each ACTIVE plex is  changed
               as follows:

               o  If the plex is detached or  disabled,  set  the
                  state for the plex to STALE.  If all plexes are
                  set to STALE, then the volume cannot be started
                  until vxmend is used to change the state of one
                  or more plexes to CLEAN or ACTIVE.  A plex nor-
                  mally  becomes  detached  as a result of an I/O
                  error  on  the  plex,  or  a  disk  failure  or
                  replacement.   I/O  failures  will not normally
                  detach the last remaining  enabled  plex  in  a
                  volume, so disk removal operations are the only
                  normal operational method of  making  a  volume
                  unstartable.

               o  If the plex is volatile, that is,  one  of  the
                  subdisks  in the plex is defined on a disk with
                  the volatile attribute (see  vxdisk(1M)),  then
                  set the plex state to STALE.

               o  If the volume is enabled and the plex  is  also

VxVM 3.0            Last change: 11 Dec 1998                   11

Maintenance Commands                                    vxvol(1M)

                  enabled, then set the plex state to CLEAN.

               o  If the volume  is  detached  and  the  plex  is
                  enabled, then the plex state is left as ACTIVE.
                  A volume can be left detached,  with  remaining
                  valid plexes, only as a result of calling vxvol
                  maint to detach an enabled volume.

               Normally, the stop operation fails if any extended
               operations  are  using  the  volume  or any of its
               associated plexes.  Such operations  are  detected
               as  a  nonempty  value  for  the tutil0 field in a
               volume or plex record.  If the -f option is speci-
               fied,  then  the stop operation ignores volume and
               plex tutil0 fields.

               The -f option must also  be  given  to  force  the
               stopping  of a volume that is open or mounted as a
               file system.  In this case, a warning  message  is
               still  written to the standard error, but the stop
               operation is not otherwise affected.  Stopping  an
               open or mounted volume is not normally advisable.

RAID-5 Usage Type
     In addition to the standard  -o  options  required  for  all
     usage  types,  the  raid5  usage type provides the following
     options:

     checkpt=size
               Set the checkpoint size for a volume.  A  complete
               resynchronization  of  a  volume via VOL_R5_RESYNC
               ioctls can take an extended amount of time. It  is
               conceivable  in some circumstances that the opera-
               tion could be stopped before it complete (such  as
               by a system crash). To avoid having to restart the
               synchronization from the beginning of  the  volume
               (after  a  certain  amount  of the volume has been
               synchronized), a transaction is issued  to  record
               the offset to which the resynchronization has com-
               pleted. This size is called the checkpoint  length
               and  can  be  set  using  the  checkpt option. The
               default checkpoint length is 64 megabytes.

     delayrecover
               This prevents the start operation from  undergoing
               some  recovery operations. RAID-5 logs, if any are
               valid, will still be replayed; however, no  parity
               resynchronizations  or  subdisk recoveries will be
               performed.

     force     Force an operation that is not normally  performed
               as  part  of  the  operational model of the Volume

VxVM 3.0            Last change: 11 Dec 1998                   12

Maintenance Commands                                    vxvol(1M)

               Manager. It may have adverse effects on  the  data
               contained by the volume. This is the same as -f.

     syncstartok
               This allows the delayrecover option to be  ignored
               if  the  volume must undergo parity resynchroniza-
               tions or subdisk recoveries before the volume  can
               be enabled.

     unsafe    This allows access to certain volumes  earlier  in
               the  starting  process than is normally allowed by
               the operating process of RAID-5 volumes.  This can
               have  adverse  effects  on  the data, and can also
               result in  the  RAID-5  volume  becoming  unusable
               after a system crash or a power failure.

     Limitations and extensions for the raid5 usage type  consist
     of the following:

     init      The raid5 usage type recognizes the following uses
               of the init operation:

               vxvol init active  volume
                         Zero the RAID-5 log plexes, if any,  and
                         make  the  volume available for use. The
                         parity in the volume is marked as stale,
                         though  no  parity  resynchronization is
                         performed; the volume  is  left  with  a
                         state of NEEDSYNC.

               vxvol init zero  volume
                         Write zeros to the RAID-5 log plexes, if
                         any,  and  write  zeros  to  the  entire
                         length of the volume. This  is  achieved
                         by issuing the VOL_R5_ZERO ioctl for the
                         entire  altitude  of  the  volume.   The
                         volume is left in the ACTIVE state.

     recover   The raid5 usage type supports the following  invo-
               cations of the recover operation:

               recover [subdisk ...]
                         The recover operation  can  be  used  to
                         initiate a recovery of subdisks contain-
                         ing invalid data. If subdisks are speci-
                         fied  and  are stale, they are recovered
                         in the order specified. This is done  by
                         setting  the  stale and write-only flags
                         on    the    subdisks    and     issuing
                         VOL_R5_RECOVER  ioctls to regenerate the
                         data. After a successful  recovery,  the
                         subdisk   is  marked  as  non-stale  and

VxVM 3.0            Last change: 11 Dec 1998                   13

Maintenance Commands                                    vxvol(1M)

                         read-write.

                         If no subdisk arguments  are  specified,
                         the  subdisks  of the RAID-5 plex of the
                         volume are checked to see  if  they  are
                         stale  or  have invalid contents. If any
                         are  found,  they   are   recovered   as
                         described above.

     resync    The resync operation examines the named volumes to
               see  if  they are enabled and if the parity in any
               part of a volume is stale; this is normally  indi-
               cated  by  a  volume state of NEEDSYNC. If so, the
               volume  is  placed   in   the   SYNC   state   and
               VOL_R5_RESYNC  ioctls  are issued to resynchronize
               the parity in those regions. Upon completion,  the
               volume is placed in the ACTIVE state.

     set       The attributes that can be set for  raid5  volumes
               are:

               len=number
                         Change the length of the volumes  speci-
                         fied  to be number sectors.  number is a
                         standard Volume Manager length  specifi-
                         cation (see vxintro(1M)). Decreasing the
                         length of a volume requires -f.

                         The volume length  cannot  be  increased
                         such  that  the RAID-5 plex is sparse in
                         respect to the new volume  length;  this
                         would make the volume unusable.

                         In order to assure that the  new  region
                         of  the  volume  is  consistent, the new
                         region  of  the  volume  (from  the  old
                         length to the new length) is filled with
                         zeros  by  issuing  VOL_R5_ZERO   ioctls
                         before the length is reset.

               loglen=size
                         Set the size of the RAID-5 log  for  the
                         volume. This cannot be set if the volume
                         has no logs.  If  the  length  is  being
                         increased,  the  operation  will  not be
                         allowed if it would  cause  any  of  the
                         RAID-5  log  plexes  to become sparse in
                         respect to the new length.

               startopts=volume_options
                         Set options  that  are  applied  to  the
                         volume every time the volume is started,

VxVM 3.0            Last change: 11 Dec 1998                   14

Maintenance Commands                                    vxvol(1M)

                         independently of options specified  with
                         the volume start command.  This is a set
                         of comma-separated options of  the  same
                         form  used  with  the  -o option letter.
                         Unrecognized  or  inappropriate  options
                         are ignored.

     start     Starting an uninitialized volume (one with a state
               of  EMPTY)  zeros  any  RAID-5 log plexes and then
               resynchronizes the parity of the volume by issuing
               VOL_R5_RESYNC  ioctls.  All subdisks are marked as
               non-stale and read-write. The  volume  and  RAID-5
               plex  are  then  enabled and marked as ACTIVE, and
               all valid RAID-5 log plexes are marked as LOG.  If
               any  RAID-5 log plex proves to be invalid (such as
               having its NODAREC flag set) its state is  set  to
               BADLOG.

               Starting a volume that has been shut down  cleanly
               or  is not marked as dirty enables the RAID-5 plex
               and RAID-5 log plexes, and sets the volume  kernel
               state  to  detached  to zero the RAID-5 log plexes
               for the volume, if any. Once  this  is  completed,
               all valid RAID-5 log plexes are set to LOG and the
               volume is enabled and put in the ACTIVE state.

               Starting a volume that was not shut  down  cleanly
               requires that the parity be resynchronized. If the
               volume has valid RAID-5 log plexes, the volume  is
               first  detached  and  has its state set to REPLAY,
               and  all  log  plexes  and  the  RAID-5  plex  are
               enabled. If there are any valid RAID-5 log plexes,
               their contents are read and their data is  written
               to  the appropriate regions of the RAID-5 plex. If
               reading the RAID-5 logs fails, the logs are marked
               as  invalid and the parity is resynchronized as if
               there were no logs. Once the replay  is  complete,
               the  RAID-5  logs  are  enabled  and the volume is
               enabled and its state is set to ACTIVE.

               If the volume needs resynchronization and no valid
               log  plexes exist, the parity must be fully resyn-
               chronized. The volume is enabled and its state  is
               set to RESYNC, and the RAID-5 plex is enabled.  If
               usable RAID-5 plexes are  available,  but  contain
               invalid  data, they are zeroed. The parity is then
               resynchronized by issuing VOL_R5_RESYNC ioctls for
               the entire length of the volume. Once this is com-
               pleted, the volume's state is set to  ACTIVE.  Any
               usable  RAID-5 logs are enabled and set to the LOG
               state.

VxVM 3.0            Last change: 11 Dec 1998                   15

Maintenance Commands                                    vxvol(1M)

               If a volume requires full resynchronization  (that
               is,  has  no  usable logs) and the RAID-5 plex has
               stale or unusable subdisks, the volume is unusable
               and  the  start  operation  will fail. This can be
               overridden by using the -f flag or  the  -o  force
               option  .   In  this  case, any stale subdisks are
               marked as non-stale and a  full  resynchronization
               is  performed;  however,  this  may result in some
               invalid data being introduced into the volume.  If
               multiple  subdisks  at  the  same  altitude in the
               RAID-5 plex are unusable  (such  as  because  they
               have their NODEVICE flag set), the volume is unus-
               able and cannot be overridden.

               Once any parity resynchronization  has  been  com-
               pleted,  any  subdisks  still  marked as stale are
               recovered. This is done by marking the subdisk  as
               stale  and  write-only  and issuing VOL_R5_RECOVER
               ioctls to regenerate the data on  the  stale  sub-
               disks. The subdisk is then marked as non-stale and
               read-write.

               If the -o delayrecover option  is  specified,  the
               only  recoveries  that  will  be performed are log
               replays. If the volume requires  a  parity  resyn-
               chronization,  it  is  enabled  and  left  in  the
               NEEDSYNC operation, and its parity  is  marked  as
               stale.  Any subdisk recoveries that are needed are
               not performed, and the stale subdisks  are  marked
               as stale.

               Normally, if a volume has no RAID-5 logs, it  will
               not be enabled with a stale subdisk or an unusable
               subdisk because were the  system  to  crash  or  a
               power  failure occurred while the volume was is in
               use, the parity could become stale and the  volume
               would  be unusable.  This behavior can be overrid-
               den by specifying the -o unsafe option, which will
               cause  the  volume  to be enabled during the above
               situations. As the name  suggests,  this  is  con-
               sidered  unsafe  because doing so could cause data
               loss.

               If only the -o delayrecover option is specified to
               start a volume with a stale subdisk or an unusable
               subdisk, the start operation will  fail.  In  this
               case,  the  delayrecover  option can be ignored by
               also specifying the -o syncstartok option.

     stop      Stopping a raid5 volume disables  the  volume  and
               its  associated  plexes.  If  the volume is in the
               SYNC state, it is changed to the NEEDSYNC state so

VxVM 3.0            Last change: 11 Dec 1998                   16

Maintenance Commands                                    vxvol(1M)

               that recovery will be performed at the next start.
               Any invalid or detached RAID-5 logs are set to the
               BADLOG  state so that they will not be used during
               the next start.

               Normally, the stop  operation  will  fail  if  any
               extended operations are using the volume or any of
               its plexes. Such  operations  are  detected  as  a
               non-empty  value  for the tutil0 field in a volume
               or plex record. If the  -f  option  is  specified,
               then  the  stop  operation ignores volume and plex
               tutil0 fields.

FILES
     /etc/vx/type/usetype/vxvol    The  utility   that   performs
                                   volume  operations  for a par-
                                   ticular volume usage type.

     /dev/vx/dsk/group/volume      The device node  that  can  be
                                   used  for mounting a file sys-
                                   tem  created  on  the   volume
                                   named volume in the disk group
                                   named group.  Volumes in group
                                   rootdg are also directly under
                                   the /dev/vx/dsk directory.

     /dev/vx/rdsk/group/volume     The device node  that  can  be
                                   used   for   issuing  raw  I/O
                                   requests and also for  issuing
                                   ioctl  requests  to the volume
                                   named  volume  in  disk  group
                                   named group.  Volumes in group
                                   rootdg are also directly under
                                   the /dev/vx/rdsk directory.

EXIT CODES
     The vxvol  utility  exits  with  a  nonzero  status  if  the
     attempted  operation  fails.   A  nonzero exit code is not a
     complete indicator of the problems encountered,  but  rather
     denotes the first condition that prevented further execution
     of the utility.

     See vxintro(1M) for a list of standard exit codes.

SEE ALSO
     vxassist(1M), vxdg(1M), vxinfo(1M), vxintro(1M), vxmend(1M),
     vxplex(1M), vxrecover(1M)

VxVM 3.0            Last change: 11 Dec 1998                   17

# 

