************************************************************** AIX DISK SETUPS Mirror other disks: repeat for each disk and group { #mklvcopy volgroup 2 disk hd5 hdisk1 #syncvg -l volgroup hd5 } #chdev -l hdisk# -a -pv=yes #give a physical disk a PV number #lsdev -C -c disk #list known physical drives #lspv #list them with volgroup #mkvg -s 8 -f -y vg10 hdisk10 hdisk11 #make vg with disks #extendvg -f rootvg hdisk8 #add disk to vg #reducevg rootvg hdisk8 #remove disk from vg #reducevg -df catvg hdisk2 hdisk3 hdisk4 # remove a vg and its disks #ls /etc/vg #see what UIDs for vgs #lsvg #see vg names #lsvg -p rootvg #see chars of rootvg #varyonvg rootvg #turn on a vg #varyoffvg rootvg #turn off a vg #chpv -vr pvname #remove pvname disk from volgrp #chpv -va pvname #replace disk in volgrp #extendlv u01lv 20 #add 20 PP/LP to u01lv exportvg/importvg #move or resync a volgrp ************************************************************** MIRROR rootvg ON AIX 4.X ASSUME: hdisk0 is original bootable system disk, hdisk1 is mirror Add the second drive to rootvg #extendvg rootvg hdisk1 Mirror all the root logical volumes onto the second hdisk including hd5 and paging. #mklvcopy xx 2 hdisk1 2nd log hd8 3rd tmp hd3 4th var hd9var 5th page hd6 6th usr hd2 7th / hd4 Sync the rootvg #syncvg -v rootvg Make the second drive bootable #bosboot -a #bootlist -m normal hdisk0 hdisk1 Remove the first copy #rmlvcopy hd# 1 hdisk0 Resync so hdisk0 is like hdisk1 layout #syncvg -v rootvg ************************************************************** AIX LVM commands chlv(1) - Changes only the characteristics of a logical volume. cplv(1) - Copies the contents of a logical volume to a new logical volume. extendlv(1) - Increases the size of a logical volume by adding unallocated physical partitions from within the volume group. fdflag(1) - Resolves text and graphic links within a database. fdxtrn(1) - Resolves cross-database links within a library. lslv(1) - Displays information about a logical volume. lvm_changelv(3) - Changes the attributes of a logical volume. lvm_changepv(3) - Changes the attributes of a physical volume in a volume group. lvm_createlv(3) - Creates an empty logical volume in a specified volume group. lvm_createvg(3) - Creates a new volume group and installs the first physical volume. lvm_deletelv(3) - Deletes a logical volume from its volume group. lvm_deletepv(3) - Deletes a physical volume from a volume group. lvm_extendlv(3) - Extends a logical volume by a specified number of partitions. lvm_installpv(3) - Installs a physical volume into a volume group. lvm_migratepp(3) - Moves a physical partition to a specified physical volume. lvm_querypv(3) - Queries a physical volume and returns all pertinent information. lvm_queryvg(3) - Queries a volume group and returns pertinent information. lvm_queryvgs(3) - Queries volume groups and returns information to online volume groups. lvm_reducelv(3) - Reduces the size of a logical volume by a specified number of partitions. lvm_resynclp(3) - Synchronizes all physical partitions for a logical partition. lvm_resynclv(3) - Synchronizes all physical copies of all of the logical partitions for a logical volume. lvm_resyncpv(3) - Synchronizes all physical partitions on a physical volume with the related copies of the logical partition to which they correspond. lvm_varyoffvg(3) - Varies off a volume group. lvm_varyonvg(3) - Varies a volume group on-line. mklv(1) - Creates a logical volume. mklvcopy(1) - Provides copies of data within the logical volume. rmlv(1) - Removes logical volumes from a volume group. rmlvcopy(1) - Removes copies from a logical volume. synclvodm(1) - Synchronizes or rebuilds the logical volume control block, the device configuration database, and the volume group descriptor areas on the physical volumes. xlvm(1) - Starts Storage Manager, a Visual System Management (VSM) application. **************************************************************