Posts Tagged ‘LV’
AIX File System And Logical Volume
1. All the file systems exist on top of logical volume. No file system can exist without logical volume. Although LV does exists without a file system. First a LV is created and on top of it a FS is created. System first creates a LV. Then, a layer of jfs is created on top of it. Once the jfs is created then FS is finally created.
2. Whenever a file system is expanded, logical volume (LV) is extended first. Then the layer of jfs on top of it is expanded and finally the file system is expanded.
3. AIX has a limit of only 3 copies of LV. These copies may be in sequential or parallel arrangements.
4. In case system crash takes place, Mirror write consistency check (MWCC) method is performed in order to track the last 62 writes to the mirrored LV.
5. In normal VG configuration, a VG can never have more than 32 PVs as VGDA design has a limit and is always fixed in size. VG will not take any extra disk once the quota of 32 PVs is full.
6. LVCB contains the following information:
- LV creation date
- Mirrored LV information
- Mount points in JFS file system
7. LVCB consists of first 512 bytes of LV.
8. LV Theoretical limits:
i. Number of PVs = 32
ii. PP’s per PV = 1016
iii. PP size = 1 MB to 1 GB
iv. Number of LV = 256
v. LV size (maximum) = 32 x 1016 x 128 = 8.3 TB (approx.)
9. Reorgvg command takes lot of I/O capacity so it is always recommended to run this command when workload is low.
Most of the information is already available in various Red Hat IBM pdfs and online books.
Hope you enjoyed reading this post.
This post will discuss about the various commands used in AIX to reduce /var or /tmp file systems.
Default size of /var file system is 4 MB and for /tmp is 8 MB for AIX Version 4 and Version 5.
The various steps involved are:
1. Backup the data:
# cd /
# tar –cvf /dev/rmt0 /var
# tar –cvf /dev/rmt0 /tmp
You can read about the tar command in previous posts published under Backup and Restore Commands.
2. Boot into maintenance mode:
After the backup is done, you need to boot into the maintenance mode.
3. Choose ‘Start Maintenance Mode for System Recovery’
4. Choose Access Root Volume Group
5. Select the root volume group by number
6. Start a shell
7. Unmount the file system by running the following commands:
# umount /var
# umount /tmp
8. Remove the file system:
Run the following commands:
# rmfs /var
# rmfs /tmp
9. Determine the PP size of rootvg by running the following command:
# lsvg –p rootvg
10. Create a new LV on rootvg:
Run the following command:
# mklv –y hd9var rootvg <number of LPs>
You can refer to previous post on how to create a new LV.
This command will create a new LV for /var
# mklv –y hd3 rootvg <number of LPs>
This command will create a new LV for /tmp
How to determine number of LPs: if PP size is 4 MB for /var and you want /var size to be 8 MB then number of LPs should be 2.
11. Check file system using crfs command:
# crfs –v jfs –d hd9var –m /var –A yes
You can refer to crfs command in previous posts.
12. Mount /var file system:
# mount /var
# mount /tmp
13. Restore the backup /var:
# cd /
# tar –xvf /dev/rmt0
A step or command may be missing in these steps. This post is written with an intention to give a general idea on how to reduce /var or /tmp file system size.
P.S: Most of the commands and text written in this post is referred from various IBM Red Hat Books and pdfs.
Default (Standard) File Systems:
Default AIX file system during OS installation:
/ – 1GB
/usr – 4 GB
/var – 4GB
/tmp – 4GB
/opt – 1GB
/home – 1GB
1. Ideally, paging space should be double the ram size
2. If RAM >= 256MB then PS should be 512MB
3. If RAM < 256MG then PS is twice of RAM
4. If RAM is 8GB paging space should be 16GB
5. Only 1 PS per disk
6. Use disk with least activity for paging space
7. Do not extend PS to multiple PV
8. Paging Space should be backed by hardware redundancy technology
9. Should not delete system’s default paging space on hd6
10. Should not reduce size of hd6 below 32MB. Should not be less than 64MB for AIX 4.3 and above
11. Paging Space should not take more than 20% of disk space
12. Divide paging space into multiple PS for greater flexibility
13. /etc/swapspaces contains list of PS that is activated at system start-up
# lppchk –m 3 –c
Performs checksum operation of file list items
# lppchk –m 3 –f
This command will check what file list items are present and size matches SWVPD.
# lppchk –m 3 –v
This command verifies whether /root, /usr, /usr/share are valid with each other or not.
# lppchk –m 3 –l
This command verifies symbolic links for files in SWVPD.
# lppchk –u
This command updates the new checksum when system information does not match SWVPD.
# lppchk –c
This command verifies checksum
# lppchk –v
This command verifies software parts.
To check user resource limits:
Commands used are:
# ulimit –a
# ulimit –Sa (soft)
# ulimit –Ha (hard)
There are steps by which administrator can move a file system from 1 VG to another 1 VG without restoring or recreating it:
These are the steps:
- Unmount the file system
- Run cplv command to copy LV to new VG. Command used to do this:
# cplv –v <new vg> -y <new lv> <old lv>
# cplv –v datavg –y lv01 lv00
If within same VG then we need to copy LV from old to new. Command used:
# cplv –e <new lv> <old lv>
- Run chfs command to update dev and log entries for file system
- Run fsck command
How to remove VG with no disk?
How to remove VGDA or VG information?
VGDA information is mostly available in /etc/filesystem and ODM.
Command to remove VGDA information:
Run the command,
This command will remove vg information from /etc/filesystem and ODM.
And this will only happen when VG is not varied on.
Command to check whether the VG is varied on or not:
# lsvg –o | lsvg –il
Command to vary off a VG:
# varyoff vg <vgname>
Happy learning !
# lsfs command gives the following output:
Hd1 – home
Hd2 – USR
HD3 – TMP
HD4 – Root
HD5 – BLV
HD6 – Paging Space (2 types: primary, secondary)
HD7 – Not Found
HD8 – JFS
HD9 – VAR
HD10 – MNT
HD11 – admin (available in AIX V 6.1)
LED code 0c0 means successful completion of dump.
To view extended permissions, command used is:
# ls –e <filename>
Command used to set tty port for bidirectional mode:
# share <port attributes>
Commands used to setup quota for file system for end users are:
# vi /etc/<file system>
# edquota /<file system> <username>
# quotaon <file system>
# quotaon /<file system>
To initiate system dump, command used is:
# sysdumpstart –P (for primary)
# sysdumpstart –S (for secondary)
SNAP is generally used to gather system information.
Some of the SNAP commands are:
# snap –a
# snap –g
# snap –D
Image.data contains information about VG’s and LV’s.
Bosinst.data contains information about installation flow control.
To view mksysb tape and to restore particular file from mksysb tape, commands used are:
# tctl –f /dev/<tape drive name>
# restore –tvf /dev/<tape drive name>
# restore –xvf /dev/<tape drive name>
# tctl –f /dev/rmt0
# restore – tvf /dev/rmt0
# restore – xvf /dev/rmt0
Tctl command is basically used to rewind the tape drive.
To list NIM objects, command used:
NIM stands for network installation management.
To see NIM log, command used is:
# nim –o showlog –a full_log = yes –a log_type = logtype NIMclient
Logtype can be boot, script etc.
NIMClient is the hostname / ip address of the client machine.
Sources of this command : IBM AIX Forum
# smit system command is used to change the server time.
# smit date command is used to change system date.
Time synchronization is either done by running time demon or ntp demon.
- Entry :
i. P5 510
ii. P5 520
iii. P5 550
- Mind Range :
i. P5 570
- High End :
i. P5 575
ii. P5 590
iii. P5 595
Physical Volume (PV) id can be found in Cuat ODM class.
Device in defined state means there is an entry in ODM class CuDV.
Procedure to change bootlist from hdisk0 to hdisk1:
Go to SMS mode by pressing F1 and change the bootlist by running the following command:
# bootlist –m normal hdisk0 hdisk1
If a machine keeps rebooting and repeating POST, it means either there is invalid bootlist or corrupted BLV or hardware failure of boot device.
More we will discuss about AIX System Administration in the coming posts.
Happy Learning !