IBM AIX Logical Volume Manager (LVM)

Components of the LVM
ComponentDescription
Volume Group (VG) A collection of one or more physical volumes, independent of type
Logical Volume (LV)A collection of logical partitions, each of which can be mapped to any physical partition in the volume group. If mirroring is used, the logical partition is mapped to two or three physical partitions.
Logical Partition (LP)Logical partitions are how logical volumes handle both the mapping to physical
partitions on one or more physical volumes and multiple copies for mirroring.
Physical Volume (PV)A storage device that are divided into physical partitions
Physical Partition (PP)When you add a physical volume to a volume group, the physical volume is partitioned into contiguous, equal sized units of space called physical partitions. A physical partition is the smallest unit of storage space allocated.
VGDAVolume group descriptor area.
VGIDThe Volume Group Identifier.
PVIDThe physical volume identifier.
LVIDThe logical volume identifier.
LVCBThe logical volume control block.
VGSAVolume group status area.

Physical Volume (PV)
CommandPurpose
lspvDisplays information about a physical volume within a volume group.
Usage: lspv [-L] [-l|-p|-M] [-n DescriptorPhysicalVolume] [-v VGID] PhysicalVolume
migratepvMoves allocated physical partitions from one physical volume to one or more
other physical volumes.
Usage: migratepv [-i] [-l LogicalVolume] SrcPhysicalVolume DestnPV(s)
chpvChanges the characteristics of a physical volume in a volume group
Usage: chpv [-a Allocation] [-v Availability] [-c] PhysicalVolume(s)
replacepvReplaces a physical volume in a volume group with another physical volume
Usage: replacepv [-f] {SourcePV | SourcePVID} DestinationPV
Usage: replacepv [-R] dir_name [DestinationPV]

Volume Group (VG)
CommandPropose
extendvgAdds physical volumes to a volume group
Usage: extendvg [-f] VolumeGroup PhysicalVolume(s)
reducedvgRemoves physical volumes from a volume group.
Usage: reducevg [-d] [-f] VolumeGroup PhysicalVolume(s)
lsvgDisplays information about volume groups.
Usage: lsvg [-L] [-o] | [-n DescriptorPhysicalVolume] | [-i] [-l | -M | -p] VolumeGroup(s)
mkvgCreates a volume group.
Usage: mkvg [-d MaximumPhysicalVolumes] [-B] [-G] [-f] [-i] [-c] [-x] [-m MaxPvSize] [-n] [-s Size] [-t factor] [-V MajorNumber] [-y VolumeGroup] Physical_Volume[s]
exportvgExport a volume group into the system
Usage: exportvg VolumeGroup
importvgImports a new volume group definition from a set of physical volumes
Usage: importvg [-V MajorNumber] [-y VolumeGroup] [-f] [-c] [-x] | [-L VolumeGroup] [-n] [-F]
[-R]PhysicalVolume
varyonvgActivates a volume group.
Usage: varyonvg [-b] [-c] [-f] [-n] [-p] [-s] [-u] VolumeGroup
varyoffvgDeactivates a volume group.
Usage: varyoffvg [-s] VolumeGroup
reorgvgReorganizes the physical partition allocation for a volume group.
Usage: reorgvg [-i] VolumeGroup [LogicalVolume(s)]
chvgChanges the characteristics of a volume group
Usage: chvg [-a AutoOn {n|y}] [-c|-l] [-Q {n|y}] [-u] [-x {-n|y} ] [-t [factor] ] [-B] VolumeGroup
lsvgfsLists the file systems that are in the specified volume group.
Usage: lsvgfs VolumeGroup
mirrorvgMirrors all the logical volumes that exist on a given volume group.
Usage: mirrorvg [-S | -s] [-Q] [-c Copies] [-m] VolumeGroup [PhysicalVolume(s)]
mkvgdataCreates a file containing information about a volume group for use by the savevg and restvg commands. This file is a symbolic link to the mkszfile script.
Usage: mkvgdata [-X] [-m] VGName

redefinevgRedefines the set of physical volumes of the given volume group in the device configuration database
Usage: redefinevg {-d Device | -i Vgid} VolumeGroup
restvg Restores the user volume group and all its containers and files. Usage: restvg [-b Blocks] [-f Device] [-q] [-s] [-n] [-p PPsize] [PhysicalVolume(s)]
savevgFinds and backs up all file belonging to a specified volume group. The file is a symbolic link to the mksysb script.
Usage: savevg [-b Blocks] [-e] [-f Device] [-i | -m] [-p] [-v] [-X] VGName
syncvgSynchronizes logical volume copies that are not current.
Usage: syncvg [-f] [-i] [-H] [-P NumParallelLPs] { -l LVName(s) | -p PVName(s) | -v VGname(s) }
unmirrorvgRemoves the mirrors that exist on volume groups or specified disks.
Usage: unmirrorvg [ -c Copies] VolumeGroup [ PhysicalVolume(s) ]
updatevgSynchronizes volume group information in the ODM if the ODM has at least a valid volume group identifier. It is an undocumented command
Usage: updatevg VGname

Logical Volume (LV)
CommandPropose
mklvCreates a logical volume.
Usage: mklv [-a Position] [-b BadBlocks] [-c Copies] [-d Schedule] [-e Range] [-i] [-L  Label] [-m MapFile] [-r Relocate] [-s Strict] [-t Type] [-u UpperBound] [-v Verify] [-w MirrorWriteConsistency] [-x Maximum] [-y NewLogicalVolume | -Y Prefix] [-S StripeSize] [-U Userid] [-G Groupid] [-P Modes] VolumeGroup NumLP [PhysicalVolume(s)]
cplvCopy a logical volume to a new logical volume
Usage: cplv [-v VolumeGroup] [-y NewLogicalVolume | -Y Prefix] SourceLogicalVolume Usage: cplv -e DestinationLogicalVolume [-f] SourceLogicalVolume
mklvcopyProvides copies of data with the logical volume.
Usage: mklvcopy [-a Position] [-e Range] [-k] [-m MapFile] [-s Strict] [-u UpperBound] LogicalVolume Copies [PhysicalVolume(s)]
chlvChanges the characteristics of the logical volume[s]
Usage: chlv [-n NewLVName] [-a Position] [-b BadBlocks] [-d Schedule] [-e Range] [-G Groupid] [-L label] [-P Modes] [-p Permission] [-r Relocate] [-s Strict] [-t Type] [-U Userid] [-u Upperbound] [-v Verify] [-w MirrorWriteConsistency] [-x Maximum] LogicalVolume[s]
extendlvIncreases the size of a logical volume by adding unallocated physical partitions from within the volume group
Usage: extendlv [-a Position] [-e Range] [-u Upperbound] [-s Strict] LPartitions [PhysicalVolume(s)] 
Usage: extendlv [-mMapFile] LPartitions
lslvDisplays information about a logical volume.
Usage: lslv [-L] [-l|-m] [-n PhysicalVolume] LogicalVolume
Usage: lslv [-L] [-n PhysicalVolume] -p PhysicalVolume [LogicalVolume]
readlvcopyReads a specific mirror copy of a logical volume.
Usage: readlvcopy -d device [-c copy | -C copy | -b] [-n number_of_blocks] [-o outfile] [-s skip] [-S seek]
rmlvRemoves logical volumes from a volume group.
Usage: rmlv [-B] [-f] [-p Physical Volume] LogicalVolume(s)
rmlvcopyRemoves copies from a logical volume.
Usage: rmlvcopy LogicalVolume Copies [PhysicalVolume(s)]
splitlvcopySplits copies from one logical volume and creates a new logical volume from them.
Usage: splitlvcopy [-f] [-y NewLVName] [-Y Prefix] LVCopies [PhysicalVolume(s)]
updatelvUpdates the logical control block and the ODM. It is an undocumented command.
Usage: updatelv [-c] [-D] [-L] [-P] [-R] LVname VGname

Miscelaneus
CommandPurpose
mkcdCreates a multi-volume CD (or CDs) from a mksysb or savevg backup image.
Usage: mkcd -d cd_device | -S [-m mksysb_image| -M mksysb_target | -s savevg_image | -v savevg_vol_group] [-Ccd_fs_dir] [-I cd_image_dir] [-V cdfs_vol_group] [-G] [-B] [-p pkg_source_dir] [-R | -S] [-i image.data] [-u bosinst.data] [-e] [-P] [-l package_list] [-b bundle_file] [-z custom_file] [-D]
mksysbCreates an installable image of the root volume group either in a file or onto a bootable tape.
Usage: mksysb [-b Number] [-e] [-p] [-v] [-X] [-i | -m] Device | File
mkszfileCreates a file containing information about the rootvg volume group for use by the mksysb command.
Usage: mkszfile [-X] [-m]
synclvodmSynchronizes or rebuilds the logical volume control block, the device configuration database, and the volume group descriptor areas on the physical volumes.
Usage: synclvodm [ -v ] VolumeGroup [ LogicalVolume(s)]

File System (FS)
CommandPurpose
fsckChecks file system consistency and interactively repairs the file system.
Usage: fsck [-n] [-p] [-y] [-dBlockNumber] [-f] [-ii-NodeNumber] [-o Options] [-tFile] [-V VFSName] [FileSystem1 - FileSystem(s)]
crfsAdds a file system.
Usage: crfs -v VfsType {-g VolumeGroup | -d Device} [-l LogPartitions] -m MountPoint [-n NodeName] [-uMountGroup] [-A {yes | no}] [-p {ro | rw}] [-a Attribute= Value ...] [-t {yes | no}]
chfsChanges attributes of a file system.
Usage: chfs [-n NodeName] [-m NewMountPoint] [-u MountGroup] [-A {yes | no}] [-p{ro | rw}] [-t {yes | no} ] [-a Attribute=Value] [-d Attribute] FileSystem
defragfsIncreases a file system's contiguous free space.
Usage: defragfs [-q | -r] {Device | FileSystem}
dfReports information about space on file systems.
Usage: df [ [-P] | [-I | -M | -i | -t | -v] ] [-k] [-s] [FileSystem(s) | File(s) ]
dumpfsDumps file system information.
Usage: dumpfs {FileSystem | Device}
lsfsDisplays the characteristics of file systems.
Usage: lsfs [-q] [-c | -l] [-a | -v VFSType | -u MountGroup | [FileSystem(s)]]
mkfsMakes a file system.
Usage: mkfs [-b Boot] [-l Label] [-i i-Nodes] [-o Options] [-p Prototype] [-s Size] [-v VolumeLabel] [-V VFSName]
mountMakes a file system available for use.
Usage: mount [-f] [-n Node] [-o Options] [-p] [-r] [-v VFSName] [-t Type | [Device | Node:Directory] Directory | all | -a [-V [generic_options] special_mount_points]
umountUnmounts a previously mounted file system, directory, or file.
Usage: {unmount | umount} [-f] [-a] | [all | allr | Device | Directory | File | FileSystem | -n Node | -t Type]
rmfsRemoves a file system.
Usage: rmfs [-r] FileSystem

Effect of -t factor in chvg
chvg -t factorMaximun Partitions / PVMaximun Disks / VG
1101632
2203216
3304810
440648
550806
660965
771124
881284
991443
101016002
16162562

Sources: 
AIX Logical Volume Manager from A to Z: Troubleshooting and Commands (SG24-5433-00)
AIX Logical Volume Manager, from A to Z: Introduction and Concepts ()SG24-5432-00)

1 comentario:

  1. Both blogs and articles serve as valuable Password Protect A PDF For Free sources of information and entertainment for readers.

    ResponderEliminar