~~socialite:icon reddit googleplus stumbleupon twitter~~
===== 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
**Still stuck? Maybe we can help.** Contact us [[https://www.upwork.com/o/profiles/users/_~01207a4bc438b48c6e|at Upwork]]
Never miss a thing [[http://www.justsomestuff.co.uk/subscribe.php|subscribe to our newsletter]] {{glyphicon>envelope}}
or follow us [[http://twitter.com/itsjustsomestuf|on twitter]] {{glyphicon>hand-left}}
For more super cool techie stuff [[http://www.justsomestuff.co.uk/theblog|check out our blog!!]]
===Recent Changes===
{{changes>}}
====Contribute to this wiki====
Why not help others by sharing your knowledge? Contribute something to this wiki and
[[http://www.justsomestuff.co.uk/hall_of_fame.html|join out hall of fame!]]\\
[[http://www.justsomestuff.co.uk/theblog/contact-page|Contact us]] for a user name and password