Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Let The Music Play: Join EFF Today

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 52 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

lvcreate




SYNOPSIS

       lvcreate [-A|--autobackup {y|n}]  [-C|--contiguous  {y|n}]
       [-d|--debug]     [-h|--help]    [-i|--stripes    StripesI]
       [-I|--stripesize  StripeSizeI]]  {-l|--extents  LogicalEx­
       tentsNumber|     -L|--size    LogicalVolumeSize[kKmMgGtT]}
       [-n|--name   LogicalVolumeName]    [-p|--permission{r|rw}]
       [-r|--readahead        ReadAheadSectors]        [-v|--ver­
       bose][-Z|--zero{y|n}]    VolumeGroupName     [PhysicalVol­
       umePath...]

       lvcreate {-l/--extents LogicalExtentsNumber |
        -L/--size   LogicalVolumeSize[kKmMgGtT]}  [-c/--chunksize
       ChunkSize] -s/--snapshot -n/--name  SnapshotLogicalVolume­
       Name OriginalLogicalVolumePath [PhysicalVolumePath...]


DESCRIPTION

       lvcreate  creates a new logical volume in a volume group (
       see  vgcreate(8),  vgchange(8)  )  by  allocating  logical
       extents  from the free physical extent pool of that volume
       group.  If there are not enough free physical extents then
       the  volume group can be extended ( see vgextend(8) ) with
       other physical volumes or  by  reducing  existing  logical
       volumes  of  this  volume group in size ( see lvreduce(8),
       e2fsadm(8) ).
       The second form supports the creation of snapshot  logical
       volumes  which  keep  the contents of the original logical
       volume for backup purposes.

   OPTIONS
       -A, --autobackup {y|n}
              Controls automatic backup of VG metadata after  the
              change ( see vgcfgbackup(8) ).
              Default is yes.

       -c, --chunksize ChunkSize
              Power of 2 chunk size for the snapshot logical vol­
              ume between 4k and 1024k.

       -C, --contiguous y/n
              Sets or resets the contiguous allocation policy for
              logical  volumes.  Default is no contiguous alloca­
              tion based on a next free principle.

       -d, --debug
              Enables additional debugging  output  (if  compiled
              with DEBUG).

       -h, --help
              Print  a  usage message on standard output and exit
              successfully.

       -L, --size LogicalVolumeSize[kKmMgGtT]
              Gives the size to allocate for the new logical vol­
              ume.   A  size  suffix  of  K  for kilobytes, M for
              megabytes, G for gigabytes or T  for  terabytes  is
              optional.
              Default unit is megabytes.

       -n, --name LogicalVolumeName
              The name for the new logical volume.
              Without this option a default names of "lvol#" will
              be generated where # is the LVM internal number  of
              the logical volume.

       -p, --permission r/w
              Set  access  permissions  to  read only or read and
              write.
              Default is read and write.

       -r, --readahead ReadAheadSectors
              Set read ahead sector count of this logical  volume
              to a value between 2 and 120.

       -s, --snapshot
              Create  a snapshot logical volume (or snapshot) for
              an existing, so called original logical volume  (or
              origin).  Snapshots provide a 'frozen image' of the
              contents of the origin while the origin  can  still
              be  updated.  They  enable  consistent  backups and
              online recovery of removed/overwritten  data/files.
              The snapshot does not need the same amount of stor­
              age the origin has. In a typical  scenario,  15-20%
              might  be  enough. In case the snapshot runs out of
              storage, use lvextend(8) to grow  it.  Shrinking  a
              snapshot  is  supported by lvreduce(8) as well. Run
              lvdisplay(8) on the snapshot in order to check  how
              much data is allocated to it.

       -v, --verbose
              Gives  verbose information about lvcreate's activi­
              ties.

       -Z, --zero y/n
              Controls zeroing of the first KB of data in the new
              logical volume.
              Default is yes.

              Warning: trying to mount an unzeroed logical volume
              can cause the system to hang.


Examples

       "lvcreate -i 3 -I 8 -L 100 vg00" tries to create a striped
       logical  volume  with 3 stripes, a stripesize of 8KB and a


DIAGNOSTICS

       lvcreate  returns an exit code of 0 for success or > 0 for
       error:

       1  invalid volume group name
       2  error checking existence of volume group
       3  volume group inactive
       4  invalid logical volume name
       5  error getting status of logical volume
       6  error checking existence of logical volume
       7  invalid physical volume name
       8  invalid number of physical volumes
       9  invalid number of stripes
       10 invalid stripe size
       11 error getting status of volume group
       12 invalid logical volume size
       13 invalid number of free physical extents
       14 more stripes than physical volumes requested
       15 error reading VGDA
       16 requested physical volume not in volume group
       17 error reading physical volume
       18 maximum number of logical volumes exceeded
       19 not enoungh space available to create logical volume
       20 error setting up VGDA for logical volume creation
       21 error creating VGDA for logical volume in kernel
       22 error writing VGDA to physical volume(s)
       23 error creating device special for logical volume
       24 error opening logical volume
       25 error writing to logical volume
       26 invalid read ahead sector count
       27 no free logical volume manager block specials available
       28 invalid snapshot logical volume name
       29 error setting up snapshot copy on write exception table
       30 error initializing snapshot copy on write exception table on disk
       31 error getting status of logical volume from kernel
       32 snapshot already exists

       95 driver/module not in kernel
       96 invalid I/O protocol version
       97 error locking logical volume manager
       98 invalid lvmtab (run vgscan(8))
       99 invalid command line


ENVIRONMENT VARIABLES

       LVM_AUTOBACKUP
              If this variable is set to "no" then the  automatic
              backup of VG metadata is turned off.

       LVM_VG_MAX_BACKUPS
              This  variable  determines the backup history depth
              of kept VGDA copy files in /etc/lvmconf. It can  be
              set  to  a  positive number between 0 and 999.  The


AUTHOR

       Heinz Mauelshagen <Linux-LVM@Sistina.com>

Heinz Mauelshagen           LVM TOOLS                 LVCREATE(8)
  

The Linux Tutorial is always looking for new contributors.


Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
You can help in many different ways.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds