Professional Documents
Culture Documents
Filesystems
IBM AIX - Commands (contd)
IBM AIX Operating System - Some useful Commands gathered from IBM and
other websites!!!
lspv
lspv -l hdisk6
lsvg
lsvg -o
lsvg -l vg01
lsvg -p vg02
lsfs
lsfs -q /home
logform /dev/datalog1
››› A jfs2 log must exist in this VG and be logform(ed). (This was done in the
previous steps.) -m specifies the mount point for the fs, and -A y is a option to
automatically mount (with mount -a).
Create a scalable VG called vg01 with two disks
varyoffvg datavg
Vary-on the datavg VG
varyonvg datavg
››› By default the import operation will vary-on the VG. An explicit vary-on will
be required for concurrent volume groups that can be imported onto two (or more)
systems at once, but only varied-on on one system at a time.
Remove the datavg VG from the system
exportvg datavg
Import the VG on hdisk5 as datavg
››› The VG in this example spans multiple disks, but it is only necessary to specify
a single member disk to the command. The LVM system will locate the other
member disks from the metadata provided on the single disk provided.
Import a VG on a disk by PVID as datavg
››› In each of the chfs grow filesystem examples, AIX will automatically grow the
underlying LV to the appropriate size.
Grow the /var filesystem to 1 Gig
mklvcopy -k -s y fslv08 2
Mirror rootvg (on hdisk0) to hdisk1
du -smx /var
lslv -l datalv01
››› The "COPIES" column relates the mirror distribution of the PPs for each LP.
(PPs should only be listed in the first part of the COPIES section. See the next
example.) The "IN BAND" column tells how much of the used PPs in this PV are used
for this LV. The "DISTRIBUTION" column reports the number of PPs in each region of
the PV. (The distribution is largely irrelevant for most modern SAN applications.)
Create a LV with 3 copies in a VG with a single PV
››› This will remove the PVID but not residual VGDA and other data on the
disk. dd can be used to scrub remaining data from the disk. The AIX install CD/DVD
also provides a "scrub" feature to (repeatedly) write patterns over data on disks.
Move (migrate) VG vg02 from hdisk1 to hdisk2
››› In this example it is necessary to wait for the mirrors to synchronize before
breaking the mirror. The mirrorvg command in this example will not complete until
the mirror is established. The alternative is to mirror in the background, but then
it is up to the administrator to insure that the mirror process is complete.
Create a striped jfs2 partition on vg01
››› MAX PVs is 32 for normal, 128 for big, and 1024 for scalable VGs.
Set the system to boot to the CDROM on next boot
››› The system will boot to one of the mirror pairs (hdisk0 or hdisk1) if the boot
from the CD ROM does not work. This can be returned to normal by repeating the
command without cd0.
List the boot device for the next boot
bootlist -m normal -o