Filesystem Procedures
Procedure to create a filesystem using JFS:
See below the procedure for creating a logical volume and a filesystem using JFS:
Procedure to extend the size of filesystem using JFS:
“df” to see the filesystem, it’s current size, % utilization and the name of it’s logical volume
“lslv
“lsvg
If there are not enough free pp’s then see below for procedure to add a disk to a volume group.
“chfs -a size= +4194304
NOTE: Growing the file system will automatically grow the logical volume
df” shows the file system’s current size is 2 GB more than before.
Troubleshooting extending the size of a filesystem using JFS:
Error Message: 0516-787 extendlv: Maximum allocation for logical volume
Maximum number of LPs for the logical volume has been exceeded – must increase the allocation
Calculate the number of LPs needed = LV Size in MB / LP size in MB
chlv -x
Procedure to remove a file system
Unmount the filesystem
Remove the logical volume “rmlv
Remove the filesystem information from /etc/filesystems
Procedure to reduce the size of a file system – shareold is 8mb and needs to be reduced to 4mb
Create the file system
crfs -v jfs -m /usr/sharenew -g rootvg -a size=8192
this makes a logical volume in the root volume group of 4MB that uses jfs
Mount the volume
mount /usr/sharenew
Move the files from the old file system (/usr/shareold)
cd /usr/shareold
tar cf –
(cd /usr/sharenew; tar xvf -)
cd
Unmount the file systems
umount /usr/sharenew
umount /usr/shareold
Remove the old file system and it’s logical volume
rmfs /usr/shareold
chfs -m /usr/shareold /usr/sharenew
Mount the new filesystem
mount /usr/shareold
Delete the temporary mount point
rmdir /usr/share
Logical Volume Procedures
Procedure to create a logical volume and filesystem in a volume group using JFS:
lsvg to determine the size of the PP
lslv in similar logical volumes to determine if mirroring is in effect
Calculate the number of PPs needed for the logical volume
bc
scale=2
quit
mklv -y “
crfs -v jfs -d
mount /
df /
Check the ownership and permissions of the new mount point
ls -ld
chown owner:group
chmod XXX
If mirroring is in effect, then mirror this logical volume to another disk (original and 1 mirror):
mklvcopy -s y
Check to see if all of the logical volumes in a volume group are mirrored
lsvg -l
Mirror a logical volume after the fact
mklvcopy -s y
Volume Group Procedures
Procedure to create a volume group:
lsdev -C -c disk -> lists available disks (and the hdisk#) on the server
mkvg -y “
varyonvg
Procedure to add a disk to a volume group (extend the volume group)
extendvg
Verify the disk has been successfully added to the vg
lsvg -p
Procedure to mirror the rootvg:
lspv –> determine the hdisk#
extendvg rootvg hdisk
lspv –> verify that the hdisk has been successfully added to the volume group
chvg -Q ‘n’ rootvg –> change the quorum so that the vg will stay active if one of the mirrors fail
mirrorvg -S -c 2 rootvg –> mirror all of the logical volumes in the volume group
lsvg -l rootvg –> verify successful mirroring (pps will appear “stale” until synchronization is complete).
bosboot -a –> update the boot image information
bootlist -m normal -o hdisk0 hdisk1 –> create a new bootlist
bootlist -m normal -o –> verify the bootlist is correct
Procedure to increase the number of LP’s available
Assume we receive an error that the maximum number of LP’s had been exceeded, and the maximum number of LP’s defined was 1100:
“lsvg
“lsvg -l
“chlv -x 1248
Physical Disk Procedures
Procedure to find disks/vpaths that are unallocated
lsvpcfg
This will show disks/vpaths and the volume group they are allocated to
lspv
grep None
This will show pvs and whether they are asssociated with a volume group
Note: For vpaths, the hdisks will show as none, but they may be allocated to a vpath – you must grep each hdisk with the lsvpcfg
Procedure to make a new lun available to AIX
Allocate the new lun on the SAN
Run “cfgmgr”
Verify the new vpatch/hdisk by running “lsvpcfg”
There should be a new vpath and it should be available with no volume group – if not, rerun cfgmgr
Procedure to list the PVs in a volume group:
lsvg -p