Seth Woolley's Man Viewer

Manual for lvm - man lvm

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

LVM(8)                                                                  LVM(8)



NAME
       lvm(5,8) - LVM2 tools

SYNOPSIS
       lvm(5,8) [command | file(1,n)]

DESCRIPTION
       lvm(5,8)  provides  the command-line tools for LVM2.  A separate manual page
       describes each command in(1,8) detail.

       If lvm(5,8) is invoked with no  arguments  it  presents  a  readline  prompt
       (assuming  it was compiled with readline support).  LVM commands may be
       entered interactively at this prompt with readline facilities including
       history(1,3,n,1 builtins)  and  command name and option completion.  Refer to readline(3)
       for details.

       If lvm(5,8) is invoked with argv[0] set(7,n,1 builtins) to the name of a specific  LVM  com-
       mand  (for  example  by using a hard or soft link(1,2)) it acts as that com-
       mand.

       Where commands take VG or LV names as arguments, the full path name  is
       optional.   An  LV called "lvol0" in(1,8) a VG called "vg0" can be specified
       as "vg0/lvol0".  Where a list of VGs is required but is left  empty,  a
       list  of  all VGs will be substituted.  Where a list of LVs is required
       but a VG is given, a list of all the LVs in(1,8) that  VG  will  be  substi-
       tuted.  So "lvdisplay vg0" will display all the LVs in(1,8) "vg0".  Tags can
       also be used - see addtag below.

       One advantage of using the built-in shell is that configuration  infor-
       mation gets(3,n) cached internally between commands.

       A file(1,n) containing a simple script with one command per line can also be
       given on the command line.  The script can also be executed directly if(3,n)
       the first line is #! followed by the absolute path of lvm(5,8).

BUILT-IN COMMANDS
       The  following commands are built into lvm(5,8) without links normally being
       created in(1,8) the filesystem for them.

       dumpconfig -- Display the configuration information after
              loading lvm.conf (8) and any other configuration files.

       formats -- Display recognised metadata formats.

       help -- Display the help text.

       pvdata -- Not implemented in(1,8) LVM2.

       segtypes -- Display recognised logical volume segment types.

       version(1,3,5) -- Display version(1,3,5) information.

       The following commands are not implemented in(1,8)  LVM2  but  might  be  in(1,8)
       future: lvmsadc, lvmsar, pvdata, pvresize.

OPTIONS
       The following options are available for many of the commands.  They are
       implemented generically and documented here  rather  than  repeated  on
       individual manual pages.

       -h | --help -- Display the help text.

       --version -- Display version(1,3,5) information.

       -v | --verbose -- Set verbose level.
              Repeat from 1 to 3 times to increase the detail of messages sent
              to stdout and stderr.  Overrides config(1,5) file(1,n) setting.

       -d | --debug -- Set debug level.
              Repeat from 1 to 6 times to increase the detail of messages sent
              to the log file(1,n) and/or syslog(2,3,5,3 Sys::Syslog) (if(3,n) configured).  Overrides config(1,5)
              file(1,n) setting.

       --quiet -- Suppress output and log messages.
              Overrides -d and -v.

       -t | --test -- Run in(1,8) test mode.
              Commands will not update(7,n) metadata.  This is implemented by  dis-
              abling  all  metadata writing but nevertheless returning success
              to the calling function.  This may lead to  unusual  error(8,n)  mes-
              sages in(1,8) multi-stage operations if(3,n) a tool relies on reading back
              metadata it believes has changed but hasn't.

       --driverloaded { y | n }
              Whether or not the device-mapper kernel driver  is  loaded.   If
              you  set(7,n,1 builtins)  this  to  n,  no  attempt  will be made to contact the
              driver.

       -A | --autobackup { y | n }
              Whether or not to metadata should  be  backed  up  automatically
              after  a  change.  You are strongly advised not to disable this!
              See vgcfgbackup (8).

       -P | --partial
              When set(7,n,1 builtins), the tools will do their best to provide access(2,5) to vol-
              ume  groups  that are only partially available.  Where part of a
              logical volume is missing, /dev/ioerror will be substituted, and
              you  could  use  dmsetup (8) to set(7,n,1 builtins) this up to return I/O errors
              when accessed, or create it as a large block  device  of  nulls.
              Metadata  may  not  be  changed  with  this  option. To insert a
              replacement physical volume of the same or large size use pvcre-
              ate  -u  to set(7,n,1 builtins) the uuid to match the original followed by vgcf-
              grestore (8).

       -M | --metadatatype type
              Specifies which type of on-disk metadata to use, such as lvm1 or
              lvm2,  which  can  be  abbreviated  to 1 or 2 respectively.  The
              default (lvm2) can be changed by setting format  in(1,8)  the  global
              section of the config(1,5) file.

       --ignorelockingfailure
              This lets you proceed with read-only metadata operations such as
              lvchange -ay and vgchange -ay even if(3,n) the locking module  fails.
              One  use  for this is in(1,8) a system init script if(3,n) the lock direc-
              tory is mounted read-only when the script runs.

       --addtag tag
              Add the tag tag to a PV, VG or LV.  A tag is a word that can  be
              used  to group LVM2 objects of the same type together.  Tags can
              be given on the command line in(1,8) place of PV, VG or LV arguments.
              Tags  should be prefixed with @ to avoid ambiguity.  Each tag is
              expanded by replacing it with all objects  possessing  that  tag
              which  are  of  the type expected by its position on the command
              line.  PVs can only possess tags while they are part of a Volume
              Group:  PV  tags are discarded if(3,n) the PV is removed from the VG.
              As an example, you could tag some LVs as database and others  as
              userdata  and  then activate the database ones with lvchange -ay
              @database.  Objects can possess  multiple  tags  simultaneously.
              Only  the  new  LVM2  metadata  format supports tagging: objects
              using the LVM1 metadata format cannot be tagged because the  on-
              disk  format  does  not support it.  Snapshots cannot be tagged.
              Characters allowed in(1,8) tags are: A-Z a-z 0-9 _ + . -

       --deltag tag
              Delete the tag tag from a PV, VG or LV, if(3,n) it's present.

       --alloc AllocationPolicy
              The allocation policy to use: contiguous,  normal,  anywhere  or
              inherit.  When a command needs to allocate physical extents from
              the volume group, the allocation policy controls  how  they  are
              chosen.   Each volume group and logical volume has an allocation
              policy.  The default for a volume group is normal which  applies
              common-sense  rules  such as not placing parallel stripes on the
              same physical volume.  The  default  for  a  logical  volume  is
              inherit  which  applies the same policy as for the volume group.
              These policies can be changed using lvchange  (8)  and  vgchange
              (8)  or over-ridden on the command line of any command that per-
              forms allocation.   The  contiguous  policy  requires  that  new
              extents  are  adjacent  to existing extents. If there are suffi-
              cient free extents to satisfy an allocation request  but  normal
              doesn't  use  them, anywhere will - even if(3,n) that reduces perfor-
              mance by placing two stripes on the same physical volume.

              N.B. The policies described above are not implemented fully yet.
              In particular, contiguous does not place new extents adjacent to
              existing extents and anywhere is not implemented at all.

ENVIRONMENT VARIABLES
       LVM_SYSTEM_DIR
              Directory  containing  lvm.conf  and  other  LVM  system  files.
              Defaults to "/etc/lvm(5,8)".

       HOME   Directory containing .lvm_history if(3,n) the internal readline shell
              is invoked.

       LVM_VG_NAME
              The volume group name that is assumed for  any  reference  to  a
              logical volume that doesn't specify a path.  Not set(7,n,1 builtins) by default.

DIAGNOSTICS
       All tools return a status code of zero on success or non-zero on  fail-
       ure.

FILES
       /etc/lvm(5,8)/lvm.conf
       $HOME/.lvm_history

SEE ALSO
       clvmd(8),  lvchange(8),  lvcreate(8),  lvdisplay(8),  lvextend(8), lvm-
       change(8), lvmdiskscan(8), lvreduce(8), lvremove(8), lvrename(8), lvre-
       size(8),  lvs(8),  lvscan(8),  pvchange(8),  pvcreate(8), pvdisplay(8),
       pvmove(8), pvremove(8), pvs(8), pvscan(8), vgcfgbackup(8), vgchange(8),
       vgck(8),  vgconvert(8),  vgcreate(8),  vgdisplay(8), vgextend(8), vgim-
       port(8),   vgmerge(8),    vgmknodes(8),    vgreduce(8),    vgremove(8),
       vgrename(8), vgs(8), vgscan(8), vgsplit(8), readline(3), lvm.conf(5)




Sistina Software UK                LVM TOOLS                            LVM(8)

References for this manual (incoming links)