Thanks for visiting the site !!! Visit below intrested Ads to support us if you like the site .Sharing is caring .keep distance and keep safe . Happy Learning ... 😀

AIX FileSystem related commands

AIX Logical Volume Commands

lslv -l lv00              Display info about LV lv00 by PV

lslv -p hdisk1           Display LV allocation map for hdisk1

chlv -t copy lv00    To change the lv00 to copy type

chlv -p r lv00
         To change the lv00 to readonly mode

rmlv testlv            To remove testlv

rmlv -f testlv         To remove testlv forcefully (without confirmation)

mklv -s n -c 3 testlv hdisk1   To make LV testlv with three copies on hdisk1

extendlv testlv 5                      To extend the LV silv with 5 LPs

mklvcopy -s n testlv 2 hdisk1     To mirror LV testlv on same PV with 2 copies

mklvcopy testlv 3 hdisk1 hdisk2
  To mirror LV testlv on hdisk1 and hdisk2 with 3 copies

rmlvcopy testlv 2 hdisk1            To remove one copy of LV testlv from hdisk1

mklv -t jfslog -y log00 newvg 2  To create a jfslog with name log00 on VG newvg with 2LPs

mklv -t boot -y hd5  rootvg 1      To create logical volume, type as boot with 1 LP (BLV)

logform /dev/log00                 To format jfslog volume log00

AIX Physical Volume commands

lspv                         show all PV’s in the system and their status

lspv hdisk0              display status and characteristics of the PV hdisk0

lspv -p hdisk0          display PP usage of hdisk0 and their location

lspv -l hdisk0           To list all logical volumes on PV hdisk0 and their  distribution

chpv -v r hdisk1       make unavailable the PV (Used while removing PV without varyoffvg)

chpv -v a hdisk1      make PV available.(Open the PV)

chpv -c hdisk0        Clear the master boot record on PV hdisk0 (CAREFULLY..!!)

migratepv hdisk1 hdisk2  To move PPs from hdisk1 to hdisk2

migratepv -l newlv hdisk1 hdisk2   To migrate LV newlv from hdisk1 to hdisk2

AIX File System commands

lsfs                    Lists all filesystems in the /etc/filesystems entry

lsfs -a                To list all filesystems (default)

lsfs -q                List all filesystems with detailed info (shows size of FS and LV in it. so we can check wheather size of LV=size os FS)

lsfs -l                 Specify the output in list format

lsfs -c                 Specify the output in column format

lsfs -v jfs            Lists all jfs filesystems

chfs -a size=24576 /test        Change size of FS /test to 24576(blocks)x 512 bytes  (12 MB)

chfs -a size=+24576 /test     Add 24576(blocks)x512 byte  to FS /test

chfs -a size=+64M /test        Add 64 MB to /test

chfs -a size=10G /test           fix size of the FS /test to 10 GB

chfs -m /test /new                 Change the mount point from /test to /new

chfs -A /test                         To auto mount the filesystem test

chfs -d account /test              Remove account attribute of /test.(from /etc/filesystems file)

chfs -a splitcopy=/backup -a copy=2 /oracle
  This will mount the 2nd copy of mirrored filesystem oracle to /backup in read-only mode for backup purpose

crfs -v jfs2 -g newvg -a size=100M -m /test   Creates FS /test of type jfs in VG newvg of size 100 MB with default LV.

crfs -v jfs -d /dev/lv00 -m /test Create FS /test of type jfs on device /dev/lv00

rmfs /test            Deletes FS /test and associated LV

rmfs -r /test         Deletes FS /test its mount point and associated LV

defragfs /test      To defragment the file system /test

defragfs -q /test  Display the current defrag status of the file system

fsck -y n /dev/lv00  To check the filesystem associated to /dev/lv00 assuming response “yes”

fsck -p /dev/lv00    To restore superblock from backup superblock


lsvg                      Display all VGs

lsvg -o                  Display all active VGs

lsvg rootvg            Display info about rootvg

lsvg  -l rootvg         Display info about all LVs in rootvg

lsvg -o |lsvg -il       Display info about all LVs in all VGs

lsvg  -p rootvg        Display info about all PVs in rootvg

mkvg  -s 8 hdisk1    Create VG with name vgxx on hdisk1 with partition size 8MB

mkvg -s 8 -y newvg hdisk1          Create VG with name newvg on hdisk1 with partition size 8MB

mkvg -s 4 -t 2 -y newvg hdisk1    Create sivg on hdisk1 with PP size 4 and no of partions 2 * 1016

chvg -a y newvg            To automatically activate newvg at startup

chvg -a n newvg            To deactivate the automatic activation at startup

chvg -t 2 newvg            To change maximum no. of PP / PV to 2032 on vg newvg i.e 2*1016 ( so max no. of hdisk in newvg is 16 as in this case in normalvg)

chvg -Qn newvg            To disable quorum on VG newvg

reorgvg  newvg             Reorganises PP allocation of  VG newvg

extendvg newvg hdisk3 hdisk4    Add PV hdisk3 and hdisk4 to VG newvg

exportvg newvg            Exports the VG newvg

importvg -V 44 -y newvg hdisk2    Import the hdisk2 with name  newvg, and assign major number 44

redcucevg newvg hdisk3        Remove PV hdisk3 from VG newvg

varyoffvg newvg            To deactviate VG newvg (after unmounting filesystems in newvg)

varyonvg newvg             To activate VG newvg

syncvg -v newvg            To sync the mirrored LV in the VG newvg

mirrorvg -S -m newvg hdisk2    To mirror LVs of newvg with hdisk2 (-m for exact mirror, -S for forbackground  mirror)

unmirrorvg newvg hdisk2    To remove the mirrored PV from the newvg

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *