0% found this document useful (0 votes)
182 views2 pages

Ibm Aix - LVM (Lab)

The document provides instructions for performing various tasks in AIX LVM including displaying physical disks, creating and managing volume groups and logical volumes, mounting filesystems, mirroring volumes, resizing volumes, backing up and restoring volume groups, and removing volumes and volume groups. Key steps include using commands like lspv, mkvg, extendvg, mklv, lslv, varyoffvg, varyonvg, savevg, restvg, reducevg, and migreatepv. The document also provides instructions for root volume group mirroring using commands like extendvg, mirrorvg, bootlist, and bosboot.

Uploaded by

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

Ibm Aix - LVM (Lab)

The document provides instructions for performing various tasks in AIX LVM including displaying physical disks, creating and managing volume groups and logical volumes, mounting filesystems, mirroring volumes, resizing volumes, backing up and restoring volume groups, and removing volumes and volume groups. Key steps include using commands like lspv, mkvg, extendvg, mklv, lslv, varyoffvg, varyonvg, savevg, restvg, reducevg, and migreatepv. The document also provides instructions for root volume group mirroring using commands like extendvg, mirrorvg, bootlist, and bosboot.

Uploaded by

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

AIX LVM Lab

Display physical disks


# lspv
# lspv <pv>
(detailed)
# lspv -l <pv>
(list logical volumes)
# lspv -p <pv>
(physical partition usage)
Create a disk group testvg with one disk
# mkvg -s 256 -y testvg hdisk2
Add three more disks in testvg
# extendvg testvg hdisk# hdisk# hdisk#
Verify that disk group created successfully with four disks
# lsvg OR lsvg testvg OR lsvg l testvg OR lsvg p testvg OR lsvg M testvg
Create a concatenated volume and verify:
# mklv t jfs2 y testlv testvg 1g
# lslv testlv OR lslv l testlv OR lslv m testlv
Create a mirror volume and verify:
# mklv c 2 t jfs2 y testlv2 testvg 1g
# lslv testlv OR lslv l testlv OR lslv m testlv
varyoffvg (Inactive) volume group and verify:
# unmounts all filesystems which are using this filesystem
# varyoffvg testvg
varyonvg (Activate) volume group and verify:
# varyonvg testvg
# mount file systems
Add a mirror to an existing logical volume and verify:
# extendvg testvg hdisk# [ Add hard disk in existing VG]
# mklvcopy testlv 2
# syncvg v testvg
# lsvg l testvg
Remove mirror and verify:
# rmlvcopy testlv 1 hdisk# [faulty disk ]
# unmirror testlv hdisk#
Resize a volume and verify:
# extendlv testlv 2g
# lslv l testlv

Create and mount a filesystem


# crfs v jfs2 testlv m /test A yes
# mount /test
# df m
Diskgroup configuration backup and restore:
# savevg -i -m -v -f /tmp/savevg testvg
# unmounts file systems
# reducevg -d testvg hdisk1
# restvg -f/tmp/savevg
Remove a volume and verify:
# rmlv testlv
# lslv testlv
Remove disk from volume group
# reducevg testvg hdisk#
Migrate (move) data from one disk to another
# migreatepv <from_disk> <to_disk>
To remove a volume group:
# reducevg -d testvg hdisk1
To remove / recover a volume group:
# varyoffvg testvg
# exportvg testvg
# importvg y testvg hdisk1
Root volume group mirroring
Suppose existing disk=hdisk0 and new disk hdisk2
To find out existing root disk:
# bootinfo -b
# extendvg rootvg hdisk2
# mirrorvg rootvg
# bootlist -o -m normal
# bootlist -m normal hdisk0 hdisk2
# bosboot -ad hdisk0
# bosboot -ad hdisk2

You might also like