Name

Published on January 2017 | Categories: Documents | Downloads: 67 | Comments: 0 | Views: 335
of 37
Download PDF   Embed   Report

Comments

Content

NAME
lvm - Linux Logical Volume Manager
DESCRIPTION
lvm is a logical volume manager for Linux. It enables you to concatenate several
physical volumes (hard disks etc.) into a so called volume group (VG, see
pvcreate(8) and vgcreate(8) ) forming a storage pool, like a virtual disk. IDE, SCSI
disks as well as multiple devices (MD) are supported. The storage capacity of a
volume group can be divided into logical volumes (LVs), like virtual disk partitions.
The size of a logical volume is in multiples of physical extents (PEs, see lvcreate(8)
).
The size of the physical extents can be configured at volume group creation time. If
a logical volume is too small or too large you can change its size at runtime ( see
lvextend(8) and lvreduce(8) ). lvcreate(8) can be used to create snapshots of
existing logical volumes (so called original logical volumes in this context) as well.
Creating a snapshot logical volumes grants access to the contents of the original
logical volume it is associated with and exposes the read only contents at the
creation time of the snapshot. This is useful for backups or for keeping several
versions of filesystems online.
If you run out of space in a volume group it is possible to add one or more
pvcreate'd disks to the system and put them into an existing volume group ( see
vgextend(8) ). The space on these new physical volumes can be dynamically
added to logical volumes in that volume group ( see lvextend(8) ).
To remove a physical volume from the system you can move allocated logical
extents to different physical volumes ( see pvmove(8) ). After the pvmove the
volume group can be reduced with the vgreduce(8) command.
Inactive volume groups must be activated with vgchange(8) before use.
vgcreate(8) automatically activates a newly created volume group.
Abbreviations
PV for physical volume, PE for physical extent, VG for volume group, LV for logical
volume, and LE for logical extent.
Command naming convention
All command names corresponding to physical volumes start with pv, all the ones
concerned with volume groups start with vg and all for logical volumes with lv.
General purpose commands for the lvm as a whole start with lvm.
VGDA
The volume group descriptor area (or VGDA for short) holds the necessary metadata
to handle the LVM functionality. It is stored at the beginning of each pvcreate'd disk.
It contains four parts: one PV descriptor, one VG descriptor, the LV descriptors and
several PE descriptors. LE descriptors are derived from the PE ones at vgchange(8)
time. Automatic backups of the VGDA are stored in files in /etc/lvmconf/ (please see
vgcfgbackup(8)/vgcfgrestore(8) too). Take care to include these files in your
regular (tape) backups as well.

Limits
Currently up to 99 volume groups with a grand total of 256 logical volumes can be
created. The limit for the logical volumes is not caused by the LVM but by Linux 8 bit
device minor numbers. This means that you can have 99 volume groups with 1-3
logical volumes each or on the other hand 1 volume group with up to 256 logical
volumes or anything in between these extreme examples. Depending on the
physical extent size specified at volume group creation time (see vgcreate(8) ),
logical volumes of between a maximum of 512 Megabytes and 1 Petabyte can
be created. Actual Linux kernels on IA32 limit these lvm possibilities to a maximum
of 2 Terabytes per logical and per physical volume as well. This enables you to
have as much as 256 Terabytes under LVM control with all possible 128 scsi disk
subsystems. You can have up to 65534 logical extents (on IA32) in a logical volume
at the cost of 1 Megabyte in kernel memory. Physical volumes can have up to 65534
physical extents.
/proc filesystem support
The operational state of active volume groups with their physical and logical
volumes can be found in the /proc/lvm/ directory. /proc/lvm/global contains a
summary of all available information regarding all VGs, LVs and PVs. The two flags
for PV status in brackets mean A/I for active/inactive and A/N for allocatable or nonallocatable. The four flags for LV status in brackets mean A/I for active/inactive,
R/W for read-only or read/write, D/C for discontiguous or contiguous and L/S for
linear or striped. S can optionally be followed by the number of stripes in the set. At
/proc/lvm/VGs/ starts a subdirectory hierarchy containing information about every
VG in a different subdirectory named /proc/lvm/VGs/VolumeGroupName where
VolumeGroupName stands for an arbitrary VG name.
/proc/lvm/VGs/VolumeGroupName/ in turn holds a file group containing
summary information for the VG as a total.
/proc/lvm/VGs/VolumeGroupName/LVs/LogicalVolumeName holds information
for an arbitrary LV named LogicalVolumeName
/proc/lvm/VGs/VolumeGroupName/PVs/PhysicalVolumeName contains
information for an arbitrary PV named PhysicalVolumeName. All of the information
in the files below /proc/lvm/VGs/ is presented in attribute/value pairs to be easyly
parsable.
Examples
We have disk partitions /dev/sda3, /dev/sdb1 and /dev/hda2 free for use and want to
create a volume group named "test_vg". Steps required:

1. Change partition type for these 3 partitions to 0x8e with fdisk. (see pvcreate(8): 0x8e
identifies LVM partitions)
2. pvcreate /dev/sda3 /dev/sdb1 /dev/hda2
3. vgcreate test_vg /dev/sda3 /dev/sdb1 /dev/hda2

With our volume group "test_vg" now online, we can create logical volumes. For example a
logical volume with a size of 100MB and standard name (/dev/test_vg/lvol1) and another one
named "my_test_lv" with size 200MB striped (RAID0) across all the three physical volumes.
Steps required:
1. lvcreate -L 100 test_vg
2. lvcreate -L 200 -n my_test_lv -i 3 test_vg
Now let's rock and roll. For example create a file system with "mkfs -t ext2
/dev/test_vg/my_test_lv" and mount it with "mount /dev/test_vg/my_test_lv /usr1"

NAME
lvcreate - create a logical volume in an existing volume group

SYNOPSIS
lvcreate [-A|--autobackup {y|n}] [-C|--contiguous {y|n}] [-d|--debug] [-h|--help] [-i|--stripes
StripesI] [-I|--stripesize StripeSizeI]] {-l|--extents LogicalExtentsNumber| -L|--size
LogicalVolumeSize[kKmMgGtT]} [-n|--name LogicalVolumeName] [-p|--permission{r|rw}] [r|--readahead ReadAheadSectors] [-v|--verbose][-Z|--zero{y|n}] VolumeGroupName
[PhysicalVolumePath...]
lvcreate {-l/--extents LogicalExtentsNumber |
-L/--size LogicalVolumeSize[kKmMgGtT]} [-c/--chunksize ChunkSize] -s/--snapshot -n/--name
SnapshotLogicalVolumeName 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 volume between 4k and 1024k.
-C, --contiguous y/n
Sets or resets the contiguous allocation policy for logical volumes. Default is no
contiguous allocation 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.
-i, --stripes Stripes
Gives the number of stripes. This is equal to the number of physical volumes to scatter
the logical volume.
-I, --stripesize StripeSize
Gives the number of kilobytes for the granularity of the stripes.
StripeSize must be 2^n (n = 2 to 9)
-l, --extents LogicalExtentsNumber
Gives the number of logical extents to allocate for the new logical volume.
-L, --size LogicalVolumeSize[kKmMgGtT]
Gives the size to allocate for the new logical volume. 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 storage
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 activities.
-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 size of 100MB in the volume group named vg00. The logical volume name will be
chosen by lvcreate.
"lvcreate --size 100m --snapshot --name snap /dev/vg00/lvol1"
creates a snapshot logical volume named /dev/vg00/snap which has access to the contents of the
original logical volume named /dev/vg00/lvol1 at snapshot logical volume creation time. If the
original logical volume contains a file system, you can mount the snapshot logical volume on an
arbitrary directory in order to access the contents of the filesystem to run a backup while the
original filesystem is updated.
vgcreate - create a volume group

SYNOPSIS
vgcreate [-A|--autobackup {y|n}] [-d|--debug] [-h|--help] [-l|--maxlogicalvolumes
MaxLogicalVolumes] [-p|--maxphysicalvolumes MaxPhysicalVolumes] [-s|--physicalextentsize
PhysicalExtentSize[kKmMgGtT]] [-v|--verbose] [--version] VolumeGroupName
PhysicalVolumePath [PhysicalVolumePath...]

DESCRIPTION
vgcreate creates a new volume group called VolumeGroupName using the block special device
PhysicalVolumePath previously configured for LVM with pvcreate(8).

OPTIONS
-A, --autobackup {y|n}
Controls automatic backup of VG metadata after the change (see vgcfgbackup(8)).
Default is yes.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-l, --maxlogicalvolumes MaxLogicalVolumes
Sets the maximum possible logical volume count. More logical volumes can't be created
in this volume group. Absolute maximum is 256.
-p, --maxphysicalvolumes MaxPhysicalVolumes

Sets the maximum possible physical volume count. More physical volumes can't be
included in this volume group. Absolute maximum is 256.
-s, --physicalextentsize PhysicalExtentSize[kKmMgGtT]
Sets the physical extent size on physical volumes of this volume group. A size suffix (k
for kilobytes up to t for terabytes) is optional, megabytes is the default if no suffix is
present. Values can be from 8 KB to 16 GB in powers of 2. The default of 4 MB causes
maximum LV sizes of ~256GB because as many as ~64k extents are supported per LV. In
case larger maximum LV sizes are needed (later), you need to set the PE size to a larger
value as well. Later changes of the PE size in an existing VG are not supported.
-v, --verbose
Display verbose runtime information about vgcreate's activities.
--version
Display tool and IOP version and exit successfully.

EXAMPLES
To create a volume group named test_vg using physical volumes /dev/hdk1, /dev/hdl1, and
/dev/hdm1 with default physical extent size of 4MB:
vgcreate test_vg /dev/sd[k-m]1

NOTE: If you are using devfs it is essential to use the full devfs name of the device rather than
the symlinked name in /dev. so: the above could be
vgcreate test_vg /dev/scsi/host1/bus0/target[1-3]/lun0/part1

To limit kernel memory usage, there is a limit of 65536 physical extents (PE) per logical volume,
so the PE size determines the maximum logical volume size. The default PE size of 4MB limits a
single logical volume to 256GB (see the -s option to raise that limit). There is also (as of Linux
2.4) a kernel limitation of 2TB per block device.

NAME
lvchange - change attributes of a logical volume

SYNOPSIS
lvchange [-A|--autobackup {y|n}] [-a|--available {y|n}] [-C|--contiguous {y|n}] [-d|--debug] [h|--help] [-p|--permission {r|rw}] [-r|--readahead ReadAheadSectors] [-v/--verbose]
LogicalVolumePath [LogicalVolumePath...]

DESCRIPTION

lvchange allows you to change the attributes of a logical volume.

OPTIONS
-A, --autobackup y/n
Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ).
Default is yes.
-a, --available y/n
Controls the availability of the logical volumes for use. This is (among others) useful for
changing the logical volume's name ( see lvrename(8) ) safely.
-C, --contiguous y/n
Tries to set or resets the contiguous allocation policy for logical volumes. It's only
possible to change a non-contiguous logical volume's allocation policy to contiguous, if
all of the allocated physical extents are already contiguous.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-p, --permission r/w
Change access permission to read-only or read/write.
-r, --readahead ReadAheadSectors
Change read ahead sector count per logical between 2 and 120.
-v, --verbose
Gives verbose runtime information about lvchange's activities.

Examples
"lvchange -x n /dev/vg00/lvol1" prevents the allocation of any physical extents on logical
volume lvol1 in volume group vg00.

lvdisplay - display attributes of a logical volume

SYNOPSIS
lvdisplay [-c|--colon] [-d|--debug] [-D|--disk] [-h|--help] [-v[v]|--verbose] LogicalVolumePath
[LogicalVolumePath...]

DESCRIPTION
lvdisplay allows you to see the attributes of a logical volume like size, read/write status, snapshot
information etc.

OPTIONS
-c, --colon
Generate colon seperated output for easier parsing in scripts or programs.
The values are:
*
*
*
*
*
*
*
*
*
*
*
*
*

logical volume name
volume group name
logical volume access
logical volume status
internal logical volume number
open count of logical volume
logical volume size in kilobytes
current logical extents associated to logical volume
allocated logical extents of logical volume
allocation policy of logical volume
read ahead sectors of logical volume
major device number of logical volume
minor device number of logical volume

-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-D, --disk
Show attributes of the volume group descriptor array on disk(s). Without this switch they
are derived from kernel space. Useful, if the volume group isn't active.
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Display the mapping of logical extents to physical volumes and physical extents.
-vv, --verbose --verbose
Like -v with verbose runtime information.

Examples
"lvdisplay -v /dev/vg00/lvol2" shows attributes of that logical volume and its mapping of logical
to physical extents. In case snapshot logical volumes have been created for this original logical
volume, this command shows a list of all snapshot logical volumes and their status (active or
inactive) as well.
"lvdisplay /dev/vg00/snapshot" shows the attributes of this snapshot logical volume and also
which original logical volume it is associated with.

NAME
lvmchange - change attributes of the logical volume manager

SYNOPSIS
lvmchange [-d|--debug] [-f|--force] [-h|--help] {[-i|--iop_verion]| [-R|--reset]} [-v|--verbose]

DESCRIPTION
lvmchange allows you to reset the logical volume manager. Please be careful to have all logical
volumes closed and/or unused!

OPTIONS
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-f, --force
Force the action without confirmation.
-h, --help
Print a usage message on standard output and exit successfully.
-i, --iop_version
Display the LVM io protocol version. This version number ensures that no incompatible
data is passed to the driver.
-R, --reset
Emergency reset of the logical volume manager. This function is a "last resort" if
something goes wrong to allow the the logical volume manager module to be unloaded.
Not used in normal operation. Please be careful NOT to reset when logical volumes are in
use!!!
-v, --verbose
Gives verbose information about lvmchange's activities.

Example
"lvmchange -fR" resets the logical volume manager without confirmation.

lvmdiskscan - scan for all disks / multiple devices / partitions available

SYNOPSIS
lvmdiskscan [-d|--debug] [-h|--help] [-l|--lvmpartitions] [-v|--verbose]

DESCRIPTION

To give an overview about online peripherals usable to LVM, lvmdiskscan scans all SCSI,
(E)IDE disks, multiple, loop and network block devices in the system and lists them on standard
output with name, size and type (text/hex). The size is the real device size, not the size stored in
the VGDA (See pvcreate(8) ) for details.

OPTIONS
-d/--debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-l, --lvmpartition
Gives an overview about all LVM system identified partitions only.
-v, --verbose
Gives verbose runtime information about lvmdiskscan's activities.

Important: Use the man command (% man) to see how a command is used on your
particular computer.

NAME
lvmcreate_initrd - create an initial ramdisk to boot with root on a logical volume

SYNOPSIS
lvcmreate_initrd [-i|--iop IOP] [-D|--devfs] [-v|--verbose] [-V|--version] [KernelVersion]

DESCRIPTION
lvmcreate_initrd creates a new compressed initial ramdisk /boot/initrd-lvm-KernelVersion.gz.
The initial ramdisk contains all necessary binaries, shared libraries and a linuxrc file to switch to
a logical volume based root filesystem. To build an initial ramdisk for a kernel other than the one
currently running add the KernelVersion parameter (e.g. lvmcreate_initrd 2.3.25) on the
command line.

OPTIONS
-h, --help
Print a usage message on standard output and exit.
-i, --iop IOP
Specify the LVM kernel IOP version if you are using wrapper scripts in /sbin. This is only
necessary if you are building an initrd for a kernel other than the current one, and you
have tools for multiple IOP versions installed.

-D, --devfs
Force the use of devfs when building the initrd. lvmcreate_initrd by default probes for
devfs by checking for /dev/.devfsd, which is created by devfsd when it is running. This
option will force lvmcreate_initrd to do this, when devfsd is not currently running.
-v, --verbose
Gives verbose runtime information about the creation of the ram disk image.
-V, --version
Print version number and exit successfully.
The necessary actions to change your system into a "root on logical volume" one are:
Create a small (~20MB) partition which is BIOS reachable to hold the /boot filesystem (if you
already have a small partition based root filesystem this can be used instead). If you want to boot
standalone from this partition in an emergency, copy all the necessary binaries and libraries to
that filesystem as well and create a corresponding /etc/lilo.conf entry. In order to be able to edit
lilo.conf when booted standalone, you should move /etc/lilo.conf to /boot/lilo.conf and create a
symbolic link to it in /etc. This is not needed if you have a boot/root floppy which contains the
LVM binaries and the library.
Create all logical volumes you need (for root, usr, opt etc.), create filesystems in them, mount
them and transfer all files from the partition based filesystems into the logical volume based
ones.
Set up your /etc/lilo.conf with a boot configuration like:
image = /boot/vmlinuz
initrd = /boot/initrd-lvm-KernelVersion.gz
root = /dev/YourVG/YourRootLV
label = rootonlv
append = 'ramdisk_size=8192'

Replace YourVG and YourRootLV by your actual volume group and root logical volume names.
You also need to change the ramdisk size to be at least as large as that reported while
lvmcreate_initrd is run. If you have enough memory, it is OK if the ramdisk size in
/etc/lilo.conf is larger than what lvmcreate_initrd reports (the memory is freed after booting).
Also, your /etc/fstab in the root logical volume should contain entries for the root LV, and the
boot partition, along with any other LVs you have configured:
/dev/YourVG/YourRootLV
/dev/YourBootPartition
/dev/YourVG/YourUsrLV
/dev/YourVG/YourOptLV
etc.

/
/boot
/usr
/opt

ext2
ext2
ext2
ext2

defaults
defaults
defaults
defaults

0
0
0
0

1
2
3
4

You can use other supported filesystem types as well (e.g. reiserfs) if you have support for those
in your kernel. Run lilo, reboot and try...

The partitions containing the former /usr, /opt etc. filesystems can now be used as physical
volumes. Use pvcreate(8) to turn them into PVs and then use vgextend(8) to add them to e.g.
YourVG.

NAME
lvmsadc - LVM system activity data collector

SYNOPSIS
lvmsadc [-d|--debug] [-h|--help] [-v|--verbose] [LogFilePath]

DESCRIPTION
lvmsadc collects the read/write statistics of the logical volume manager to the file "LogFilePath"
or to stdout if no LogFilePath is given. If you want to have I/O statistics at hand for performance
tuning, you should create a cron entry for lvmsadc which runs it at regular intervals eg. 10
minutes. You need to take care of size control of the log file yourself!

OPTIONS
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose runtime information about lvmsadc's activities.
NAME

lvmsar - LVM system activity reporter

SYNOPSIS
lvmsar [-d|--debug] [-f|--full] [-h|--help] [-v|--verbose] LogFilePath

DESCRIPTION
lvmsar reports the read/write statistics of the logical volume manager previously gathered by
lvmsadc(8) in the file "LogFilePath".

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

-f, --full
Generates full listing with read/write statistics for each logical extent.
-h, --help
Print a usage message on standard output and exit successfully.
-s, --stdin
Read LVM statistics data generated by lvmsadc(8) from <stdin> rather than from file.
-v, --verbose
Gives verbose runtime information about lvmsar's activities.
NAME

lvreduce - reduce the size of a logical volume

SYNOPSIS
lvreduce [-A|--autobackup {y|n}] [-d|--debug] [-f|--force] [-h|--help] {-l|--extents
[-]LogicalExtentsNumber| -L|--size [-]LogicalVolumeSize[kKmMgGtT]} [-v|--verbose]
LogicalVolumePath

DESCRIPTION
lvreduce allows you to reduce the size of a logical volume. Be careful when reducing a logical
volume's size, because data in the reduced part is lost!!!
You should therefore ensure that the (eg) filesystem on the volume is resized running lvreduce so
that the extents that are to be removed are not in use. If the filesystem is ext2 then you can use
the e2fsadm(8) command to both resize the filesystem and the logical volume together.
Shrinking snapshot logical volumes (see lvcreate(8) for information to create snapshots) is
supported as well.

OPTIONS
-A, --autobackup y/n
Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ).
Default is yes.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-f, --force
Force size reduction without any question.
-h, --help
Print a usage message on standard output and exit successfully.
-l, --extents [-]LogicalExtentsNumber
Reduce or set the logical volume size in units of logical extents. With the - sign the value
will be subtracted from the logical volume's actual size and without it the will be taken as
an absolute size.
-L, --size [-]LogicalVolumeSize[kKmMgGtT]
Reduce or set the logical volume size in units of megabyte by default. A size suffix of k
for kilobyte, m for megabyte, g for gigabyte or t for terabyte is optional. With the - sign

the value will be subtracted from the logical volume's actual size and without it the will
be taken as an absolute size.
-v, --verbose
Gives verbose runtime information about lvreduce's activities.

Example
"lvreduce -l -3 /dev/vg00/lvol1" reduces the size of logical volume lvol1 in volume group vg00
by 3 logical extents.

NAME
lvremove - remove a logical volume

SYNOPSIS
lvremove [-A|--autobackup {y|n}] [-d|--debug] [-f|--force] [-h|--help] [-v|--verbose]
LogicalVolumePath [LogicalVolumePath...]

DESCRIPTION
lvremove allows you to remove one or more inactive logical volumes.

OPTIONS
-A, --autobackup y/n
Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ).
Default is yes.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-f, --force
Force remove without confirmation.
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose runtime information about lvremove's activities.

Example
"lvremove -f /dev/vg00/lvol1" removes that inactive logical volume unconditionally.

NAME
lvremove - remove a logical volume

SYNOPSIS
lvremove [-A|--autobackup {y|n}] [-d|--debug] [-f|--force] [-h|--help] [-v|--verbose]
LogicalVolumePath [LogicalVolumePath...]

DESCRIPTION
lvremove allows you to remove one or more inactive logical volumes.

OPTIONS
-A, --autobackup y/n
Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ).
Default is yes.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-f, --force
Force remove without confirmation.
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose runtime information about lvremove's activities.

Example
"lvremove -f /dev/vg00/lvol1" removes that inactive logical volume unconditionally.

lvrename - rename a logical volume

SYNOPSIS
lvrename [-A|--autobackup {y|n}] [-d|--debug] [-h|--help] [-v|--verbose] [--version]
{OldLogicalVolumePath NewLogicalVolume{Path|Name} |
VolumeGroupName OldLogicalVolumeName NewLogicalVolumeName}

DESCRIPTION
lvrename renames an existing logical volume from OldLogicalVolume{Name|Path} to
NewLogicalVolume{Name|Path}.

OPTIONS
-A, --autobackup {y|n}
Controls automatic backup of VG metadata after the change (see vgcfgbackup(8)).
Default is yes.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose progress messages.

EXAMPLE
To rename lvold in volume group vg02 to lvnew:
lvrename /dev/vg02/lvold /dev/vg02/lvnew

An alternate syntax to rename this logical volume is
lvrename vg02 lvold lvnew

NAME
lvscan - scan (all disks) for logical volumes

SYNOPSIS
lvscan [-b|--blockdevice] [-d|--debug] [-D|--disk] [-h|--help] [-v|--verbose]

DESCRIPTION
lvscan scans all known volume groups or all supported LVM block devices in the system for
defined logical volumes.

OPTIONS
-b, --blockdevice

Adds the device major and minor numbers to the display of each logical volume.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-D, --disk
Scan for logical volumes on disk(s) instead of getting the information from the kernel.
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose runtime information about lvscan's activities.
--version
Prints version number of tool and exits sucessfully.

NAME
pvchange - change attributes of a physical volume

SYNOPSIS
pvchange [-A|--autobackup {y|n}] [-d|--debug] [-h|--help] [-v|--verbose] [-a|--all] [-x|-allocation {y|n}] [PhysicalVolumePath...]

DESCRIPTION
pvchange allows you to change the allocation permissions of one or more physical volumes.

OPTIONS
-A, --autobackup y/n
Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ).
Default is yes.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose runtime information about pvchange's activities.
-a, --all
If PhysicalVolumePath is not specified on the command line all physical volumes are
searched for and used.
-x, --allocation y/n
Enable or disable allocation of physical extents on this physical volume.

Example

"pvchange -x n /dev/sdk1" disallows the allocation of physical extents on this physical volume
(possibly because of disk errors, or because it will be removed after freeing it. pvcreate initialize a disk or partition for use by LVM

SYNOPSIS
pvcreate [-d|--debug] [-f[f]|--force [--force]] [-y|--yes] [-h|--help] [-v|--verbose] [-V|--version]
PhysicalVolume [PhysicalVolume...]

DESCRIPTION
pvcreate initializes PhysicalVolume for later use by the Logical Volume Manager (LVM). Each
PhysicalVolume can be a disk partition, whole disk, meta device, or loopback file. For DOS disk
partitions, the partition id must be set to 0x8e using fdisk(8), cfdisk(8), or a equivalent. For
whole disk devices only the partition table must be erased, which will effectively destroy all
data on that disk. This can be done by zeroing the first sector with:
dd if=/dev/zero of=PhysicalVolume bs=512 count=1
Continue with vgcreate(8) to create a new volume group on PhysicalVolume, or vgextend(8) to
add PhysicalVolume to an existing volume group.

OPTIONS
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-f, --force
Force the creation without any confirmation. You can not recreate (reinitialize) a physical
volume belonging to an existing volume group. In an emergency you can override this
behaviour with -ff. In no case case can you initialize an active physical volume with this
command.
-s, --size
Overrides the size of the physical volume which is normally retrieved. Useful in rare case
where this value is wrong. More useful to fake large physical volumes of up to 2
Terabyes - 1 Kilobyte on smaller devices for testing purposes only where no real access
to data in created logical volumes is needed. If you wish to create the supported
maximum, use "pvcreate -s 2147483647k PhysicalVolume [PhysicalVolume ...]". All
other LVM tools will use this size with the exception of lvmdiskscan(8)
-y, --yes
Answer yes to all questions.
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose runtime information about pvcreate's activities.
-V, --version

Print the version number on standard output and exit successfully.

Example
Initialize partition #4 on the third SCSI disk and the entire fifth SCSI disk for later use by LVM:
pvcreate /dev/sdc4 /dev/sde

NAME
pvdata - shows debugging information about a physical volume

SYNOPSIS
pvdata [-a|--all] [-d|--debug] [-h|--help] [-E|--physicalextent] [-L|--logicalvolume] [-P[P]|-physicalvolume [--physicalvolume]] [-U|--uuidlist] [-V|--volumegroup] [-v[v]|--verbose [-verbose]] PhysicalVolumePath [PhysicalVolumePath...]

DESCRIPTION
pvdata allows you to display the volume group descriptor array (VGDA) of PhysicalVolume in
part or whole for debugging purposes.

OPTIONS
-a, --all
Display all structures (PE, LV, PV, UUID, VG). The same as giving the -E -L -P -U -V
options.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-E, --physicalextent
Display physical extent structures.
-h, --help
Print a usage message on standard output and exit successfully.
-L, --logicalvolume
Display logical volume structures.
-P, --physicalvolume

Display physical volume structure in pvdisplay format. If given a second time, also
display the on-disk LVM metadata locations.
-U, --uuidlist
Display the volume group UUID list.
-v, --verbose
Display verbose structure information. If given a second time, verbose runtime
information about pvdata's activities are also shown.
-V, --volumegroup
Display volume group structure.
--version
Display the version and exit successfully.

NAME
pvdisplay - display attributes of a physical volume

SYNOPSIS
pvdisplay [-c|--colon] [-d|--debug] [-h|--help] [-s|--short] [-v[v]|--verbose [--verbose]]
PhysicalVolumePath [PhysicalVolumePath...]

DESCRIPTION
pvdisplay allows you to see the attributes of one or more physical volumes like size, physical
extent size, space used for the volume group descriptor area and so on.

OPTIONS
-c, --colon
Generate colon seperated output for easier parsing in scripts or programs.
The values are:
*
*
*
*
*
*
*
*
*
*
*

physical volume device name
volume group name
physical volume size in kilobytes
internal physical volume number
physical volume status
physical volume (not) allocatable
current number of logical volumes on this physical volume
physical extent size in kilobytes
total number of physical extents
free number of physical extents
allocated number of physical extents

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

-h, --help
Print a usage message on standard output and exit successfully.
-s, --short
Only display the size of the given physical volumes.
-v, --verbose
Display the mapping of physical extents to logical volumes and logical extents.
-vv, --verbose --verbose
Like -v with verbose runtime information about pvdisplay's activities.
NAME

pvmove - move physical extents

SYNOPSIS
pvmove [-A|--autobackup{y|n}] [-d|--debug] [-f|--force] [-h|--help] [-i|--ignore_read_errors] [-t|-test] [-v[v]|--verbose [--verbose]] [{-n|--name}LogicalVolume[:LogicalExtent[-LE]...]]
SourcePhysicalVolume[:PhysicalExtent[-PE]...] [DestinationPhysicalVolume[:PE[-PE]...]...]

DESCRIPTION
pvmove allows you to move the allocated physical extents (PEs) on SourcePhysicalVolume to
one or more other physical volumes (PVs). You can optionally select a subset of the allocated
physical extents on SourcePhysicalVolume by giving colon-separated lists and/or ranges of
physical extents, or by specifying the source LogicalVolume optionally with colon-separated lists
and/or ranges of logical extents. In this case only these extents are moved to free (or specified)
extents on DestinationPhysicalVolume(s). If no DestinationPhysicalVolume is specifed, the
normal allocation rules for the volume group are used.
You can move physical extents in use but make sure you have an current backup in case of a
system crash while moving!!!
pvmove may be safely interrupted by SIGINT while moving "next free" allocated logical
volumes. Striped logical volume moves can't be interrupted by SIGINT because that may cause
stripe inconsistencies.

OPTIONS
-A, --autobackup {y|n}
Controls automatic backup of VG metadata after the move (see vgcfgbackup (8)). Default
is yes.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-f, --force
Forces physical extent move without confirmation.
-h, --help
Print a usage message on standard output and exit successfully.

-i, --ignore_read_errors
Ignore read errors while moving data. Usefull in case data is moved away from a broken
or unaccessable disk (area).
-n, --name LogicalVolume[:LogicalExtent[-LogicalExtent]...]
Move only the extents belonging to LogicalVolume from SourcePhysicalVolume instead
of all allocated extents to the destination physical volume(s). A optional colon separated
list or range of logical extents may be given to limit the extents moved.
-t , --test
Do a test run without performing any real changes.
-v , --verbose
Gives verbose runtime information about pvmove's activities. If specified twice, sector
and device mapping information is also given.

EXAMPLES
To move all logical extents of any logical volumes on /dev/hda4 to free physical extents
elsewhere in the volume group, giving verbose runtime information, use:
pvmove -v /dev/hda4
To move three logical extents (numbers 3, 5 and 11) of logical volume my_lv to free ones on
/dev/hdb3 use:
pvmove -n my_lv:3:5:11 /dev/sdb6 /dev/hdb3
To move four logical extents (numbers 1, 25, 26, and 27) of logical volume my_lv on /dev/sdb6
to four physical extents (numbers 46, 47, 48, and 49) on /dev/hdb3 use:
pvmove -n my_lv:1:25-27 /dev/sdb6 /dev/hdb3:46-49

NAME
pvscan - scan all disks for physical volumes

SYNOPSIS
pvscan [-d|--debug] [-e|--exported] [-h|--help] [-n|--novolumegroup] [-s|--short] [-u|--uuid] [v[v]|--verbose [--verbose]]

DESCRIPTION
pvscan scans all supported LVM block devices in the system for physical volumes.

OPTIONS
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-e, --exported
Only show physical volumes belonging to exported volume groups.
-h, --help
Print a usage message on standard output and exit successfully.
-n, --novolumegroup
Only show physical volumes not belonging to any volume group.
-s, --short
Short listing format.
-u, --uuid
Show UUIDs (Unifrom Unique Identifiers) in addition to device special names.
-v, --verbose
Gives verbose runtime information about pvscan's activities. If given a second time it
displays the attributes of found physical volumes like pvdisplay(8) does.
NAME

vgcfgbackup - backup volume group descriptor area

SYNOPSIS
vgcfgbackup [-d|--debug] [-h|--help] [-v|--verbose] [VolumeGroupName...]

DESCRIPTION
vgcfgbackup allows you to backup the metadata or Volume Group Descriptor Area (VGDA) of
one to all volume groups to files in /etc/lvmconf. If you don't give any volume groups in the
command line, all of them will be backed up. This DOESN'T backup user/system data in logical
volume(s)! To restore volume group descriptor area backups see the vgcfgrestore(8) tool. A 10
step history is backed up in /etc/lvmconf/VolumeGroupName.conf and
/etc/lvmconf/VolumeGroupName.conf.[1-9].old. This enables you to restore your volume group
configuration up to 10 steps back in the backup history.

OPTIONS
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose runtime information about vgcfgbackup's activities.
NAME

vgcfgrestore - restore volume group descriptor area

SYNOPSIS
vgcfgrestore [-b|--backup_number VolumeGroupBackupNumber] [-d|--debug] [-f|--file
VGConfPath] [-l[l]|--list [--list]] [-h|--help] [-i|--ignore_size] [-n|--name VolumeGroupName] [o|--oldpath OldPhysicalVolumePath] [-t|--test] [-v|--verbose] [PhysicalVolumePath]

DESCRIPTION
vgcfgrestore allows you to restore the volume group descriptor area from backup files in
/etc/lvmconf or from VGConfPath to the given PhysicalVolumePath. The default backup file is
/etc/lvmconf/VolumeGroupName.conf. This command DOES NOT restore data contained in
logical volume(s), only the LVM configuration metadata!

OPTIONS
-b, --backup_numberVolumeGroupBackupNumber
Restore from the specified backup number. Use together with option -n which gives the
name of the volume group. See examples below.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-f, --file VGConfPath
Restore from the specified path. Useful for selection of specific backups in the backup
history or for copies of VGDA backups.
-i, --ignore_size
Restore though the size of the physical volume doesn't match the one in the backup.
-l, --list
Display volume group information contained in the backup file. If given twice, the
physical and logical volume information contained in the backup file is also shown.
-h, --help
Print a usage message on standard output and exit successfully.
-n, --name VolumeGroupName
Do a restore for this volume group name.
-o, --oldpath OldPhysicalVolumePath
If the path to the physical volume has changed between backup time and restore time, this
option enables you to choose the corresponding physical volume path in the backup file.
-t, --test
Do a test run reading the volume group backup WITHOUT trying to restore it
-v, --verbose
Give verbose runtime information about vgcfgrestore's activities.
--version
Output the version number and exit successfully.

Examples

To display information like with "vgdisplay vg00" stored in the backup file
/etc/lvmconf/vg00.conf:
vgcfgrestore -n vg00 -l

To restore the VGDA of vg00 from the alternative backup file /tmp/vg00-old to physical volume
/dev/sdn1:
vgcfgrestore -f /tmp/vg00-old -n vg00 /dev/sdn1
To restore the VGDA of vg00 from the alternative backup file
/etc/lvmconf/vg00.conf.5.old
to physical volume
/dev/sda5 :
vgcfgrestore -n vg00 -b 5 /dev/sda5

NAME
vgck - check volume group descriptor area

SYNOPSIS
vgck [-d|--debug] [-h|--help] [-v|--verbose] [VolumeGroupName...]

DESCRIPTION
vgck checks the volume group descriptor area consistency of all or given volume groups.

OPTIONS
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Display verbose information of vgck's activities.

NAME
pvdisplay - display attributes of a physical volume

SYNOPSIS

pvdisplay [-c|--colon] [-d|--debug] [-h|--help] [-s|--short] [-v[v]|--verbose [--verbose]]
PhysicalVolumePath [PhysicalVolumePath...]

DESCRIPTION
pvdisplay allows you to see the attributes of one or more physical volumes like size, physical
extent size, space used for the volume group descriptor area and so on.

OPTIONS
-c, --colon
Generate colon seperated output for easier parsing in scripts or programs.
The values are:
*
*
*
*
*
*
*
*
*
*
*

physical volume device name
volume group name
physical volume size in kilobytes
internal physical volume number
physical volume status
physical volume (not) allocatable
current number of logical volumes on this physical volume
physical extent size in kilobytes
total number of physical extents
free number of physical extents
allocated number of physical extents

-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-s, --short
Only display the size of the given physical volumes.
-v, --verbose
Display the mapping of physical extents to logical volumes and logical extents.
-vv, --verbose --verbose
Like -v with verbose runtime information about pvdisplay's activities.
pvcreate - initialize a disk or partition for use by LVM

SYNOPSIS
pvcreate [-d|--debug] [-f[f]|--force [--force]] [-y|--yes] [-h|--help] [-v|--verbose] [-V|--version]
PhysicalVolume [PhysicalVolume...]

DESCRIPTION

pvcreate initializes PhysicalVolume for later use by the Logical Volume Manager (LVM). Each
PhysicalVolume can be a disk partition, whole disk, meta device, or loopback file. For DOS disk
partitions, the partition id must be set to 0x8e using fdisk(8), cfdisk(8), or a equivalent. For
whole disk devices only the partition table must be erased, which will effectively destroy all
data on that disk. This can be done by zeroing the first sector with:
dd if=/dev/zero of=PhysicalVolume bs=512 count=1
Continue with vgcreate(8) to create a new volume group on PhysicalVolume, or vgextend(8) to
add PhysicalVolume to an existing volume group.

OPTIONS
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-f, --force
Force the creation without any confirmation. You can not recreate (reinitialize) a physical
volume belonging to an existing volume group. In an emergency you can override this
behaviour with -ff. In no case case can you initialize an active physical volume with this
command.
-s, --size
Overrides the size of the physical volume which is normally retrieved. Useful in rare case
where this value is wrong. More useful to fake large physical volumes of up to 2
Terabyes - 1 Kilobyte on smaller devices for testing purposes only where no real access
to data in created logical volumes is needed. If you wish to create the supported
maximum, use "pvcreate -s 2147483647k PhysicalVolume [PhysicalVolume ...]". All
other LVM tools will use this size with the exception of lvmdiskscan(8)
-y, --yes
Answer yes to all questions.
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose runtime information about pvcreate's activities.
-V, --version
Print the version number on standard output and exit successfully.

Example
Initialize partition #4 on the third SCSI disk and the entire fifth SCSI disk for later use by LVM:
pvcreate /dev/sdc4 /dev/sde
vgdisplay - display attributes of volume groups

SYNOPSIS
vgdisplay [-A|--activevolumegroups] [-c|--colon] [-d|--debug] [-D|--disk] [-h|--help] [-s|-short] [-v[v]|--verbose [--verbose]] [--version] [VolumeGroupName...]

DESCRIPTION
vgdisplay allows you to see the attributes of VolumeGroupName (or all volume groups if none is
given) with it's physical and logical volumes and their sizes etc.

OPTIONS
-A, --activevolumegroups
Only select the active volume groups.
-c, --colon
Generate colon seperated output for easier parsing in scripts or programs.
The values are:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

volume group name
volume group access
volume group status
internal volume group number
maximum number of logical volumes
current number of logical volumes
open count of all logical volumes in this volume group
maximum logical volume size
maximum number of physical volumes
current number of physical volumes
actual number of physical volumes
size of volume group in kilobytes
physical extent size
total number of physical extents for this volume group
allocated number of physical extents for this volume group
free number of physical extents for this volume group
uuid of volume group

-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-D, --disk
Show attributes from the volume group descriptor area on disk(s). Without this switch
they are shown from the kernel. Useful if the volume group isn't activated.
-h, --help
Print a usage message on standard output and exit successfully.
-s, --short
Give a short listing showing the existence of volume groups.
-v, --verbose
Display verbose information containing long listings of physical and logical volumes. If
given twice, also display verbose runtime information of vgdisplay's activities.

--version
Display version and exit successfully.
vgextend - add physical volumes to a volume group

SYNOPSIS
vgextend [-A|--autobackup{y|n}] [-d|--debug] [-h|--help] [-v|--verbose] VolumeGroupName
PhysicalVolumePath [PhysicalVolumePath...]

DESCRIPTION
vgextend allows you to add one or more initialized physical volumes ( see pvcreate(8) ) to an
existing volume group to extend it in size.

OPTIONS
-A, --autobackup y/n
Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ).
Default is yes.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose runtime information about lvextend's activities.

Examples
"vgextend vg00 /dev/sda4 /dev/sdn1" tries to extend the existing volume group "vg00" by the
new physical volumes (see pvcreate(8) ) "/dev/sdn1" and /dev/sda4".
vgreduce - reduce a volume group

SYNOPSIS
vgreduce [-a|--all] [-A|--autobackup{y|n}] [-d|--debug] [-h|--help] [-v|--verbose]
VolumeGroupName [PhysicalVolumePath...]

DESCRIPTION
vgreduce allows you to remove one or more unused physical volumes from a volume group.

OPTIONS

-a, --all
Removes all empty physical volumes if none are given on command line.
-A, --autobackup y/n
Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ).
Default is yes.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose runtime information about vgreduce's activities.
NAME

lvdisplay - display attributes of a logical volume

SYNOPSIS
lvdisplay [-c|--colon] [-d|--debug] [-D|--disk] [-h|--help] [-v[v]|--verbose] LogicalVolumePath
[LogicalVolumePath...]

DESCRIPTION
lvdisplay allows you to see the attributes of a logical volume like size, read/write status, snapshot
information etc.

OPTIONS
-c, --colon
Generate colon seperated output for easier parsing in scripts or programs.
The values are:
*
*
*
*
*
*
*
*
*
*
*
*
*

logical volume name
volume group name
logical volume access
logical volume status
internal logical volume number
open count of logical volume
logical volume size in kilobytes
current logical extents associated to logical volume
allocated logical extents of logical volume
allocation policy of logical volume
read ahead sectors of logical volume
major device number of logical volume
minor device number of logical volume

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

Show attributes of the volume group descriptor array on disk(s). Without this switch they
are derived from kernel space. Useful, if the volume group isn't active.
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Display the mapping of logical extents to physical volumes and physical extents.
-vv, --verbose --verbose
Like -v with verbose runtime information.

Examples
"lvdisplay -v /dev/vg00/lvol2" shows attributes of that logical volume and its mapping of logical
to physical extents. In case snapshot logical volumes have been created for this original logical
volume, this command shows a list of all snapshot logical volumes and their status (active or
inactive) as well.
"lvdisplay /dev/vg00/snapshot" shows the attributes of this snapshot logical volume and also
which original logical volume it is associated with.

NAME
lvextend - extend the size of a logical volume

SYNOPSIS
lvextend [-A|--autobackup {y|n}] [-d|--debug] [-h|--help] {-l|--extents [+]LogicalExtentsNumber|
-L|--size [+]LogicalVolumeSize[kKmMgGtT]} [-v|--verbose] LogicalVolumePath
[PhysicalVolumePath...]

DESCRIPTION
lvextend allows you to extend the size of a logical volume. Extension of snapshot logical
volumes (see lvcreate(8) for information to create snapshots) is supprted as well.

OPTIONS
-A, --autobackup y/n
Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ).
Default is yes.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.

-l, --extents [+]LogicalExtentsNumber
Extend or set the logical volume size in units of logical extents. With the + sign the value
is added to the actual size of the logical volume and without it, the value is taken as an
absolute one.
-L, --size [+]LogicalVolumeSize[kKmMgGtT]
Extend or set the logical volume size in units in units of megabytes. A size suffix of M for
megabytes, G for gigabytes or T for terabytes is optional. With the + sign the value is
added to the actual size of the logical volume and without it, the value is taken as an
absolute one.
-v, --verbose
Gives verbose runtime information about lvextend's activities.

Examples
"lvextend -L +54 /dev/vg01/lvol10 /dev/sdk3" tries to extend the size of that logical volume by
54MB on physical volume /dev/sdk3. This is only possible if /dev/sdk3 is a member of volume
group vg01 and there are enough free physical extents in it.

lvreduce - reduce the size of a logical volume

SYNOPSIS
lvreduce [-A|--autobackup {y|n}] [-d|--debug] [-f|--force] [-h|--help] {-l|--extents
[-]LogicalExtentsNumber| -L|--size [-]LogicalVolumeSize[kKmMgGtT]} [-v|--verbose]
LogicalVolumePath

DESCRIPTION
lvreduce allows you to reduce the size of a logical volume. Be careful when reducing a logical
volume's size, because data in the reduced part is lost!!!
You should therefore ensure that the (eg) filesystem on the volume is resized running lvreduce so
that the extents that are to be removed are not in use. If the filesystem is ext2 then you can use
the e2fsadm(8) command to both resize the filesystem and the logical volume together.
Shrinking snapshot logical volumes (see lvcreate(8) for information to create snapshots) is
supported as well.

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

Enables additional debugging output (if compiled with DEBUG).
-f, --force
Force size reduction without any question.
-h, --help
Print a usage message on standard output and exit successfully.
-l, --extents [-]LogicalExtentsNumber
Reduce or set the logical volume size in units of logical extents. With the - sign the value
will be subtracted from the logical volume's actual size and without it the will be taken as
an absolute size.
-L, --size [-]LogicalVolumeSize[kKmMgGtT]
Reduce or set the logical volume size in units of megabyte by default. A size suffix of k
for kilobyte, m for megabyte, g for gigabyte or t for terabyte is optional. With the - sign
the value will be subtracted from the logical volume's actual size and without it the will
be taken as an absolute size.
-v, --verbose
Gives verbose runtime information about lvreduce's activities.

Example
"lvreduce -l -3 /dev/vg00/lvol1" reduces the size of logical volume lvol1 in volume group vg00
by 3 logical extents.

NAME
vgchange - change attributes of a volume group

SYNOPSIS
vgchange [-A|--autobackup {y|n}] [-a|--available {y|n}] [-d|--debug] [-h|--help] [-l|-logicalvolume MaxLogicalVolumes] [-v|--verbose] [--version] [-x|--allocation {y|n}]
[VolumeGroupName...]

DESCRIPTION
vgchange allows you to change the attributes of one or more volume groups. Its main purpose is
to activate and deactivate VolumeGroupName, or all volume groups if none is specified. Only
active volume groups are subject to changes and allow access to their logical volumes. During
volume group activation, if vgchange recognizes snapshot logical volumes which were dropped
because they ran out of space, it displays a message informing the administrator that such
snapshots should be removed (see lvremove(8)).

OPTIONS

-A, --autobackup{y|n}
Controls automatic backup of metadata after the change. See vgcfgbackup (8). Default is
yes.
-a, --available{y|n}
Controls the availability of the volume group for input/output. In other words: makes a
volume group known/unknown to the kernel.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-l, --logicalvolume MaxLogicalVolumes
Changes the maximum logical volume number of an existing inactive volume group.
-v, --verbose
Displays verbose runtime information about vgchange's activities.
--version
Displays tool and IOP version and exit successfully.
-x, --allocation{y|n}
Enables or disables the extension/reduction of this volume group with/by physical
volumes.

EXAMPLES
To activate all known volume groups in the system:
vgchange -a y

To change the maximum number of logical volumes of inactive volume group vg00 to 128.
vgchange -l 128 /dev/vg00

vgextend - add physical volumes to a volume group

SYNOPSIS
vgextend [-A|--autobackup{y|n}] [-d|--debug] [-h|--help] [-v|--verbose] VolumeGroupName
PhysicalVolumePath [PhysicalVolumePath...]

DESCRIPTION
vgextend allows you to add one or more initialized physical volumes ( see pvcreate(8) ) to an
existing volume group to extend it in size.

OPTIONS
-A, --autobackup y/n

Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ).
Default is yes.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose runtime information about lvextend's activities.

Examples
"vgextend vg00 /dev/sda4 /dev/sdn1" tries to extend the existing volume group "vg00" by the
new physical volumes (see pvcreate(8) ) "/dev/sdn1" and /dev/sda4".

NAME
lvreduce - reduce the size of a logical volume

SYNOPSIS
lvreduce [-A|--autobackup {y|n}] [-d|--debug] [-f|--force] [-h|--help] {-l|--extents
[-]LogicalExtentsNumber| -L|--size [-]LogicalVolumeSize[kKmMgGtT]} [-v|--verbose]
LogicalVolumePath

DESCRIPTION
lvreduce allows you to reduce the size of a logical volume. Be careful when reducing a logical
volume's size, because data in the reduced part is lost!!!
You should therefore ensure that the (eg) filesystem on the volume is resized running lvreduce so
that the extents that are to be removed are not in use. If the filesystem is ext2 then you can use
the e2fsadm(8) command to both resize the filesystem and the logical volume together.
Shrinking snapshot logical volumes (see lvcreate(8) for information to create snapshots) is
supported as well.

OPTIONS
-A, --autobackup y/n
Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ).
Default is yes.
-d, --debug
Enables additional debugging output (if compiled with DEBUG).

-f, --force
Force size reduction without any question.
-h, --help
Print a usage message on standard output and exit successfully.
-l, --extents [-]LogicalExtentsNumber
Reduce or set the logical volume size in units of logical extents. With the - sign the value
will be subtracted from the logical volume's actual size and without it the will be taken as
an absolute size.
-L, --size [-]LogicalVolumeSize[kKmMgGtT]
Reduce or set the logical volume size in units of megabyte by default. A size suffix of k
for kilobyte, m for megabyte, g for gigabyte or t for terabyte is optional. With the - sign
the value will be subtracted from the logical volume's actual size and without it the will
be taken as an absolute size.
-v, --verbose
Gives verbose runtime information about lvreduce's activities.

Example
"lvreduce -l -3 /dev/vg00/lvol1" reduces the size of logical volume lvol1 in volume group vg00
by 3 logical extents.

NAME
e2fsadm - ext2 filesystem / LVM administration

SYNOPSIS
e2fsadm [-d|--debug] [-h|--help] {[-l|--extents] [+|-]LogicalExtentsNumber| [-L|--size]
[+|-]LogicalVolumeSize[kKmMgGtT]} [-n|--nofsck] [-v|--verbose] [--version]
LogicalVolumePath

DESCRIPTION
e2fsadm allows resizing of a logical volume containing a mounted or unmounted ext2
filesystem. For unmounted filesystems it can extend the logical volume and grow the filesystem
using resize2fs(8) or ext2resize(8), or shrink the filesystem and then reduce the logical volume
afterwards. For mounted filesystems it can extend the logical volume and grow the filesystem
using ext2online(8).

OPTIONS

-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-l, --extents [+|-]LogicalExtentsNumber
Resize the filesystem/logical volume to or by the number of logical extents. If you use +
or - then the number will be relative the th current size of the logical volume, otherwise
the volume will be resized to LogicalExtentsNumber extents.
-L, --size [+|-]LogicalVolumeSize[kKmMgGtT]
Resize the filesystem/logical volume to or by the given size. If you use + or - then the
number will be relative the the current size of the logical volume, otherwise the volume
will be resized to LogicalVolumeSize. A size suffix of K for kilobytes, M for megabytes,
G for gigabytes or T for terabytes can be used.
-n, --nofsck
Avoid the filesystem check before the resize operation. A filesystem check is mandatory
before resize2fs(8), but is optional for ext2resize(8), and is not allowed for ext2online(8)
because the filesystem is mounted. Useful if a check has been done before starting
e2fsadm.
-t, --test
Test run without real resizing.
-v , --verbose
Gives verbose runtime information about e2fsadm's activities.
--version
Print version number and exit successfully.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close