0% found this document useful (0 votes)
10 views5 pages

Aix LVM

AIX LVM how to

Uploaded by

gemma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

Aix LVM

AIX LVM how to

Uploaded by

gemma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

LVM Basics AIX

Saturday, November 13, 2021 11:48 PM

References: http://www.datadisk.co.uk/html_docs/hp/aix_lvm.htm

Physical Volumes

List all physical volumes


# lspv -u

-u
Lists all the physical volumes in the system along with the following information:
* Physical disk name.
* Physical volume identifiers (PVIDs).
* The volume group (if any), or label (if any), that the physical volume belongs to and that is locked with the
lkdev command.
* The state of the volume group.
Active
When the volume group is varied on.
Concurrent
When the volume group is varied on in the concurrent mode.
Locked
When the physical volume is locked with the lkdev command.
* Unique device identifier (UDID).
* Universally Unique Identifier (UUID).

List all logical volumes on the physical volume


# lspv -l hdisk0

Displays a map of all the logical volumes the physical volume on hdisk0
# lspv -p hdisk0

Show which physical partitions are being used for a specific volume group
# lspv -M hdisk0

AIX Page 1
Volume Groups

List all volume groups


# lsvg

List all active volume groups


# lsvg -o

List all Physical volume in a Volume Group


# lspv -p rootvg

List all logical volumes in a volume group


# lsvg -l rootvg

AIX Page 2
Display all information of a Volume Group
# lsvg rootvg

PP SIZE
TOTAL PPs
FREE PPs
USED PPs

Set the volume group inactive/active


# varyoffvg vg00
# varyonvg vg00

Create a new volume group


Usage: mkvg -y <vg> -s <PP size> <pv>

# mkvg -y vg00 -s512M hdisk3

Extending volume group rootvg and mirroring


Usage: extendvg <vg> <pv>

# extendvg [-f] rootvg hdisk3

# mirrorvg rootvg

Verify the contents of both hdisk


# lspv -M hdisk0
# lspv -M hdisk3

Create a new logical volume

Usage:
mklv [ -t type ] [ -y newlogicalvolume ] [ -S stripsize ] VGname NumberofLPs [PVname]

# mklv -t jfs2 -y testlv rootvg 1 hdisk3

# lsvg -l rootvg | grep testlv

AIX Page 3
# lsvg -l rootvg | grep testlv

Show more information for the logical volume


# lslv testlv

Create and mount a filesystem

Usage:
crfs -v VfsType { -g VolumeGroup | -d Device } -m MountPoint

# crfs -v jfs2 -d testlv -A y -m /mnt/testlv

# grep -p testlv /etc/filesystems

Create an empty file


# lmktemp file1 400M

Resize filesystem

# chfs -a size=+512M /mnt/testlv (add 512M)


# chfs -a size=-512M /mnt/testlv (reduce 512M)
# chfs -a size=512M /mnt/testlv (set to 512M)

# chfs -a size=+100M /mnt/testlv

Set the LVM size

# chfs -a size=24576 /test

Rename a logical volume


# chlv -n testlv10 testlv1

AIX Page 4
# chlv -n testlv10 testlv1

AIX Page 5

You might also like