Please see this


Contents

- INDEX
- Other Index
- HP-UX
- Solaris
- Linux Index
- General Unix
- Unix Networking
- Unix Scripts
- Unix databases

Associated Information

- none

Useful Links

- AIX Online Manuals
- AIX FAQ
- AIX Searchable Usenet Archive
- AIX Public Domain Software
- Unix Guru Universe web site
- Unixtools web site

Logical Volume Manager

Creating logical volumes

  1. enter lsdev -C -c disk to check disks available

  2. create volume group using: mkvg -y "vgname" hdiskn

  3. enter varyonvg vgname

  4. To create logical volume enter: mklv -y "lvname volgrp n

    e.g. mklv -y "testlv1" testvg 64 - will create a logical volume called testlv1 in volume group testvg of 64 logical partitions (to check the size of the physical partitions, run lsvg vgname)

  5. To create a mirrored logical volume enter: mklv -y "lvname -c n volgrp n disk1 disk2

    e.g. mklv -y "testlv2" -c 2 testvg 64 hdisk1 hdisk2 - will create a logical volume called testlv2 in volume group testvg with 2 copies of the 64 logical partitions on disks hdisk1 and hdisk2

  6. create filesystem by entering crfs -v jfs -l lvname -m /mountdir -A yes

    This will dreate a filesystem the same size as the logical volume, create the mount directory and include the filesystem in /etc/filesystems so it will be automatically mounted when the system is rebooted.

Extending logical volumes

  1. enter extendlv lvname size - to extend the named logical volumes by the number of physical partitions named by the size parameter

  2. enter chfs -a size=+size /mountpoint - where size is in 512 byte blocks (can calculate this by (PP * 1000000)/512 ) and mountpoint is the physical mountpoint of the logical volume

Some useful LVM commands

  • lspv - list all disks on the system

  • lsvg - list all volume groups on the system

  • lsvg -l "vgname" - list all logical volumes in volume group

  • lsfs - list all filesystems in the system

  • mklvcopy -k lvname 2 pvname - will create a mirror copy of the named logical volume on named disk

  • lslv -m lvname - can be used to check logical volume mirrors

  • savevg - backup entire volume group

    e.g savevg -i volgrp /dev/rmt1

  • restvg - restore from savevg backup

  • mirrorvg - mirror an entire volume group

    e.g. mirrorvg -s rootvg


Copyright 2000 Intronet Computers Ltd
Email: Intronet Computers for enquiries