AIX- Device Management
In this device management, we can do following things.
1. Make/Add a Device
2. Change Device
3. List Device
4. Remove Device
5. List Device properties
6. List Device configuration
1. Make/Add a Device
We want to install new device in server, this case we should run following command Suppose we want to install new Hard disk
#smitty mkdev (not recommended)
After executing the above command, one sort will come; in this sort we should fill some details about hard disk drive, such as model, make, capacity, etc.
The above command is not recommended because first we should know all the details about HDD, so instead of that we can use cfgmgr command.
When we run the cfgmgr command it will detect all the newly installed devices,
First you connect hard disk and run the cfgmgr command it will detect the hdd.
#cfgmgr (It will detect the all the devices)
#cfgmgr scsi0
Directly you want to detect hard disk then directly u should check the hdd parent device scsi0
When you run the above command it will detect only Scsi0 devices i.e. HDD, Cdrom, and Tape.
Like this we can configure newly installed devices.
2. Change Device
Suppose we want to change device configuration, this case we should run following command.
We want to change PVID (Physical volume ID) for Hdd
#chdev –l hdisk0 –a pv=clear (To clear the PVID)
#chdev –l hdisk0 –a pv=yes (To assign the PVID)
Whenever we installing the new hdd, system will generate some Identification number for hdd, we can change this PVID using chdev commands
Like this we can change duplex mode for network card and block size for tape media.
#chdev –l inet0 –a hostname=si (To change the host name for inet0)
#chdev –l rmt0 –a block_size=512 (To Change tape drive block_size is 512 blocks)
#chdev –l ent0 –a media_speed=100_full_duplex (To Change Ethernet card duplex speed)
1. Make/Add a Device
2. Change Device
3. List Device
4. Remove Device
5. List Device properties
6. List Device configuration
1. Make/Add a Device
We want to install new device in server, this case we should run following command Suppose we want to install new Hard disk
#smitty mkdev (not recommended)
After executing the above command, one sort will come; in this sort we should fill some details about hard disk drive, such as model, make, capacity, etc.
The above command is not recommended because first we should know all the details about HDD, so instead of that we can use cfgmgr command.
When we run the cfgmgr command it will detect all the newly installed devices,
First you connect hard disk and run the cfgmgr command it will detect the hdd.
#cfgmgr (It will detect the all the devices)
#cfgmgr scsi0
Directly you want to detect hard disk then directly u should check the hdd parent device scsi0
When you run the above command it will detect only Scsi0 devices i.e. HDD, Cdrom, and Tape.
Like this we can configure newly installed devices.
2. Change Device
Suppose we want to change device configuration, this case we should run following command.
We want to change PVID (Physical volume ID) for Hdd
#chdev –l hdisk0 –a pv=clear (To clear the PVID)
#chdev –l hdisk0 –a pv=yes (To assign the PVID)
Whenever we installing the new hdd, system will generate some Identification number for hdd, we can change this PVID using chdev commands
Like this we can change duplex mode for network card and block size for tape media.
#chdev –l inet0 –a hostname=si (To change the host name for inet0)
#chdev –l rmt0 –a block_size=512 (To Change tape drive block_size is 512 blocks)
#chdev –l ent0 –a media_speed=100_full_duplex (To Change Ethernet card duplex speed)
3. List Device
Suppose we want to list device configuration details, this case se should run following command.
Whenever we list the device information that information is listed from ODM because ODM is storing the device information.
#lsdev –C (To list the Customized device configuration information from ODM)
#lsdev – P (To list the Predefined device configuration information from ODM)
The above commands list the object class device information; it will list all the device information.
Suppose we want to see particular device (object) information,
#lsdev –Cc disk
#lsdev –Cc processor
#lsdev –Cc adapter
#lsdev –Cc memory
C – Customized (object class)
c – for device (object)
If any confusion please refer the ODM notes
4. Remove Device
Suppose you want to remove device from server. Suppose it is one HDD.
First you have removed the HDD from server. Then you checking device configuration details using
#lsdev –Cc disk Or
#odmget CuDv
It will show the device status
There is two options is available in device removal
#rmdev –dl hdisk5
The above command is used to remove hdisk5 device from ODM (complete removal from OS)
After executing the above command this hdisk5 configuration is not available in ODM
#odmget CuDv | grep hdisk5
It wont display anything because device configuration is removed from ODM,Suppose you want to remove device from the server not from ODM,This case you should use the following command.
#rmdev –l hdisk5
The above command is used to remove hdisk5 device from server, this device configuration is available in ODM (not from OS),After executing the above command this hdisk5 configuration is available in ODM and device status is defined
#odmget CuDv | grep hdisk5
It will show Hdisk5 configuration details but device status is 0
If you want install hdisk5 device again, you should run the following command
#cfgmgr
#cfgmgr scsi0 (Directly you can search device on Parent device scsi0)
After executing above commands the device hdisk5 become to Available state. And device status is 1
5. List device Properties (attributes)
Suppose you want to check the device attributes details, you should use following commands.
You want to see memory details,
#lsattr –El mem0 (For memory)
#lsattr –El processor0 (For processor)
#lsattr –El ent0 (For Ethernet card)
#lsattr –El rmt0 (For Tape drive)
E – Effective
l - Device
Like this all the devices.
6. List device Configuration
Suppose you want to check the device configuration details, you should use following commands.
Suppose you want to see HDD FRU number
#lscfg (it will show full system information)
#lscfg –vl hdisk0 (It will show HDD configuration details FRU)
#lscfg –vl eth0 (It will so MAC address details of eth0)
Like this all the devices.
NOTE:
#bindprocessor –q (It will show processor information)
Suppose you are using backup device, currently connected and configured with server.
First you switch on the server, at this time tape driver is not switched on. While booting the server, it is checking the tape drive, but tape is now powered on so tape drive is moved to defined state, status will be 0, Now tape drive is switched on now we want to activate the tape drive, we can activate the tape drive without rebooting the server using
#mkdev –l rmt0 (After executing the command tape drive is come to available state)
Suppose we want to list device configuration details, this case se should run following command.
Whenever we list the device information that information is listed from ODM because ODM is storing the device information.
#lsdev –C (To list the Customized device configuration information from ODM)
#lsdev – P (To list the Predefined device configuration information from ODM)
The above commands list the object class device information; it will list all the device information.
Suppose we want to see particular device (object) information,
#lsdev –Cc disk
#lsdev –Cc processor
#lsdev –Cc adapter
#lsdev –Cc memory
C – Customized (object class)
c – for device (object)
If any confusion please refer the ODM notes
4. Remove Device
Suppose you want to remove device from server. Suppose it is one HDD.
First you have removed the HDD from server. Then you checking device configuration details using
#lsdev –Cc disk Or
#odmget CuDv
It will show the device status
There is two options is available in device removal
#rmdev –dl hdisk5
The above command is used to remove hdisk5 device from ODM (complete removal from OS)
After executing the above command this hdisk5 configuration is not available in ODM
#odmget CuDv | grep hdisk5
It wont display anything because device configuration is removed from ODM,Suppose you want to remove device from the server not from ODM,This case you should use the following command.
#rmdev –l hdisk5
The above command is used to remove hdisk5 device from server, this device configuration is available in ODM (not from OS),After executing the above command this hdisk5 configuration is available in ODM and device status is defined
#odmget CuDv | grep hdisk5
It will show Hdisk5 configuration details but device status is 0
If you want install hdisk5 device again, you should run the following command
#cfgmgr
#cfgmgr scsi0 (Directly you can search device on Parent device scsi0)
After executing above commands the device hdisk5 become to Available state. And device status is 1
5. List device Properties (attributes)
Suppose you want to check the device attributes details, you should use following commands.
You want to see memory details,
#lsattr –El mem0 (For memory)
#lsattr –El processor0 (For processor)
#lsattr –El ent0 (For Ethernet card)
#lsattr –El rmt0 (For Tape drive)
E – Effective
l - Device
Like this all the devices.
6. List device Configuration
Suppose you want to check the device configuration details, you should use following commands.
Suppose you want to see HDD FRU number
#lscfg (it will show full system information)
#lscfg –vl hdisk0 (It will show HDD configuration details FRU)
#lscfg –vl eth0 (It will so MAC address details of eth0)
Like this all the devices.
NOTE:
#bindprocessor –q (It will show processor information)
Suppose you are using backup device, currently connected and configured with server.
First you switch on the server, at this time tape driver is not switched on. While booting the server, it is checking the tape drive, but tape is now powered on so tape drive is moved to defined state, status will be 0, Now tape drive is switched on now we want to activate the tape drive, we can activate the tape drive without rebooting the server using
#mkdev –l rmt0 (After executing the command tape drive is come to available state)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AIX - Backup
Using backup and tar command to we can take full backup and incremental backup
Using tar command we can normal backup, in this tar we cannot take day wise incremental backup
#tar –cvf destination source
#tar –cvf /dev/rmt0 /usr/sbin
#backup –if /dev/rmt0 /usr/sbin (For AIX full backup),/usr/sbin directory files is backup to tape
Using backup command we can take incremental backup, this backup command is particularly for AIX.
In this backup command we can specify the day (0(sun) – 6(sat)).
If you want to take Sunday backup then your command will be
#backup -0 –vf destination source
#backup -0 –vf /dev/rmt0 /var
#backup -6 –vf /dev/rmt0 /var (Saturday backup)
Using backup and tar command to we can take full backup and incremental backup
Using tar command we can normal backup, in this tar we cannot take day wise incremental backup
#tar –cvf destination source
#tar –cvf /dev/rmt0 /usr/sbin
#backup –if /dev/rmt0 /usr/sbin (For AIX full backup),/usr/sbin directory files is backup to tape
Using backup command we can take incremental backup, this backup command is particularly for AIX.
In this backup command we can specify the day (0(sun) – 6(sat)).
If you want to take Sunday backup then your command will be
#backup -0 –vf destination source
#backup -0 –vf /dev/rmt0 /var
#backup -6 –vf /dev/rmt0 /var (Saturday backup)
/var file system log
is backup to tape,Like this we can take normal and incremental backup in AIX.
AIX - Backup and
Restore
In this chapter we can perform the following operations using backup and restore commands.
1. backup
2. restore
3. rootvg backup
4. restore rootvg backup
5. non rootvg backup(other than rootvg)
6. restore non rootvg backup(other than rootvg)
7. rewind, eject and erase the tape
In this chapter we can perform the following operations using backup and restore commands.
1. backup
2. restore
3. rootvg backup
4. restore rootvg backup
5. non rootvg backup(other than rootvg)
6. restore non rootvg backup(other than rootvg)
7. rewind, eject and erase the tape
AIX - Backup the non
rootvg backup
Using savevg command we can backup the non rootvg backup
If your server has 3 volume groups
#lsvg
Rootvg
Datavg
Oraclevg
#
Now you want to take datavg backup, then your command will be
#savevg –if /dev/rmt0 /datavg
#savevg –ief /dev/rmt0 /datavg
Using savevg command we can backup the non rootvg backup
If your server has 3 volume groups
#lsvg
Rootvg
Datavg
Oraclevg
#
Now you want to take datavg backup, then your command will be
#savevg –if /dev/rmt0 /datavg
#savevg –ief /dev/rmt0 /datavg
Datavg volume group is
backup to tape
NOTE: While taking restvg backup we can exclude unwanted file systems in backup process. If you not required following file systems in mksysb backup,
/var – log files
That time you should put entry in /etc/exclude.datavg,
NOTE: While taking restvg backup we can exclude unwanted file systems in backup process. If you not required following file systems in mksysb backup,
/var – log files
That time you should put entry in /etc/exclude.datavg,
AIX - Boot Process
Three phases available in BOOT Process
1. Ros kernel init phase
2. Base Device Configuration
3. System boot phase
1. Ros Kernel init phase (PHASE1)
A. Post (power on self test)
In this post it will do basic hardware checking
B. Then it will go to NVRAM and check the boot list for last boot device (hdisk0 or hdisk1).
C. Then it will check the BLV (hd5) in boot device.
D. Then it will check the boot image
E. Then boot image is moved to memory.
F. Then kernel will execute.
2. Base Device configuration (PHASE2)
A. Here cfgmgr will run for device configuration.
Three phases available in BOOT Process
1. Ros kernel init phase
2. Base Device Configuration
3. System boot phase
1. Ros Kernel init phase (PHASE1)
A. Post (power on self test)
In this post it will do basic hardware checking
B. Then it will go to NVRAM and check the boot list for last boot device (hdisk0 or hdisk1).
C. Then it will check the BLV (hd5) in boot device.
D. Then it will check the boot image
E. Then boot image is moved to memory.
F. Then kernel will execute.
2. Base Device configuration (PHASE2)
A. Here cfgmgr will run for device configuration.
3. System Boot Phase
(PHASE3)
A. Kernel will execute.
B. The paging space (hd6) will get start.
C. Then following file system will be mounted /, /var. /usr, /home. /tmp
D. Kernel start the init process, it will read the /etc/inittab file and execute the following process.
/etc/rc.boot,
srcmstr
/etc/rc.tcpip
/etc/rc.net
The above network related files /etc/rc.tcpip, /etc/rc.net, used to configure the ip address and routing.
E. Then it will start the system by default run level 2.
NOTE:Run level 2: It contains all of the terminal process and daemons that are run in the multi user environment. This is default run level.,/etc/inittab file contains four fields, 1. Identifier, 2. Command, 3. Action, 4. Runlevel
A. Kernel will execute.
B. The paging space (hd6) will get start.
C. Then following file system will be mounted /, /var. /usr, /home. /tmp
D. Kernel start the init process, it will read the /etc/inittab file and execute the following process.
/etc/rc.boot,
srcmstr
/etc/rc.tcpip
/etc/rc.net
The above network related files /etc/rc.tcpip, /etc/rc.net, used to configure the ip address and routing.
E. Then it will start the system by default run level 2.
NOTE:Run level 2: It contains all of the terminal process and daemons that are run in the multi user environment. This is default run level.,/etc/inittab file contains four fields, 1. Identifier, 2. Command, 3. Action, 4. Runlevel
AIX - Create Voulme
Group
We can create VG by using mkvg commands
#mkvg –s 32 –y datavg hdisk4
The above command is creating datavg using pv hdisk4 and pp size is 32MB
#mkvg datavg hdisk4
The above command will create datavg using pv hdisk4 and pp size is by default 128MB.
We can create VG by using mkvg commands
#mkvg –s 32 –y datavg hdisk4
The above command is creating datavg using pv hdisk4 and pp size is 32MB
#mkvg datavg hdisk4
The above command will create datavg using pv hdisk4 and pp size is by default 128MB.
AIX - Fix Maintenance
In this fix update we can do following things
1. Fix installation
2. To verify the installed fix
3. To list the fixes from the CD
In this fix update we can do following things
1. Fix installation
2. To verify the installed fix
3. To list the fixes from the CD
1. Fix Installation-
Fix is a just like patch, if any issues on server, we should install or update
that fix level then only problem will solved,
Problems like, slow performance, particular application is not working properly. This case of problems we should update the fix.
Suppose we want to install fix, Using
#instfix –k Fixname –d device
#instfix – k IK00891 –d /dev/cd0
-k - Keyword to mention the fix name
-d - Device to mention device name
The above command is used to install the given fix IK00891 from cdrom drive.
2. To verify the installed fix
Suppose we want to verify installed fix,
Using #instfix –ki fixname
#instfix –ki IK00891
Option –i for information
The above command is used to display the given fix details. If fix is not available some error message will come.
3. To list the fix from the CD
Suppose we have fix update CD, we want to install particular two fix in server, this first we should find that 2 fixes are available in CD or not available.Using
#instfix –T fixname –d /dev/cd0
#instfix –T IK00891 –d /dev/cd0
T - Displays the entire list of fixes present on the media.
If fix is available in CD, then it will display the given fix name otherwise it wont display anything or some error message will come.
NOTE: Whenever we installing the fileset or fix, in that current path should have the .toc (table of content) file. If this files not available we cannot install any fileset or fix from that current path
If file is not available, we can create the .toc file using command
#inutoc .
The above command is used to create the .toc file
Problems like, slow performance, particular application is not working properly. This case of problems we should update the fix.
Suppose we want to install fix, Using
#instfix –k Fixname –d device
#instfix – k IK00891 –d /dev/cd0
-k - Keyword to mention the fix name
-d - Device to mention device name
The above command is used to install the given fix IK00891 from cdrom drive.
2. To verify the installed fix
Suppose we want to verify installed fix,
Using #instfix –ki fixname
#instfix –ki IK00891
Option –i for information
The above command is used to display the given fix details. If fix is not available some error message will come.
3. To list the fix from the CD
Suppose we have fix update CD, we want to install particular two fix in server, this first we should find that 2 fixes are available in CD or not available.Using
#instfix –T fixname –d /dev/cd0
#instfix –T IK00891 –d /dev/cd0
T - Displays the entire list of fixes present on the media.
If fix is available in CD, then it will display the given fix name otherwise it wont display anything or some error message will come.
NOTE: Whenever we installing the fileset or fix, in that current path should have the .toc (table of content) file. If this files not available we cannot install any fileset or fix from that current path
If file is not available, we can create the .toc file using command
#inutoc .
The above command is used to create the .toc file
AIX - Group Management
In group management the below operations can be performed.
1. Create group
2. List group
3. Change group
4. Remove group
In group management the below operations can be performed.
1. Create group
2. List group
3. Change group
4. Remove group
AIX - Group Management
- Change Group
Using chgroup command we can change the group information’s.
#chgroup options oracle
Using chgroup command we can change the group information’s.
#chgroup options oracle
AIX - Group Management
- Create Group
Using mkgroup command we can create the group, If you want to create oracle group.
#mkgroup oracle
After this command execution new oracle group has created and this group is added in /etc/groups file.
Using mkgroup command we can create the group, If you want to create oracle group.
#mkgroup oracle
After this command execution new oracle group has created and this group is added in /etc/groups file.
AIX - Group Management
- List Group
Using lsgroup command we can list group information’s. If we want to list oracle group information
#lsgroup oracle (it will display the oracle group information’s, gname, gid, members)
#lsgroup all (It will list all group details)
Using lsgroup command we can list group information’s. If we want to list oracle group information
#lsgroup oracle (it will display the oracle group information’s, gname, gid, members)
#lsgroup all (It will list all group details)
AIX - Group Management
- Remove Group
Using rmgroup command we can remove a group, If we want to remove oracle group.
#rmgroup oracle
After this command execution oracle group removed and group configuration information removed from /etc/groups files.
Using rmgroup command we can remove a group, If we want to remove oracle group.
#rmgroup oracle
After this command execution oracle group removed and group configuration information removed from /etc/groups files.
AIX - List Daemon,
Using lssrc command we can list the daemons
If we want see check status of the nfs daemon, whether subsystems are started or not.
Execute the following command.
#lssrc –g nfs
Nfsd – started
Biod – started
Rpc.mountd – not started
Rpc.lockd – started
Rpc.statd – not started
Or we can check single subsystem status using
#lssrc –s nfsd
Nfsd - started
NOTE:
#lssrc –a
AIX - List Volume Group
List VG
We can list VG information using following commands
#lsvg – It will display the available vg’s
#lsvg datavg – It will display full details about datavg only
#lsvg –o It will display the online vg’s
#lsvg – l datavg – It will display the all logical volume details across the datavg
#lsvg –p datavg – It will display the information about all PV’s in datavg
Above operations can be performed by using lsvg commands
If we want see check status of the nfs daemon, whether subsystems are started or not.
Execute the following command.
#lssrc –g nfs
Nfsd – started
Biod – started
Rpc.mountd – not started
Rpc.lockd – started
Rpc.statd – not started
Or we can check single subsystem status using
#lssrc –s nfsd
Nfsd - started
NOTE:
#lssrc –a
AIX - List Volume Group
List VG
We can list VG information using following commands
#lsvg – It will display the available vg’s
#lsvg datavg – It will display full details about datavg only
#lsvg –o It will display the online vg’s
#lsvg – l datavg – It will display the all logical volume details across the datavg
#lsvg –p datavg – It will display the information about all PV’s in datavg
Above operations can be performed by using lsvg commands
AIX - LVM - Change
File System
Using chfs command we can rename and increase the size of the file system online
We want to increase file system size
#chfs –a size=+block size /filesystem name
#chfs –a size=+32m /filesystem name
#chfs-a size=+4g /filesystem name
+block size – We can mention the size using blocks (2048 blocks = 1MB)
+32m – We can mention the size using MB
+4g – We can mention the size using GB
After increasing the file system size, we can verify using commands
#df –k
#ls –q /newfs
Rename the file system using chfs command
#lsfs /newfs
It will display /newfs details
Now we want to rename /newfs to /testfs then your command will be
#chfs –m /testfs /newfs
After executing the above command /newfs renamed as /testfs
We can auto mount the file system while booting using chfs command
#chfs –A /testfs
Using chfs command we can rename and increase the size of the file system online
We want to increase file system size
#chfs –a size=+block size /filesystem name
#chfs –a size=+32m /filesystem name
#chfs-a size=+4g /filesystem name
+block size – We can mention the size using blocks (2048 blocks = 1MB)
+32m – We can mention the size using MB
+4g – We can mention the size using GB
After increasing the file system size, we can verify using commands
#df –k
#ls –q /newfs
Rename the file system using chfs command
#lsfs /newfs
It will display /newfs details
Now we want to rename /newfs to /testfs then your command will be
#chfs –m /testfs /newfs
After executing the above command /newfs renamed as /testfs
We can auto mount the file system while booting using chfs command
#chfs –A /testfs
AIX - LVM - Change Logical
Volume
In this change LV option we can change LV name and permissions for the LV using chlv command.
#chlv –n newlvname oldlvname
#lslv testlv
Output is some details about testlv
#chlv –n newlv testlv
After executing the above command the testlv renamed to newlv
#lslv testlv
Some error message will come i.e. testlv is not found
#lslv newlv
It will show newlv details, because testlv is renamed as newlv.
Changing the LV permissions: If we want to change LV permissions to read only then the command will be
#chlv –p r testlv
After executing the above command testlv permissions changed as read only , so we can only read the LV, we can not copy new files into this LV.
In this change LV option we can change LV name and permissions for the LV using chlv command.
#chlv –n newlvname oldlvname
#lslv testlv
Output is some details about testlv
#chlv –n newlv testlv
After executing the above command the testlv renamed to newlv
#lslv testlv
Some error message will come i.e. testlv is not found
#lslv newlv
It will show newlv details, because testlv is renamed as newlv.
Changing the LV permissions: If we want to change LV permissions to read only then the command will be
#chlv –p r testlv
After executing the above command testlv permissions changed as read only , so we can only read the LV, we can not copy new files into this LV.
Using chvg command we
can change the VG options
#chvg –a y datavg (datavg is automatically activated at startup)
#chvg -a n datavg (To deactivate the automatic activation at startup)
#chvg –t 2 datavg (To change max. no of PP to 2032 on vg datavg)
#chvg –Qn datavg (To disable quorum on VG datavg)
#chvg –Qy datavg (To activate quorum on VG datavg)
#chvg –u datavg (To unlock the VG)
#chvg –a y datavg (datavg is automatically activated at startup)
#chvg -a n datavg (To deactivate the automatic activation at startup)
#chvg –t 2 datavg (To change max. no of PP to 2032 on vg datavg)
#chvg –Qn datavg (To disable quorum on VG datavg)
#chvg –Qy datavg (To activate quorum on VG datavg)
#chvg –u datavg (To unlock the VG)
AIX - LVM - Create
File System
Create FS
Using crfs command we can create a file system. File systems belongs to LV’s
Whenever we create the file system we should mention the LV name
#crfs –v jfs2 –d testlv –m /newfs (Normal creation)
The /newfs file system created on testlv.
#crfs –v jfs2 –g testvg –a size=64465 –m /newfs (Directly we can create /fs from VG
This case lv name will be lv00 or lv01 like this after that also we can rename the lv name)
Create FS
Using crfs command we can create a file system. File systems belongs to LV’s
Whenever we create the file system we should mention the LV name
#crfs –v jfs2 –d testlv –m /newfs (Normal creation)
The /newfs file system created on testlv.
#crfs –v jfs2 –g testvg –a size=64465 –m /newfs (Directly we can create /fs from VG
This case lv name will be lv00 or lv01 like this after that also we can rename the lv name)
AIX - Create LV copy
We can create LV content copy to another PV, after this same LV content is available in Lvcopy configured PV.
#lspv
Hdisk0
Hdisk1
Hdisk2
#lspv –l hdisk1
Assume testlv available in hdisk1, now we will make testlv copy to hdisk2, using After this testlv data available in both PV, hdisk1 and hdisk2, If hdisk1 is fail, we can recover testlv data from hdisk2
#mklvcopy testlv 2 hdisk2
Testlv –lv name
2- No of copies, (we can make 3 copies also; this case you put 3 and mention hdisk0 then third copy will be available in hdisk0)
##mklvcopy testlv 3 hdisk0 ( It will make third lvcopy on hdisk0
After executing above command testlv is copied to hdisk2 ,If you want to confirm, execute the following command
#lslv –m testlv (it will show lvcopy details for testlv)
Hdiks1 hdisk2 hdisk0
We can create LV content copy to another PV, after this same LV content is available in Lvcopy configured PV.
#lspv
Hdisk0
Hdisk1
Hdisk2
#lspv –l hdisk1
Assume testlv available in hdisk1, now we will make testlv copy to hdisk2, using After this testlv data available in both PV, hdisk1 and hdisk2, If hdisk1 is fail, we can recover testlv data from hdisk2
#mklvcopy testlv 2 hdisk2
Testlv –lv name
2- No of copies, (we can make 3 copies also; this case you put 3 and mention hdisk0 then third copy will be available in hdisk0)
##mklvcopy testlv 3 hdisk0 ( It will make third lvcopy on hdisk0
After executing above command testlv is copied to hdisk2 ,If you want to confirm, execute the following command
#lslv –m testlv (it will show lvcopy details for testlv)
Hdiks1 hdisk2 hdisk0
Create LV
All the File systems belongs to individual LV, after creating the VG’s we should create the LV using mklv command
Suppose you want to create LV name as newlv
#mklv –y newlv –t jfs2 datavg 5 hdisk4
-y for confirmation
-t type mentioning the filesystem type i.e. jfs or jfs2,
Datavg – lv created on datavg
5 – 5 PP’s allocated for newlv ( 1 pp size 32MB the newlv size is 32MB*5 = 160MB)
Hdisk4 – that newlv is belongs to PV hdisk4
All the File systems belongs to individual LV, after creating the VG’s we should create the LV using mklv command
Suppose you want to create LV name as newlv
#mklv –y newlv –t jfs2 datavg 5 hdisk4
-y for confirmation
-t type mentioning the filesystem type i.e. jfs or jfs2,
Datavg – lv created on datavg
5 – 5 PP’s allocated for newlv ( 1 pp size 32MB the newlv size is 32MB*5 = 160MB)
Hdisk4 – that newlv is belongs to PV hdisk4
AIX - LVM - Export
Volume Group
Using exportvg command we can export VG (including all the PV’s) from one server to another server.
If you have ServerA, in this server has DATAVG with two PV’s. Now we want export DATAVG to ServerB
Before exporting the DATAVG, we should Varryoff the DATAVG, i.e. DATAVG is moved to offline.
#varryoff DATAVG (Varryoff the DATAVG)
#exportvg DATAVG (VG information removed from ODM)
Now DATAVG is exported from the ServerA, after this run the following command to verify the export.
#lsvg
It won’t show DATAVG name. Because DATAVG is exported.
Then you should remove PV from the configuration
#rmdev –dl hdisk3
#rmdev –dl hdisk4
After that we can remove the PV’s from ServerA for import DATAVG to ServerB.
Using exportvg command we can export VG (including all the PV’s) from one server to another server.
If you have ServerA, in this server has DATAVG with two PV’s. Now we want export DATAVG to ServerB
Before exporting the DATAVG, we should Varryoff the DATAVG, i.e. DATAVG is moved to offline.
#varryoff DATAVG (Varryoff the DATAVG)
#exportvg DATAVG (VG information removed from ODM)
Now DATAVG is exported from the ServerA, after this run the following command to verify the export.
#lsvg
It won’t show DATAVG name. Because DATAVG is exported.
Then you should remove PV from the configuration
#rmdev –dl hdisk3
#rmdev –dl hdisk4
After that we can remove the PV’s from ServerA for import DATAVG to ServerB.
AIX - LVM - Extend
Logical Volume
If we want to increase LV size using extendlv command
#lslv newlv
The above command shows LV size, no of LP’s and some other information about LV, suppose LV has 10 LP’s and usage is up to 95% full, that time we can increase the LV size online by adding no of LP’s in newlv i.e.
#extendlv newlv 5
After executing the above command 5 PP’s added with newlv, then some additional space will available in newlv. Suppose you want to see this changes again use the lslv command
#lslv newlv (it will show no of LV’s is 15 and some additional
If we want to increase LV size using extendlv command
#lslv newlv
The above command shows LV size, no of LP’s and some other information about LV, suppose LV has 10 LP’s and usage is up to 95% full, that time we can increase the LV size online by adding no of LP’s in newlv i.e.
#extendlv newlv 5
After executing the above command 5 PP’s added with newlv, then some additional space will available in newlv. Suppose you want to see this changes again use the lslv command
#lslv newlv (it will show no of LV’s is 15 and some additional
AIX - LVM - Import
Volume Group
Using importvg command we can import the DATAVG to ServerB,First you should connect hdisk3, hdisk4, in ServerB then, run the
#cfgmgr (for hard disk detection)
Then check the PV’s installed or not using lspv command
#lspv (it will display the installed PV’s) if hdisk3, hdisk4 is available then PV’s are configured properly.
Then run the command importvg for import the DATAVG
#importvg –y DATAVG hdisk3 (VG information is added in ODM)
#importvg –y DATAVG hdisk4 (VG information is added in ODM)
NOTE:
If ServerB has VG with same name DATAVG, This case we can rename the importing VG DATAVG to other name,
#importvg –y NEWDATAVG hdisk3
#importvg –y NEWDATAVG hdisk4
Like this we can import.
After importing the DATAVG, we no need to Varryon DATAVG, automatically it will Varryon while importing.
Using importvg command we can import the DATAVG to ServerB,First you should connect hdisk3, hdisk4, in ServerB then, run the
#cfgmgr (for hard disk detection)
Then check the PV’s installed or not using lspv command
#lspv (it will display the installed PV’s) if hdisk3, hdisk4 is available then PV’s are configured properly.
Then run the command importvg for import the DATAVG
#importvg –y DATAVG hdisk3 (VG information is added in ODM)
#importvg –y DATAVG hdisk4 (VG information is added in ODM)
NOTE:
If ServerB has VG with same name DATAVG, This case we can rename the importing VG DATAVG to other name,
#importvg –y NEWDATAVG hdisk3
#importvg –y NEWDATAVG hdisk4
Like this we can import.
After importing the DATAVG, we no need to Varryon DATAVG, automatically it will Varryon while importing.
IBM - AIX - List File
System
We can list file system details using lsfs command
#lsfs – List all filesystems in the /etc/filesystems entry
#lsfs –q (List all filesystems with detailed info)
#lsfs –a (list all filesystems (default)
#lsfs –l (specify the output in the list format)
#lsfs –c (specify the output in the column format)
#lsfs –v jfs (List all jfs filesystems)
We can list file system details using lsfs command
#lsfs – List all filesystems in the /etc/filesystems entry
#lsfs –q (List all filesystems with detailed info)
#lsfs –a (list all filesystems (default)
#lsfs –l (specify the output in the list format)
#lsfs –c (specify the output in the column format)
#lsfs –v jfs (List all jfs filesystems)
List LV
Suppose we want see what are the Lv’s available in datavg, then your command will be
#lsvg –l datavg
It will login list LV details
newlv
Now we want see newlv properties, then your command will be
#lslv newlv
The above command is used to display the newlv properties, i.e. available pp’s mount pint, label name, stale partitions. Etc.
#lslv –m newlv – To display the lvcopy information’s
Suppose we want see what are the Lv’s available in datavg, then your command will be
#lsvg –l datavg
It will login list LV details
newlv
Now we want see newlv properties, then your command will be
#lslv newlv
The above command is used to display the newlv properties, i.e. available pp’s mount pint, label name, stale partitions. Etc.
#lslv –m newlv – To display the lvcopy information’s
AIX - LVM - Migrate
Logical Volume
Using migratepv command we can migrate lv from PV to PV
If we want to migrate single LV
#migratepv –l testlv hdisk1 hdisk2
After executing above command testlv LV is moved hdisk2.
Using migratepv command we can migrate lv from PV to PV
If we want to migrate single LV
#migratepv –l testlv hdisk1 hdisk2
After executing above command testlv LV is moved hdisk2.
AIX - LVM - Migrate
Physical Volume
Using migratepv command we can move full PV data or single LV from one PV to another PV. This is not copy just cut and past method,If we want to migrate data from PV to PV
#migratepv hdisk1 hdisk2
After executing above command hdisk1 data is moved to hdisk2.
Using migratepv command we can move full PV data or single LV from one PV to another PV. This is not copy just cut and past method,If we want to migrate data from PV to PV
#migratepv hdisk1 hdisk2
After executing above command hdisk1 data is moved to hdisk2.
AIX - LVM - Mirror
Volume Group
We can do mirroring in AIX, using mirrorvg command and we can create max of three copy of mirror.
If we have two PV’s in rootvg, now we want mirror, Data and OS installed in hdisk0 and now we want to mirror hdisk0 to hdisk1. Then your command will be
#mirrorvg –S –m rootvg hdisk1
S – Backgroup mirror
-m - exact (force) mirror
NOTE: in mirrored VG quorum should be off line because quorum is not recommended for mirror.
We can do mirroring in AIX, using mirrorvg command and we can create max of three copy of mirror.
If we have two PV’s in rootvg, now we want mirror, Data and OS installed in hdisk0 and now we want to mirror hdisk0 to hdisk1. Then your command will be
#mirrorvg –S –m rootvg hdisk1
S – Backgroup mirror
-m - exact (force) mirror
NOTE: in mirrored VG quorum should be off line because quorum is not recommended for mirror.
After creating the
file system, we should mount the file system, without file system mount we
cannot access the file system using mount command we can mount the file system.
Before mount lsfs command is wont display the /newfs file system
#lsfs –a
That /newfs file system detail is not available
#mount /newfs
Now you execute lsfs command, it will show the /newfs details
#lsfs –a
Before mount lsfs command is wont display the /newfs file system
#lsfs –a
That /newfs file system detail is not available
#mount /newfs
Now you execute lsfs command, it will show the /newfs details
#lsfs –a
Remove FS
Using rmfs command we can remove the file systems
#lsfs –a
/testfs
Before removing the /testfs. That file system should be unmounted.
#umount /testfs
#rmfs /testfs (Deletes FS /newfs and associated LV)
After executing the above command /testfs is removed.
#rmfs –r /testfs (Deletes FS /newfs its mount point and associated LV)
Using rmfs command we can remove the file systems
#lsfs –a
/testfs
Before removing the /testfs. That file system should be unmounted.
#umount /testfs
#rmfs /testfs (Deletes FS /newfs and associated LV)
After executing the above command /testfs is removed.
#rmfs –r /testfs (Deletes FS /newfs its mount point and associated LV)
AIX - LVM - Remove
Logical Volume
If we want to LV testlv from server
#rmlv testlv (If data is available in testlv It will ask confirmation)
#rmlv –f testlv (It won’t ask any confirmation, directly it will delete the data)
After executing the above command testlv removed from the server.
If we want to LV testlv from server
#rmlv testlv (If data is available in testlv It will ask confirmation)
#rmlv –f testlv (It won’t ask any confirmation, directly it will delete the data)
After executing the above command testlv removed from the server.
AIX - LVM - Repair
File System
Using fsck command we can repair the problematic FS or corrupted FS
If you want check /data FS
#fsck /data
Or directly we can repair the LV
#fsck –Y n /dev/datalv (To fsck the FS associated to /dev/datalv assuming response “Yes”
#fsck –p /dev/datalv (To restore superblock from backup superblock)
Using fsck command we can repair the problematic FS or corrupted FS
If you want check /data FS
#fsck /data
Or directly we can repair the LV
#fsck –Y n /dev/datalv (To fsck the FS associated to /dev/datalv assuming response “Yes”
#fsck –p /dev/datalv (To restore superblock from backup superblock)
AIX - LVM -
Synchronize Volume Group
Using Syncvg command we can sync the mirrored Vg and LV copy information’s
If we want to sync lvcopy
#syncvg –l lvname
#syncvg –l testlv
After executing the above command, testlv copy get sync with lv copied PV
If we want to sync mirrored PV’s
#syncvg –v rootvg
The above sync the mirrored PV’s in rootvg
Using Syncvg command we can sync the mirrored Vg and LV copy information’s
If we want to sync lvcopy
#syncvg –l lvname
#syncvg –l testlv
After executing the above command, testlv copy get sync with lv copied PV
If we want to sync mirrored PV’s
#syncvg –v rootvg
The above sync the mirrored PV’s in rootvg
AIX - LVM - Unmirror
Volume Group
Using Unmirror command we can Unmirror the VG
#unmirrorvg rootvg hdisk1
PV hdisk1 is removed from rootvg mirror.
Using Unmirror command we can Unmirror the VG
#unmirrorvg rootvg hdisk1
PV hdisk1 is removed from rootvg mirror.
Varryoff VG
This is just for VG deactivation; some clients want to deactivate VG for project Restriction. Suppose customer want deactivate testvg then your command will be
#lsvg –o
Rootvg
Datavg
Testvg
#Varryoff testvg
#lsvg –o
Rootvg
Datavg
The above command display only two online VG’s and it will not show testvg because testvg is offline VG.
This is just for VG deactivation; some clients want to deactivate VG for project Restriction. Suppose customer want deactivate testvg then your command will be
#lsvg –o
Rootvg
Datavg
Testvg
#Varryoff testvg
#lsvg –o
Rootvg
Datavg
The above command display only two online VG’s and it will not show testvg because testvg is offline VG.
AIX - LVM - VarryOn
Volume Group
Varryon VG
This is just for VG activation; some times clients want to deactivate VG for project restriction. After that we want to activate the VG for further data access,Suppose we want to activate testvg, then your command will be .
#lsvg
Rootvg
Datavg
Testvg
The above command shows what are VG’s available
#lsvg –o
Rootvg
Datavg
The above commands shows only online VG’s because testvg is offline so we have to activate testvg
#varryonvg testvg
#lsvg –o
Rootvg
Datavg
Testvg
Now above command is display the testvg.
Varryon VG
This is just for VG activation; some times clients want to deactivate VG for project restriction. After that we want to activate the VG for further data access,Suppose we want to activate testvg, then your command will be .
#lsvg
Rootvg
Datavg
Testvg
The above command shows what are VG’s available
#lsvg –o
Rootvg
Datavg
The above commands shows only online VG’s because testvg is offline so we have to activate testvg
#varryonvg testvg
#lsvg –o
Rootvg
Datavg
Testvg
Now above command is display the testvg.
Assign IP address to
NIC
Using mktcpip or smitty tcpip command we can assign IP address to NIC
#smitty tcpip
It will ask following details
Hostname –
IP address –
Subnet mask –
DNS server –
DNS Server name –
Gateway –
#
Or
#ifconfig en0 inet 192.168.1.1 netmask 255.255.255.0 up (Configure en0 starts Immediately)
After finishing this process ip address assigned to NIC Or We can assign one more IP address to same network card
#ifconfig en0 192.168.1.33 alias (adding alias IP to en0)
#ifconfig –en0 192 168.1.33 –alias (Removing alias IP from en0)
Using mktcpip or smitty tcpip command we can assign IP address to NIC
#smitty tcpip
It will ask following details
Hostname –
IP address –
Subnet mask –
DNS server –
DNS Server name –
Gateway –
#
Or
#ifconfig en0 inet 192.168.1.1 netmask 255.255.255.0 up (Configure en0 starts Immediately)
After finishing this process ip address assigned to NIC Or We can assign one more IP address to same network card
#ifconfig en0 192.168.1.33 alias (adding alias IP to en0)
#ifconfig –en0 192 168.1.33 –alias (Removing alias IP from en0)
AIX - Network - Check
status of the NIC
Using ifconfig command we can check the status of the NIC
#ifconfig –a (To show status of all network interfaces for IP)
Using ifconfig command we can check the status of the NIC
#ifconfig –a (To show status of all network interfaces for IP)
AIX - Network - Check
the Network Statistics
Using netstat command we can check the network statistics
#netstat –a (To show the state of all sockets)
#netstat –c (To show the network buffers cache)
#netstat –D (To show the net drops of packets)
#netstat –i (To display interface statistics)
#netstat –rn (To show routing table – ip will be given instead of host names)
#netstat –s (To show statistics of the protocols)
Using netstat command we can check the network statistics
#netstat –a (To show the state of all sockets)
#netstat –c (To show the network buffers cache)
#netstat –D (To show the net drops of packets)
#netstat –i (To display interface statistics)
#netstat –rn (To show routing table – ip will be given instead of host names)
#netstat –s (To show statistics of the protocols)
AIX - Network - Clear
Gateway
Using route command we can clear the gateway
#route –f (To clear the gateway)
Using route command we can clear the gateway
#route –f (To clear the gateway)
AIX - Network -
Disable IP address
Using ifconfig command we can disable the IP address
#ifconfig en0 down (Turns off network card en0)
Using ifconfig command we can disable the IP address
#ifconfig en0 down (Turns off network card en0)
Enable IP address
#ifconfig en0 up (Turns on network card en0)
#ifconfig en0 up (Turns on network card en0)
AIX - Network - NIC
Configuration
Using cfgmrg command we can configure to server
Cfgmgr command is device management related command. If we want to install new network card, first we should connect network in server. While booting the server boot process is starting the cfgmrg, so that time network card will be installed in server.
We have installed Ethernet card 1.
That Ethernet card is divided into three parts
Ent0 – Physical adapter
En0 – Logical name
Et0 – Architecture of the card (802.3)
Or Using mkinet command we can install the NIC
Using cfgmrg command we can configure to server
Cfgmgr command is device management related command. If we want to install new network card, first we should connect network in server. While booting the server boot process is starting the cfgmrg, so that time network card will be installed in server.
We have installed Ethernet card 1.
That Ethernet card is divided into three parts
Ent0 – Physical adapter
En0 – Logical name
Et0 – Architecture of the card (802.3)
Or Using mkinet command we can install the NIC
AIX - Network - Remove
IP Address
Using ifconfig command we can remove network interface from network list
#ifconfig en0 detach (Removes en0 card from the network interface list)
Using ifconfig command we can remove network interface from network list
#ifconfig en0 detach (Removes en0 card from the network interface list)
AIX - Network - Trace
Host
Using traceroute command we can trace the route to the host
#traceroute ServerA (To trace the route to ServerA)
Using traceroute command we can trace the route to the host
#traceroute ServerA (To trace the route to ServerA)
AIX - Network
-Changing the HOST Name
Using hostname command we can change the host name
#hostname (It will display existing host name)
ServerA
#hostname ServerB
#hostname ServerB
ServerA host name is changed to ServerB
Or Using chdev command to change the hostname for inet0
#chdev –l inet0 –a hostname=ServerB
Using hostname command we can change the host name
#hostname (It will display existing host name)
ServerA
#hostname ServerB
#hostname ServerB
ServerA host name is changed to ServerB
Or Using chdev command to change the hostname for inet0
#chdev –l inet0 –a hostname=ServerB
AIX - Network -Check
the NIC device status
#entstat en0 (To display the status of Ethernet device en0)
#entstat –d en0 (To display detailed information about Ethernet device en0)
#entstat en0 (To display the status of Ethernet device en0)
#entstat –d en0 (To display detailed information about Ethernet device en0)
AIX - NFS (Network
File System)
In this NFS we can share the file systems from server to clients, across the network, using some nfs related commands we can configure the NFS in server end and client end. So clients can access the server mounted files systems through network, with specified permissions, such as read only, read write.
NOTE: Before configuring the NFS, U should check the /etc/hosts file entry, and NFS daemons and all the nfs daemon subsystems
In this NFS we can share the file systems from server to clients, across the network, using some nfs related commands we can configure the NFS in server end and client end. So clients can access the server mounted files systems through network, with specified permissions, such as read only, read write.
NOTE: Before configuring the NFS, U should check the /etc/hosts file entry, and NFS daemons and all the nfs daemon subsystems
.--- nfsd, rpc.mountd
subsystems is running on server end.
--- rpc.statd, rpc.lockd, rpc.mountd subsystems running on client end.
--- rpc.statd, rpc.lockd, rpc.mountd subsystems running on client end.
AIX - NFS - Changing
Exported File System Permissions
Using chnfsexp command we can change the permission for exported file systems
#smitty chnfsexp
One smitty screen will appear, and then you specify the permission and configure the file system.
Using chnfsexp command we can change the permission for exported file systems
#smitty chnfsexp
One smitty screen will appear, and then you specify the permission and configure the file system.
AIX - NFS - Client End
Then we should import the file system to client end.
5. Import
6. List the imported file systems
7. Remove the imported file systems
Then we should import the file system to client end.
5. Import
6. List the imported file systems
7. Remove the imported file systems
AIX - NFS - Export
file system
Using smitty mknfsexp command we can export the file system
#smitty mknfsexp
One window will appear then you have to put the configuration
a. File system name (what file system you want to export i.e. /usr)
b. Specify the target host name (destination host name i.e. serverB)
If this box is empty, then this exporting file system is allowed to all the clients.
c. Specify the access permissions (Read only, Read write)
d. Host allowed root access (Source Server name, ServerA)
e. Then press enter button to execute the above configuration finally result will be OK, if you got OK output then your configurations are exported properly. If you got FAILED error message then you have to check the configuration.
NOTE: After exporting the file system, that exported file system will be added in /etc/exports, and /etc/xtab because while boot process, server is checking exported file systems from above files, if entry found in the above file then file system are exporting on boot process.
Using smitty mknfsexp command we can export the file system
#smitty mknfsexp
One window will appear then you have to put the configuration
a. File system name (what file system you want to export i.e. /usr)
b. Specify the target host name (destination host name i.e. serverB)
If this box is empty, then this exporting file system is allowed to all the clients.
c. Specify the access permissions (Read only, Read write)
d. Host allowed root access (Source Server name, ServerA)
e. Then press enter button to execute the above configuration finally result will be OK, if you got OK output then your configurations are exported properly. If you got FAILED error message then you have to check the configuration.
NOTE: After exporting the file system, that exported file system will be added in /etc/exports, and /etc/xtab because while boot process, server is checking exported file systems from above files, if entry found in the above file then file system are exporting on boot process.
AIX - NFS - Import
File Systems
Using smitty mknfsmnt command we can import the file system.
#smitty mknfsmnt
One smitty configuration screen will appear then you have to specify the following things.
a. specify the path name of mount point (client end mount point by default /mnt will be available or we have to create directory and we can specify that directory name to mount the file system /mnt)
b. Specify the path name of remote directory (This is server file system name i.e. /usr, which file system was exported by server)
c. Host where remote directory resides (This is exporting source server name i.e. ServerA)
d. Mount type name (Specify the file system type jfs2)
e. Then press enter button to execute the above configuration, finally it will exported.
Using smitty mknfsmnt command we can import the file system.
#smitty mknfsmnt
One smitty configuration screen will appear then you have to specify the following things.
a. specify the path name of mount point (client end mount point by default /mnt will be available or we have to create directory and we can specify that directory name to mount the file system /mnt)
b. Specify the path name of remote directory (This is server file system name i.e. /usr, which file system was exported by server)
c. Host where remote directory resides (This is exporting source server name i.e. ServerA)
d. Mount type name (Specify the file system type jfs2)
e. Then press enter button to execute the above configuration, finally it will exported.
AIX - NFS - List
Exported File System
Using lsnfsexp command we can list the exported file system
#lsnfsexp
/usr – rw
Using lsnfsexp command we can list the exported file system
#lsnfsexp
/usr – rw
AIX - NFS - List
Imported Files System
Using mount command we can check the imported file system status.
#mount
Above command is used to display the mounted file system information along with file system type, if nfs mounted file system available then it will show file system type name nfs so easily we can identify which nfs mounted file system.
Using mount command we can check the imported file system status.
#mount
Above command is used to display the mounted file system information along with file system type, if nfs mounted file system available then it will show file system type name nfs so easily we can identify which nfs mounted file system.
AIX - NFS - Remove
Exported File System
Using smitty rmnfsexp command we can remove the exported file system
#smitty rmnfsexp
One smitty screen will appear, and then you press Esc+4, it will check and shows what are the file systems are exported. Then you can remove the exported file system.
After this command execution, list the exported file system using command lsnfsexp, now removed file systems is not listed.
NOTE: while removing the file system, the file system entry removed from /etc/exports and /etc/xtab
Using smitty rmnfsexp command we can remove the exported file system
#smitty rmnfsexp
One smitty screen will appear, and then you press Esc+4, it will check and shows what are the file systems are exported. Then you can remove the exported file system.
After this command execution, list the exported file system using command lsnfsexp, now removed file systems is not listed.
NOTE: while removing the file system, the file system entry removed from /etc/exports and /etc/xtab
AIX - NFS - Remove
Imported File System
Using smitty rmnfsmnt command we can remove the mounted file system from client end.
#smitty rmnfsmnt
Then one smitty screen will appear. Specify the mounted file system name or press Esc+4 keys, for system analyze and show the mount file system, then you mention from the list also. After this command execution, which mounted file system will be removed from the client PC. Now you put mount command, that removed file system is not listed.
Like this we can export and import the network file system.
Using smitty rmnfsmnt command we can remove the mounted file system from client end.
#smitty rmnfsmnt
Then one smitty screen will appear. Specify the mounted file system name or press Esc+4 keys, for system analyze and show the mount file system, then you mention from the list also. After this command execution, which mounted file system will be removed from the client PC. Now you put mount command, that removed file system is not listed.
Like this we can export and import the network file system.
AIX - NFS - Server End
Activities - Server End
First we should export the file system from server end.
1. Export
2. List the exported file systems
3. Remove the exported file systems
4. Change the exported file system permissions
First we should export the file system from server end.
1. Export
2. List the exported file systems
3. Remove the exported file systems
4. Change the exported file system permissions
AIX - ODM (Object Data Manager)
ODM generally used for Maintain the System information, whenever we install and reconfigure the hardware device and software, that information’s added in ODM,
Mainly ODM used to store the following information’s
1. Hardware vital product data information
2. Software information
3. Smit menu
4. Nim
5. TCPIP
6. Error log
1. Device configuration information
2. Display information for SMIT (menus, selectors, and dialogs)
3. Vital product data for installation and update procedures
4. Communications configuration information
5. System resource information.
But we cannot see any ODM information in file format, but this ODM information available in many files and different path,
1. /etc/objrepos
2. /usr/lib/objrepos
3. /usr/share/lib/objrepos
NOTE:
For ODM some variable entry available in /etc/environment file.U should not edit anything in this file. If you want to check the variable entry using command
#env
The above command is used to display the variable details,ODM has two kinds of Databases
1. Pre-defined (PdDv)
2. Customized(CuDv)
1. Predefined
In this predefined Database has one Object class (PdDv) and Objects i.e.
PdDv (Object class)
Object: (Physical Information’s)
Floppy drive
Harddisk drive
Mouse like this all the devices.
2. Customized
In this customized Database has one Object class (CuDv) and Objects i.e.CuDv (Object class)
Objects: (Installed configuration information’s)
Hdisk0
Hdisk1
Fd0
Sa0
Rmt0
Cd0
Scsi0 like this all the devices
ODM States:
ODM has two states
1. Available (device status will be 1)
2. Defined (device status will be 0)
Suppose we are installing one HDD in server. That device is currently accessible this is available state.
Suppose that installed device is removed from server or hdd has failed. This case that device is moved to defined state. i.e. that device configuration is available in server but currently device is not accessible.
We can see this available and defined device status using odmget command
#odmget CuDv ( It will display the customized device status)
ODM Commands:
For object:
1. odmadd
2. odmchange
3. odmget
4. odmdelete
The above command is used to manually we can add object information in ODM
1. odmadd
2. odmchange
The above command is used to change configurations for object in ODM
3. odmget
#odmget –q name=hdisk0 CuDv
The above command is used to display the specified object hdisk0 information in ODM
We can see this available and defined device status using odmget command
#odmget CuDv (It will display the customized device status)
4. odmdelete
#odmdelete –o CuDv –q name=hdisk0
The above command is used to delete the specified object hdisk0 in ODMe
For object class:
1. odmcreate
2. odmdrop
3. odmshow
1. odmcreate
The above command is used to manually we can add object class (PdDv) in ODM
2. odmdrop
The above command is used to stop the specified Object class in ODM
3. odmshow
The above command is used to display the specified object class in ODM
NOTE:You should not add, delete, change, for object and object class in ODM
(100 % we don’t have permissions for ODM)
ODM generally used for Maintain the System information, whenever we install and reconfigure the hardware device and software, that information’s added in ODM,
Mainly ODM used to store the following information’s
1. Hardware vital product data information
2. Software information
3. Smit menu
4. Nim
5. TCPIP
6. Error log
1. Device configuration information
2. Display information for SMIT (menus, selectors, and dialogs)
3. Vital product data for installation and update procedures
4. Communications configuration information
5. System resource information.
But we cannot see any ODM information in file format, but this ODM information available in many files and different path,
1. /etc/objrepos
2. /usr/lib/objrepos
3. /usr/share/lib/objrepos
NOTE:
For ODM some variable entry available in /etc/environment file.U should not edit anything in this file. If you want to check the variable entry using command
#env
The above command is used to display the variable details,ODM has two kinds of Databases
1. Pre-defined (PdDv)
2. Customized(CuDv)
1. Predefined
In this predefined Database has one Object class (PdDv) and Objects i.e.
PdDv (Object class)
Object: (Physical Information’s)
Floppy drive
Harddisk drive
Mouse like this all the devices.
2. Customized
In this customized Database has one Object class (CuDv) and Objects i.e.CuDv (Object class)
Objects: (Installed configuration information’s)
Hdisk0
Hdisk1
Fd0
Sa0
Rmt0
Cd0
Scsi0 like this all the devices
ODM States:
ODM has two states
1. Available (device status will be 1)
2. Defined (device status will be 0)
Suppose we are installing one HDD in server. That device is currently accessible this is available state.
Suppose that installed device is removed from server or hdd has failed. This case that device is moved to defined state. i.e. that device configuration is available in server but currently device is not accessible.
We can see this available and defined device status using odmget command
#odmget CuDv ( It will display the customized device status)
ODM Commands:
For object:
1. odmadd
2. odmchange
3. odmget
4. odmdelete
The above command is used to manually we can add object information in ODM
1. odmadd
2. odmchange
The above command is used to change configurations for object in ODM
3. odmget
#odmget –q name=hdisk0 CuDv
The above command is used to display the specified object hdisk0 information in ODM
We can see this available and defined device status using odmget command
#odmget CuDv (It will display the customized device status)
4. odmdelete
#odmdelete –o CuDv –q name=hdisk0
The above command is used to delete the specified object hdisk0 in ODMe
For object class:
1. odmcreate
2. odmdrop
3. odmshow
1. odmcreate
The above command is used to manually we can add object class (PdDv) in ODM
2. odmdrop
The above command is used to stop the specified Object class in ODM
3. odmshow
The above command is used to display the specified object class in ODM
NOTE:You should not add, delete, change, for object and object class in ODM
(100 % we don’t have permissions for ODM)
AIX - Paging -
Activate Paging Space
Using swapon command we can activate the paging space
#swapon /dev/newpaging (To activate paging space)
The paging space is active stage, and then one entry will be available in /etc/swapspaces file.
5. Deactivate paging space
Using swapoff command we can deactivate the paging space
#swapon /dev/newpaging (To deactivate paging space)
The paging space is deactivated, then that paging space entry is removed from /etc/swapspaces
Using swapon command we can activate the paging space
#swapon /dev/newpaging (To activate paging space)
The paging space is active stage, and then one entry will be available in /etc/swapspaces file.
5. Deactivate paging space
Using swapoff command we can deactivate the paging space
#swapon /dev/newpaging (To deactivate paging space)
The paging space is deactivated, then that paging space entry is removed from /etc/swapspaces
AIX - Paging - Change
Paging Space
Using chps command we can increase, decrease, auto on, and auto off the paging space.
#chps –s 5 newpaging (5 LP’s added with newpaging) – To increase
#chps –d 3 newpaging (3 LP’s reduced from newpaging – To Decrease
#chps -ay newpaging (To start the paging space at startup)
#chps –an newpaging (To stop the paging space automatic startup at boot)
Using chps command we can increase, decrease, auto on, and auto off the paging space.
#chps –s 5 newpaging (5 LP’s added with newpaging) – To increase
#chps –d 3 newpaging (3 LP’s reduced from newpaging – To Decrease
#chps -ay newpaging (To start the paging space at startup)
#chps –an newpaging (To stop the paging space automatic startup at boot)
Using mkps command we
can create the paging space
AIX - Paging - Create Paging Space
#mkps –s 10 rootvg hdisk2
s- size
10 – no of PP size
Rootvg – specifying the VG
Hdisk2 – paging space created in PV hdisk2 (PP allocated from hdisk2)
Then paging space has created and name will be paging00
Using mklv command we can create paging space using different name.
Generally paging name will be paging00, paging01, paging02,
#mklv –y newpaging –t paging rootvg 10 hdisk2
#lsps –a
Paging00 , newpaging
AIX - Paging - Create Paging Space
#mkps –s 10 rootvg hdisk2
s- size
10 – no of PP size
Rootvg – specifying the VG
Hdisk2 – paging space created in PV hdisk2 (PP allocated from hdisk2)
Then paging space has created and name will be paging00
Using mklv command we can create paging space using different name.
Generally paging name will be paging00, paging01, paging02,
#mklv –y newpaging –t paging rootvg 10 hdisk2
#lsps –a
Paging00 , newpaging
AIX - Paging -
Deactivate Paging Space
Using swapoff command we can deactivate the paging space
#swapon /dev/newpaging (To deactivate paging space)
The paging space is deactivated, then that paging space entry is removed from /etc/swapspaces
Using swapoff command we can deactivate the paging space
#swapon /dev/newpaging (To deactivate paging space)
The paging space is deactivated, then that paging space entry is removed from /etc/swapspaces
AIX - Paging - List
Paging Space
Using lsps command we can view the paging space details
#lsps –a (It will display the paging space details)
Using lsps command we can view the paging space details
#lsps –a (It will display the paging space details)
AIX - Paging - Remove
Paging Space
Using rmps command we can remove the paging space
#rmps newpaging
NOTE: Before removing the paging space, paging space should be offline, then we can remove the paging space, otherwise it will give some errors.
Using rmps command we can remove the paging space
#rmps newpaging
NOTE: Before removing the paging space, paging space should be offline, then we can remove the paging space, otherwise it will give some errors.
AIX - Paging Space
Paging space is configured for additional system performance i.e. if real memory is occupies some system process, that time further process is moved to paging space temporary. If real memory getting free, then process moved from paging space to real memory. This paging space is assigned from HDD space.
Normally paging space is configured double size of the real memory.If system has 512MB RAM, then paging space size will be 1BG.In this paging space we can perform following:
1. List paging space
2. Create paging space
3. Change paging space
4. Activate paging space
5. Deactivate paging space
6. Remove paging space
Paging space is configured for additional system performance i.e. if real memory is occupies some system process, that time further process is moved to paging space temporary. If real memory getting free, then process moved from paging space to real memory. This paging space is assigned from HDD space.
Normally paging space is configured double size of the real memory.If system has 512MB RAM, then paging space size will be 1BG.In this paging space we can perform following:
1. List paging space
2. Create paging space
3. Change paging space
4. Activate paging space
5. Deactivate paging space
6. Remove paging space
sysdumpdev
Changes the primary or secondary dump device designation in a running system. The default primary dump device is LV /dev/hd6 and the default secondary dump device is /dev/sysdumpnull. A dedicated primary dump device LV /dev/lg_dumplv is created (if sufficient disk space is available) in systems with at least 4 Gigabytes of real memory.
sysdumpdev -l : displays current dump device settings.
sysdumpdev -P -p /dev/hd7 : changes the primary dump device permanently from the default to LV /dev/hd7.
sysdumpdev -e : estimates the dump size (in bytes) for the current running system.
sysdumpdev -L : displays statistical information about the last dump.
chdev -l sys0 -a autostart=true : automatically reboot after a crash (default is false).
dumpcheck - Checks the disk resources used by the system dump and logs in the system error log. Run default by cron at 3:00 pm local time each day.
/usr/lib/ras/dumpcheck -p : requests a dumpcheck. The result is printed to stdout (-p).
/usr/lib/ras/dumpcheck -r : discontinues running dumpcheck (removes the crontab entry).
kdb - Displays system images for examining a dump.
kdb /var/adm/ras/vmcore.0 /unix : starts kdb using the uncompressed dump file /var/adm/ras/vmcore.0 and kernel file /unix.
snap - Gathers system configuration information and compresses the information into a pax file.
snap -a -o /dev/rmt0 : gathers all system configuration information (needs approximately 8 MB space in directory /tmp/ibmsupt) and creates a compressed pax image (snap.pax.Z) of directory /tmp/ibmsupt.
snapcore
Gathers the core file, program, and libraries used by a program to directory /tmp/snapcore (default) and compresses the information into a pax image. The collected information allows debugging and resolving problems within an application.
snapcore -d /tmp/snapcore2 core.xx : gathers all needed information for core dump file core.xx and writes it to directory /tmp/snapcore2/snapcore_32811.pax.Z, where 32811 is the process id ($pid) of the snapcore command.
uncompress -c snapcore_32811.pax.Z | pax : displays the contents of the pax archive.
check_core
Used by snapcore to gather all information about a core dump. The bos.rte.serv_aid fileset must be installed.
/usr/lib/ras/check_core core.xx : displays a list containing the program that caused core dump core.xx and the used libraries.
shconf
Manages the system hang detection parameters for the system hang daemon shdaemon.
shconf -d : displays if priority problem detection and lost I/O detection are enabled or not.
shconf -E -l prio -H : displays the current shdaemon settings.
Changes the primary or secondary dump device designation in a running system. The default primary dump device is LV /dev/hd6 and the default secondary dump device is /dev/sysdumpnull. A dedicated primary dump device LV /dev/lg_dumplv is created (if sufficient disk space is available) in systems with at least 4 Gigabytes of real memory.
sysdumpdev -l : displays current dump device settings.
sysdumpdev -P -p /dev/hd7 : changes the primary dump device permanently from the default to LV /dev/hd7.
sysdumpdev -e : estimates the dump size (in bytes) for the current running system.
sysdumpdev -L : displays statistical information about the last dump.
chdev -l sys0 -a autostart=true : automatically reboot after a crash (default is false).
dumpcheck - Checks the disk resources used by the system dump and logs in the system error log. Run default by cron at 3:00 pm local time each day.
/usr/lib/ras/dumpcheck -p : requests a dumpcheck. The result is printed to stdout (-p).
/usr/lib/ras/dumpcheck -r : discontinues running dumpcheck (removes the crontab entry).
kdb - Displays system images for examining a dump.
kdb /var/adm/ras/vmcore.0 /unix : starts kdb using the uncompressed dump file /var/adm/ras/vmcore.0 and kernel file /unix.
snap - Gathers system configuration information and compresses the information into a pax file.
snap -a -o /dev/rmt0 : gathers all system configuration information (needs approximately 8 MB space in directory /tmp/ibmsupt) and creates a compressed pax image (snap.pax.Z) of directory /tmp/ibmsupt.
snapcore
Gathers the core file, program, and libraries used by a program to directory /tmp/snapcore (default) and compresses the information into a pax image. The collected information allows debugging and resolving problems within an application.
snapcore -d /tmp/snapcore2 core.xx : gathers all needed information for core dump file core.xx and writes it to directory /tmp/snapcore2/snapcore_32811.pax.Z, where 32811 is the process id ($pid) of the snapcore command.
uncompress -c snapcore_32811.pax.Z | pax : displays the contents of the pax archive.
check_core
Used by snapcore to gather all information about a core dump. The bos.rte.serv_aid fileset must be installed.
/usr/lib/ras/check_core core.xx : displays a list containing the program that caused core dump core.xx and the used libraries.
shconf
Manages the system hang detection parameters for the system hang daemon shdaemon.
shconf -d : displays if priority problem detection and lost I/O detection are enabled or not.
shconf -E -l prio -H : displays the current shdaemon settings.
The following commands
change the quorum for the volume group testvg. This
Attribute determines if the volume group will be varied off or not after losing the
Simple majority of its physical volumes.
To turn off the quorum use the command:
#chvg -Qn testvg
To turn on the quorum use the command:
# chvg -Qy testvg
Quorum is used for data integrity. When we activate quorum in VG it will recover 51% of data in VG
If we have DATAVG, This DATAVG has two PV’s hdisk1, hdisk2.
First PV hdisk1 has 2 * VGDA and 1 *VGSA
Second PV hdisk2 has 1* VGDA and 1*VGSA
Each VGDA has 33% of data, so hdisk1 has 2 VGDA, it will protect 66% of data and Second PV hdisk2 has 1 VGDA, it will protect only 33% data.
Attribute determines if the volume group will be varied off or not after losing the
Simple majority of its physical volumes.
To turn off the quorum use the command:
#chvg -Qn testvg
To turn on the quorum use the command:
# chvg -Qy testvg
Quorum is used for data integrity. When we activate quorum in VG it will recover 51% of data in VG
If we have DATAVG, This DATAVG has two PV’s hdisk1, hdisk2.
First PV hdisk1 has 2 * VGDA and 1 *VGSA
Second PV hdisk2 has 1* VGDA and 1*VGSA
Each VGDA has 33% of data, so hdisk1 has 2 VGDA, it will protect 66% of data and Second PV hdisk2 has 1 VGDA, it will protect only 33% data.
AIX - Quorum - LVCB
(Logical Volume control block)
LVCB (Logical Volume control block)
Logical volume control block (LVCB) contains important information about the Logical volume, such as the number of the logical partitions or disk allocation Policy. Its architecture and location on the disk depends on the type of the Volume group it belongs to. For standard volume groups, the LVCB resides on The first block of user data within the LV. For big volume groups there is Additional LVCB information in VGDA on the disk. For scalable volume groups All relevant logical volume control information is kept in the VGDA as part of The LVCB information area and the LV entry area.
LVCB (Logical Volume control block)
Logical volume control block (LVCB) contains important information about the Logical volume, such as the number of the logical partitions or disk allocation Policy. Its architecture and location on the disk depends on the type of the Volume group it belongs to. For standard volume groups, the LVCB resides on The first block of user data within the LV. For big volume groups there is Additional LVCB information in VGDA on the disk. For scalable volume groups All relevant logical volume control information is kept in the VGDA as part of The LVCB information area and the LV entry area.
AIX - Quorum - VGDA
(Volume Group Descriptor Area)
Volume group descriptor area (VGDA) is an area on the disk that contains Information pertinent to the volume group that physical volume belongs to. It Also includes information about properties and status of all physical and Logical volumes that are part of the volume group. The information from VGDA
is used and updated by LVM commands. There is at least one VGDA per Physical volume. Information from VGDAs of all disks that are part of the Same volume group must de identical. VGDA internal architecture and location on the disk depends on the type of the volume group (original, big, or
Scalable).
Volume group descriptor area (VGDA) is an area on the disk that contains Information pertinent to the volume group that physical volume belongs to. It Also includes information about properties and status of all physical and Logical volumes that are part of the volume group. The information from VGDA
is used and updated by LVM commands. There is at least one VGDA per Physical volume. Information from VGDAs of all disks that are part of the Same volume group must de identical. VGDA internal architecture and location on the disk depends on the type of the volume group (original, big, or
Scalable).
VGSA (Volume Group Status
Area)
Volume group status area (VGSA) is used to describe the state of all physical Partitions from all physical volumes within a volume group. The VGSA indicates if a physical partition contains accurate or stale information. VGSA Is used for monitoring and maintained data copies synchronization. The
VGSA is essentially a bitmap and its architecture and location on the disk Depends on the type of the volume group.
Volume group status area (VGSA) is used to describe the state of all physical Partitions from all physical volumes within a volume group. The VGSA indicates if a physical partition contains accurate or stale information. VGSA Is used for monitoring and maintained data copies synchronization. The
VGSA is essentially a bitmap and its architecture and location on the disk Depends on the type of the volume group.
Reduce VG
We can remove the VG using reducevg command, if we want remove testvg and testvg has one pv hdisk9
#lsvg –p testvg
Hdisk9
Now we will remove the pv from testvg
#reducevg –f testvg hdisk9
f- option is used to force reduce, you have data in pv hdisk9, that time I will not any questions, directly it will remove the pv from testvg. Suppose 2 PV’s available in testvg then one by one we can reduce the PV’s
We can remove the VG using reducevg command, if we want remove testvg and testvg has one pv hdisk9
#lsvg –p testvg
Hdisk9
Now we will remove the pv from testvg
#reducevg –f testvg hdisk9
f- option is used to force reduce, you have data in pv hdisk9, that time I will not any questions, directly it will remove the pv from testvg. Suppose 2 PV’s available in testvg then one by one we can reduce the PV’s
AIX - Refresh
(restart) Daemon
Using refresh command we can restart the daemon
#refresh –g nfs (restart the group of subsystems)
#refresh –s rpc.statd (restart the single subsystems)
Like this we can restart the daemons,
Using refresh command we can restart the daemon
#refresh –g nfs (restart the group of subsystems)
#refresh –s rpc.statd (restart the single subsystems)
Like this we can restart the daemons,
AIX - Restore
Using tar and restore command we can restore the data in server
Using tar command we can restore data to server, this is normal restore
#tar –xvf /dev/rmt0
The tape backup is restored to /data directory.
Using restore command we can restore the data
#restore –xdf /dev/rmt0
The tape data is restored in current directory.
Like this we can restore the data in AIX
Using tar and restore command we can restore the data in server
Using tar command we can restore data to server, this is normal restore
#tar –xvf /dev/rmt0
The tape backup is restored to /data directory.
Using restore command we can restore the data
#restore –xdf /dev/rmt0
The tape data is restored in current directory.
Like this we can restore the data in AIX
AIX - Restore Rootvg
Backup
Using restore command we can restore the rootvg backup
Boot server with bos (base operating system) Cd, then go to maintenance mode and access the rootvg, then run the following command
#restore –T –d –v –q –f /dev/rmt0 Or Boot server with bos CD, then go to maintenance mode and initiate the rootvg backup (one option available in maintenance mode).
Like this we can restore the rootvg backup
Using restore command we can restore the rootvg backup
Boot server with bos (base operating system) Cd, then go to maintenance mode and access the rootvg, then run the following command
#restore –T –d –v –q –f /dev/rmt0 Or Boot server with bos CD, then go to maintenance mode and initiate the rootvg backup (one option available in maintenance mode).
Like this we can restore the rootvg backup
AIX - Restore the non
rootvg backup
Using restvg command we can restore the non rootvg backup
#restvg –xdf /dev/rmt0
After command execution datavg backup restored to server with same name while importing vg we can change the vg name.
Using restvg command we can restore the non rootvg backup
#restvg –xdf /dev/rmt0
After command execution datavg backup restored to server with same name while importing vg we can change the vg name.
AIX - Rewind, Eject,
Erase the tape
Using tctl command we can rewind, eject and erase the tape drive.
#tctl –f /dev/rmt0 rewind (To rewind the tape)
#tctl –f /dev/rmt0 eject (To eject the tape)
#tctl –f /dev/rmt0 erase (To erase the tape content)
Using tctl command we can rewind, eject and erase the tape drive.
#tctl –f /dev/rmt0 rewind (To rewind the tape)
#tctl –f /dev/rmt0 eject (To eject the tape)
#tctl –f /dev/rmt0 erase (To erase the tape content)
AIX - Rootvg Backup - Contd....
First block has boot image.
The BOS boot image contains a copy of the system’s kernel and device drivers,needed to boot from the mksysb tape. It is created by the bosboot command.
Second block has following things, 1. /tapeblksize, 2. /image.data, 3. bosinst.data.
First block has boot image.
The BOS boot image contains a copy of the system’s kernel and device drivers,needed to boot from the mksysb tape. It is created by the bosboot command.
Second block has following things, 1. /tapeblksize, 2. /image.data, 3. bosinst.data.
AIX - Rootvg Backup
Using mksysb command we can take the rootvg (AIX OS) backup
#mksysb –i /dev/rmt0
#mksysb –ie /dev/rmt0 (exclude backup – please read NOTE message)
i option is used for crate the image.data file created in tape
This image.data file contains all the file system information’s in rootvg while restore the rootvg backup, before start the restore it will read the information’s from the image.data file.
After the command execution rootvg backup created in tap, If OS got corrupted, that time we can restore the os from rootvg backup.
NOTE: While taking rootvg backup we can exclude unwanted file systems in backup process. If you not required following file systems in mksysb backup,
/var – log files
That time you should put entry in /etc/exclude.rootvg,
While creating the rootvg backup, first tape is spitted in to 4 blocks (block size is 512)
Using mksysb command we can take the rootvg (AIX OS) backup
#mksysb –i /dev/rmt0
#mksysb –ie /dev/rmt0 (exclude backup – please read NOTE message)
i option is used for crate the image.data file created in tape
This image.data file contains all the file system information’s in rootvg while restore the rootvg backup, before start the restore it will read the information’s from the image.data file.
After the command execution rootvg backup created in tap, If OS got corrupted, that time we can restore the os from rootvg backup.
NOTE: While taking rootvg backup we can exclude unwanted file systems in backup process. If you not required following file systems in mksysb backup,
/var – log files
That time you should put entry in /etc/exclude.rootvg,
While creating the rootvg backup, first tape is spitted in to 4 blocks (block size is 512)
AIX - Rootvg Backup -
Second Block
1. /tapeblksize
The /tapeblksize file contains the block size the tape drive was set to when the mksysb command was run.
2. /image.data
The /image.data file store the information about rootvg, like vg, pp, pp size, lv, lv size, FS
The image.data file resides in /var/adm/ras/image.data
3. /bosinst.data
The ./bosinst.data file allows you to specify the requirements at the target system
and how the user interacts with the target system. This file contains the
customized BOS install procedures and dictates how the BOS install program will
behave. You can customize this file before issuing the mksysb command or use a
procedure to customize this file after the image backup is done.
Third block has dummy toc file,
The dummy table of contents (TOC) is used so that the mksysb tape contains the
same number of images as a BOS install tape.
Fourth block has data, that is rootvg original data
1. /tapeblksize
The /tapeblksize file contains the block size the tape drive was set to when the mksysb command was run.
2. /image.data
The /image.data file store the information about rootvg, like vg, pp, pp size, lv, lv size, FS
The image.data file resides in /var/adm/ras/image.data
3. /bosinst.data
The ./bosinst.data file allows you to specify the requirements at the target system
and how the user interacts with the target system. This file contains the
customized BOS install procedures and dictates how the BOS install program will
behave. You can customize this file before issuing the mksysb command or use a
procedure to customize this file after the image backup is done.
Third block has dummy toc file,
The dummy table of contents (TOC) is used so that the mksysb tape contains the
same number of images as a BOS install tape.
Fourth block has data, that is rootvg original data
AIX - Scheduling
In Aix Os we can schedule jobs using crontab command; these jobs are executed in background at mentioned time.
If Administrator want to create five users on next week, but next week system administrator is out of country, that time admin can schedule this user creation job one week before using crontab command, so that server will create 5 users at scheduled time.
In this scheduling we can do following things.
1. List scheduling
2. Edit scheduling
3. Clear scheduling
4. Assign user permissions
In Aix Os we can schedule jobs using crontab command; these jobs are executed in background at mentioned time.
If Administrator want to create five users on next week, but next week system administrator is out of country, that time admin can schedule this user creation job one week before using crontab command, so that server will create 5 users at scheduled time.
In this scheduling we can do following things.
1. List scheduling
2. Edit scheduling
3. Clear scheduling
4. Assign user permissions
AIX - Scheduling -
Assign User Permissions
We can allow and deny crontab usage permissions for users
If u want to deny kumar user for crontab process, that time you put entry in /var/adm/cron/cron.allow file
If u want to allow kumar user for crontab process, that time you put entry in
/var/adm/cron/cron.deny file
Like this we can assign permissions to users for crontab process
NOTE: In AIX OS at command also available for schedule the job, in this at command we cannot specify the multiple jobs, at a time we can run single job only, now a days this at command is not using by users, they are using only crontab
We can allow and deny crontab usage permissions for users
If u want to deny kumar user for crontab process, that time you put entry in /var/adm/cron/cron.allow file
If u want to allow kumar user for crontab process, that time you put entry in
/var/adm/cron/cron.deny file
Like this we can assign permissions to users for crontab process
NOTE: In AIX OS at command also available for schedule the job, in this at command we cannot specify the multiple jobs, at a time we can run single job only, now a days this at command is not using by users, they are using only crontab
AIX - Scheduling -
Clear scheduling
Using crontab command we can clear the scheduled jobs.
#crontab –r
After command execution this crontab file entries will be removed.
Using crontab command we can clear the scheduled jobs.
#crontab –r
After command execution this crontab file entries will be removed.
AIX - Scheduling -
Edit Scheduling
Using crontab command we can edit the scheduled job
#crontab –e
Here you have to mention i.e. at what jobs will be executed.
minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)
#run at 2:15pm on the first of 6th month Saturday (comments)
15 14 1 6 6 #mkuser kumar
Kumar user will be created on mentioned time
NOTE:Once crontab jobs completed, that output logs stored in /var/spool/cron/crontabs
Using crontab command we can edit the scheduled job
#crontab –e
Here you have to mention i.e. at what jobs will be executed.
minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)
#run at 2:15pm on the first of 6th month Saturday (comments)
15 14 1 6 6 #mkuser kumar
Kumar user will be created on mentioned time
NOTE:Once crontab jobs completed, that output logs stored in /var/spool/cron/crontabs
AIX - Scheduling -
List Scheduling
Using crontab command we can list scheduled job.
#crontab –l
The above command is list the scheduled jobs
Using crontab command we can list scheduled job.
#crontab –l
The above command is list the scheduled jobs
AIX - Software
Maintenance
In this software Installation we can do following things
1. Fileset installation
2. Applying the Fileset
3. Reject the Installed Fileset
4. Commit the applied Fileset
5. Remove the Committed Fileset
6. Verify the Installed Fileset ( whether properly installed or not)
7. Clear the braked Fileset installation
8. List the Installed Fileset
9. List the Installed Fileset contents ( What are the files available in File Set)
10. To finding the file, Extracted from which Fileset.
11. To find the command file path
12. To view the fileset history
1. Fileset Installation
The Filesets has additional support files for AIX. Suppose we need additional files, we can install it from Base operating system (bos) CD, Bonus software CD, Expansion Software CD, LPP’s (Licensed program product) CD.
NOTE:If we want to check the AIX Server performance, we need topas command, this topas command is not by default come under AIX OS installation, So that topas file we have to install from some other CD’s.
First we should mount the CDROM drive in server.
When we mount the CDROM, we required mount point like one directory.
So we should create the directory. Eg. /cdmnt (Directory name will be whatever may be)
#mkdir mount point
#mkdir cdmnt
Then u can mount the CDROM drive in cdmnt directory
#mount –v cdrfs –o ro /dev/cd0 /mount point
#mount –v cdrfs –o ro /dev/cd0 /cdmnt
Verify the Cdrom drive mount process.
#mount
The above command will show the cdrom drive mount point i.e. /cdmnt and cdrfs file system.
Then u go to /cdmnt folder
#cd cdmnt
#pwd
cdmnt
#
Now topas file will be under bos.permaget.tool file set. Now we should find the file set in software cd.
To find the file set using command #installp –Ld /dev/cd0 | grep bos.perf*
If the above bos.permaget.tool file set is available in cd, it will show otherwise it won’t show.
If file set is found then we have to install the fileset.
To install the file set using #installp –agxpd /dev/cd0 file set (for preview installation)
i.e. #installp –agxd /dev/cd0 bos.permaget.tool (for installation)
see difference
Options –agxpd for preview
-agxd for installation
When we type the above command, fileset installation will start and topas file extracted from the fileset and it will store to /usr/sbin/topas (super user or administrator commands stored in /usr/sbin)
After that we can use topas performance monitor utility.
#topas
The above command will display the system performance status, like cpu usage, memory usage, io usage (hdisk’s) network usage, paging space usage .
2. Applying Fileset (It is not permanent installation)
This applying Fileset is just file set installation, i.e. When we updating the old fileset to new fileset, by default installation has done in apply state and old fileset configuration is moved to /usr/lpp/package(fileset) path, After commit the fileset this /usr/lpp/package(fileset) will updated . Because if any problems in updated fileset, we can easily reject(remove) the updated fileset, If updated fileset is working properly we can commit the updated fileset, i.e. permanent installation, this case we cannot reject the fileset, but we can uninstall the fileset.
NOTE:
Suppose we are installing fileset for the first time, this first time installation done in commit state, and When we updating the fileset, installation has done in apply state, suppose that updated fileset giving some problem, we can easily reject the updated fileset.
For fileset installation using command installp
Suppose u want to install one fileset bos.rte
Preview (It will show the installation preview – This preview is not required our testing purpose we are using)
#installp –agxpd /dev/cd0 fileset name
#installp –agxpd /dev/cd0 bos.rte (for preview)
Flags:
a - Apply
g – Perquisites (supporting file)
x – Expand the space
p – Preview
d – Specify the device
After preview we can install the Fileset
#installp –agxd /dev/cd0 bos.rte
After Installation, old installed fileset configuration is moved to /usr//lpp/package (fileset), and updated fileset also available in /usr/lpp/package.
3. Reject the Applied Fileset.
After updating the fileset that installed fileset is moved to applied state, suppose that updated filesets are not working properly then we have to remove the updated fileset and pervious filesets are to be configuring to current working condition.
Now we will reject the updated fileset using
#installp –rgp fileset name (For preview)
#installp –rg fileset name
#installp –rg bos.rte.command
The above command is used to remove the updated fileset and automatically previous fileset is moved to working condition.
4. Commit the Applied fileset (It is permanent installation)
After updating the fileset that installed fileset is moved to applied state, suppose applied filesets are working properly, then we have to commit the updated fileset for permanent installation. Otherwise we will remove the updated fileset using reject option.
Now we will commit the updated fileset using
#installp –cgx fileset name
#installp –cgx bos.rte.command
The above command is used to commit the updated fileset.
5. Remove the Committed fileset (It is complete fileset removal not reject)
After commit the fileset, that fileset is moved to permanent installation, we cannot reject, we have to uninstall the fileset only.
Now we will uninstall the committed fileset using:
#installp –ugp Fileset name
#installp –ugp bos.rte.command (For preview)
#installp –ug bos.rte.command (For un installation)
The above command is used to uninstall the committed fileset.
6. Verify the installed fileset (Whether properly installed or not)
After installation we want to verify whether filesets are properly installed are not, using following command
#lppchk –v fileset name
#lppchk –v bos.rte.command
If any problems it will show the error message otherwise no error message, then we will confirm fileset is installed properly.
7. Clear the braked fileset installation:
While installing the filesets, some problem has occurred, i.e. Cd is not reading or space is not available in volume group.
This time half of the fileset only installed in server, so before next installation, we should remove the half installed fileset using
#Installp –C
To clean the brokend fileset installation
8. List the installed fileset
Suppose we want to see what are the filesets available in Server, Using
#lslpp –l
The above command list the all installed fileset,Suppose you want to find particular fileset in server, Using
#lslpp –l | grep Fileset name
The above command is list the specified fileset only, if file set is not available or not installed, it won’t show anything.
9. List the installed fileset content (What are the files available in fileset)
Suppose we want to see bos.rte.command fileset content, using
#lslpp –f fileset name
#lslpp –f bos.rte.command
The above command is display the bos.rte.command file
Basically bos.rte.command fileset has user commands So it will show the /usr/bin/ls,
10. To find the file, which is installed from which fileset.
Using # lslpp –w /usr/bin/ls
The above command shows the bos.rte.command fileset name, because ls command file is extracted from bos.rte.command fileset
#lslpp –w /usr/sbin/savevg
The above shows some other fileset name.
11. To find the command file path:
Using #which ls
The above command is display the given file path i.e. the above command output will be
/usr/bin/ls
Suppose we want to savevg path, using
#which savevg
/usr/sbin/savevg
12. To view the fileset history:
Using #lslpp –h fileset name
#lslpp –h bos.rte.command
The above command output will be full details of fileset.
Fileset version, installed time, date
NOTE: Whenever we installing the fileset or fix, in that current path should have the .toc (table of content) file. If this file is not available we cannot install any fileset or fix from that current path
If file is not available, we can create the .toc file using command
#inutoc .
The above command is used to create the .toc file
In this software Installation we can do following things
1. Fileset installation
2. Applying the Fileset
3. Reject the Installed Fileset
4. Commit the applied Fileset
5. Remove the Committed Fileset
6. Verify the Installed Fileset ( whether properly installed or not)
7. Clear the braked Fileset installation
8. List the Installed Fileset
9. List the Installed Fileset contents ( What are the files available in File Set)
10. To finding the file, Extracted from which Fileset.
11. To find the command file path
12. To view the fileset history
1. Fileset Installation
The Filesets has additional support files for AIX. Suppose we need additional files, we can install it from Base operating system (bos) CD, Bonus software CD, Expansion Software CD, LPP’s (Licensed program product) CD.
NOTE:If we want to check the AIX Server performance, we need topas command, this topas command is not by default come under AIX OS installation, So that topas file we have to install from some other CD’s.
First we should mount the CDROM drive in server.
When we mount the CDROM, we required mount point like one directory.
So we should create the directory. Eg. /cdmnt (Directory name will be whatever may be)
#mkdir mount point
#mkdir cdmnt
Then u can mount the CDROM drive in cdmnt directory
#mount –v cdrfs –o ro /dev/cd0 /mount point
#mount –v cdrfs –o ro /dev/cd0 /cdmnt
Verify the Cdrom drive mount process.
#mount
The above command will show the cdrom drive mount point i.e. /cdmnt and cdrfs file system.
Then u go to /cdmnt folder
#cd cdmnt
#pwd
cdmnt
#
Now topas file will be under bos.permaget.tool file set. Now we should find the file set in software cd.
To find the file set using command #installp –Ld /dev/cd0 | grep bos.perf*
If the above bos.permaget.tool file set is available in cd, it will show otherwise it won’t show.
If file set is found then we have to install the fileset.
To install the file set using #installp –agxpd /dev/cd0 file set (for preview installation)
i.e. #installp –agxd /dev/cd0 bos.permaget.tool (for installation)
see difference
Options –agxpd for preview
-agxd for installation
When we type the above command, fileset installation will start and topas file extracted from the fileset and it will store to /usr/sbin/topas (super user or administrator commands stored in /usr/sbin)
After that we can use topas performance monitor utility.
#topas
The above command will display the system performance status, like cpu usage, memory usage, io usage (hdisk’s) network usage, paging space usage .
2. Applying Fileset (It is not permanent installation)
This applying Fileset is just file set installation, i.e. When we updating the old fileset to new fileset, by default installation has done in apply state and old fileset configuration is moved to /usr/lpp/package(fileset) path, After commit the fileset this /usr/lpp/package(fileset) will updated . Because if any problems in updated fileset, we can easily reject(remove) the updated fileset, If updated fileset is working properly we can commit the updated fileset, i.e. permanent installation, this case we cannot reject the fileset, but we can uninstall the fileset.
NOTE:
Suppose we are installing fileset for the first time, this first time installation done in commit state, and When we updating the fileset, installation has done in apply state, suppose that updated fileset giving some problem, we can easily reject the updated fileset.
For fileset installation using command installp
Suppose u want to install one fileset bos.rte
Preview (It will show the installation preview – This preview is not required our testing purpose we are using)
#installp –agxpd /dev/cd0 fileset name
#installp –agxpd /dev/cd0 bos.rte (for preview)
Flags:
a - Apply
g – Perquisites (supporting file)
x – Expand the space
p – Preview
d – Specify the device
After preview we can install the Fileset
#installp –agxd /dev/cd0 bos.rte
After Installation, old installed fileset configuration is moved to /usr//lpp/package (fileset), and updated fileset also available in /usr/lpp/package.
3. Reject the Applied Fileset.
After updating the fileset that installed fileset is moved to applied state, suppose that updated filesets are not working properly then we have to remove the updated fileset and pervious filesets are to be configuring to current working condition.
Now we will reject the updated fileset using
#installp –rgp fileset name (For preview)
#installp –rg fileset name
#installp –rg bos.rte.command
The above command is used to remove the updated fileset and automatically previous fileset is moved to working condition.
4. Commit the Applied fileset (It is permanent installation)
After updating the fileset that installed fileset is moved to applied state, suppose applied filesets are working properly, then we have to commit the updated fileset for permanent installation. Otherwise we will remove the updated fileset using reject option.
Now we will commit the updated fileset using
#installp –cgx fileset name
#installp –cgx bos.rte.command
The above command is used to commit the updated fileset.
5. Remove the Committed fileset (It is complete fileset removal not reject)
After commit the fileset, that fileset is moved to permanent installation, we cannot reject, we have to uninstall the fileset only.
Now we will uninstall the committed fileset using:
#installp –ugp Fileset name
#installp –ugp bos.rte.command (For preview)
#installp –ug bos.rte.command (For un installation)
The above command is used to uninstall the committed fileset.
6. Verify the installed fileset (Whether properly installed or not)
After installation we want to verify whether filesets are properly installed are not, using following command
#lppchk –v fileset name
#lppchk –v bos.rte.command
If any problems it will show the error message otherwise no error message, then we will confirm fileset is installed properly.
7. Clear the braked fileset installation:
While installing the filesets, some problem has occurred, i.e. Cd is not reading or space is not available in volume group.
This time half of the fileset only installed in server, so before next installation, we should remove the half installed fileset using
#Installp –C
To clean the brokend fileset installation
8. List the installed fileset
Suppose we want to see what are the filesets available in Server, Using
#lslpp –l
The above command list the all installed fileset,Suppose you want to find particular fileset in server, Using
#lslpp –l | grep Fileset name
The above command is list the specified fileset only, if file set is not available or not installed, it won’t show anything.
9. List the installed fileset content (What are the files available in fileset)
Suppose we want to see bos.rte.command fileset content, using
#lslpp –f fileset name
#lslpp –f bos.rte.command
The above command is display the bos.rte.command file
Basically bos.rte.command fileset has user commands So it will show the /usr/bin/ls,
10. To find the file, which is installed from which fileset.
Using # lslpp –w /usr/bin/ls
The above command shows the bos.rte.command fileset name, because ls command file is extracted from bos.rte.command fileset
#lslpp –w /usr/sbin/savevg
The above shows some other fileset name.
11. To find the command file path:
Using #which ls
The above command is display the given file path i.e. the above command output will be
/usr/bin/ls
Suppose we want to savevg path, using
#which savevg
/usr/sbin/savevg
12. To view the fileset history:
Using #lslpp –h fileset name
#lslpp –h bos.rte.command
The above command output will be full details of fileset.
Fileset version, installed time, date
NOTE: Whenever we installing the fileset or fix, in that current path should have the .toc (table of content) file. If this file is not available we cannot install any fileset or fix from that current path
If file is not available, we can create the .toc file using command
#inutoc .
The above command is used to create the .toc file
AIX - SRC AND DAEMONS
Group of subsystems called daemons, using src command we can perform the following activities with subsystems and daemons.
1. Start daemon
2. List daemon
3. stop daemon
4. refresh (restart) daemon
Group of subsystems called daemons, using src command we can perform the following activities with subsystems and daemons.
1. Start daemon
2. List daemon
3. stop daemon
4. refresh (restart) daemon
AIX - Start daemon
Using srcstart command we can start the daemon.Actually nfs daemon has 5 subsystems (services), when you configured nfs in server, that 5 subsystems are always start state. If one subsystem is not working properly or not started, then the nfs is not working properly.
Nfs daemons:
Server: 1. nfsd, 2. rpc.mountd
Client: 3.biod, 4. rpc.statd, 5. rpc.lockd
If clients are not able to access the network file system from the server, that time you have to start or restart the nfsd and rpc.mountd subsystems.
#startsrc –s nfsd
#startsrc –s rpc.mountd
Flag –s is mentioned for single, because we are starting single nfsd subsystem
If we want start complete nfs daemons using –g flag
#startsrc –g nfs
Nfsd – started
Biod – started
Rpc.mountd – started
Rpc.lockd – started
Rpc.statd – started
The above command is start all the 5 subsystems at the same time, but it is not recommended.
Like this we start single subsystem or group of subsystems.
Using srcstart command we can start the daemon.Actually nfs daemon has 5 subsystems (services), when you configured nfs in server, that 5 subsystems are always start state. If one subsystem is not working properly or not started, then the nfs is not working properly.
Nfs daemons:
Server: 1. nfsd, 2. rpc.mountd
Client: 3.biod, 4. rpc.statd, 5. rpc.lockd
If clients are not able to access the network file system from the server, that time you have to start or restart the nfsd and rpc.mountd subsystems.
#startsrc –s nfsd
#startsrc –s rpc.mountd
Flag –s is mentioned for single, because we are starting single nfsd subsystem
If we want start complete nfs daemons using –g flag
#startsrc –g nfs
Nfsd – started
Biod – started
Rpc.mountd – started
Rpc.lockd – started
Rpc.statd – started
The above command is start all the 5 subsystems at the same time, but it is not recommended.
Like this we start single subsystem or group of subsystems.
AIX - Stop Daemon
Using stopsrc command we can stop the daemon,If we want to stop nfs daemon, then your command will be #stopsrc –g nfs
Nfsd – stopped
Biod – stopped
Rpc.mountd – stopped
Rpc.lockd – stopped
Rpc.statd – stopped
Or we can stop single subsystem using –s flag
#stopsrc –s nfsd
Nfsd – stopped, like this we can stop the daemons
Using stopsrc command we can stop the daemon,If we want to stop nfs daemon, then your command will be #stopsrc –g nfs
Nfsd – stopped
Biod – stopped
Rpc.mountd – stopped
Rpc.lockd – stopped
Rpc.statd – stopped
Or we can stop single subsystem using –s flag
#stopsrc –s nfsd
Nfsd – stopped, like this we can stop the daemons
oslevel
Reports the latest installed maintenance level of the system.
oslevel -r : determines the highest recommended maintenance level reached for the current version of AIX.
oslevel -lr 5100-04: lists which fileset updates are missing if after installing ML 04 on 5100-03 the command oslevel -r still shows 5100-03.
alog
Creates and maintains fixed-size log files.
alog -o -t boot : view the boot log (the log that holds boot information).
alog -L : lists the logs defined in the alog database.
errpt
Generates a report of logged errors in the system error log.
errpt -a : displays a complete detailed report.
errpt -c > /dev/console : formats and displays each of the errors at logtime (concurrent error logging) on /dev/console.
errdemon
Starts the error logging daemon errdemon that reads error records from the /dev/error file and creates error log entries in the default system error log /var/adm/ras/errlog.
/usr/lib/errdemon : starts the error logging daemon.
/usr/lib/errdemon -l : displays the path to the system error log file and error log size.
/usr/lib/errdemon -s 2000000 : changes the maximum size of the error log file to 2 MB.
syslogd
The syslogd daemon logs messages from kernel, daemons and system applications using /etc/syslog.conf.
*.debug errlog (add this line to to syslog.conf to redirect all syslog messages to the system error log).
stopsrc -s syslogd : stops the syslogd daemon.
startsrc -s syslogd : starts the syslogd daemon.
refresh -s syslogd : refreshes the syslogd daemon.
errlogger
Logs an operator message.
errlogger new disk added on scsi1 adapter : logs "new disk added on scsi1 adapter" in the system error log.
errclear
Deletes entries from the system error log. Software and operator errors (older than 30 days) and hardware errors (older than 90 days) are removed using crontab.
errinstall
Installs or replaces messages in the error logging message sets of the error log message catalog.
errupdate
Updates the Error Record Template Repository (default file /var/adm/ras/errtmplt).
diag
Menu driven program to run a wide choice of tasks and service aids (diagnostics, hardware error report, format, microcode and bootlist management, ...).
Diagnostics modes:
Concurrent mode: diag is used during normal operation (only devices not in use can be tested).
Single-user mode: run diag after shutdown -m.
Stand-alone mode: boot from Diagnostics CD (press F5 when acoustic beep is heard)
or boot and press F6 when acoustic beep is heard to load diag from hard disk.
if diag returns "diag is not supported on this model" use:
SMS mode: boot and press F1 when acoustic beep is heard, select "test the computer". Some older models use a SMS diskette.
alt_disk_install
Installs an alternate disk with a mksysb install image or clones the currently running system to an alternate disk.
Note: install bos.alt_disk_install fileset to use alt_disk_install.
alt_disk_install -C hdisk2 : Clones the current rootvg to hdisk2.
alt_disk_install -C -b update_all -l /dev/cd0 hdisk4 : Creates clone of the current rootvg on hdisk4, installs a ML on the clone and changes the bootlist to hdisk4.
alt_disk_install -X old_rootvg : Removes the original rootvg from the ODM, after booting from the new alternate disk (you can still reboot from old_rootvg).
nimadm
Performs Alternate Disk Migration (to a new version or release) of AIX using NIM resources.
nimadm -c aix1 -s spot2 -l lpp2 -d "hdisk1 hdisk2" -Y : migrates totarget NIM client aix1, using NIM SPOT resource spot2, the NIM lpp_source lpp2, and hdisk1 and hdisk2 target disks, and agreeing to all required software license agreements for the software being installed (-Y).
nim -o alt_disk_install -a source=rootvg -a disk='hdisk2' -a phase=12 holland : clones a rootvg on client holland to hdisk1, but only run phase1 and phase2 (leaving the /alt_inst file systems mounted).
Reports the latest installed maintenance level of the system.
oslevel -r : determines the highest recommended maintenance level reached for the current version of AIX.
oslevel -lr 5100-04: lists which fileset updates are missing if after installing ML 04 on 5100-03 the command oslevel -r still shows 5100-03.
alog
Creates and maintains fixed-size log files.
alog -o -t boot : view the boot log (the log that holds boot information).
alog -L : lists the logs defined in the alog database.
errpt
Generates a report of logged errors in the system error log.
errpt -a : displays a complete detailed report.
errpt -c > /dev/console : formats and displays each of the errors at logtime (concurrent error logging) on /dev/console.
errdemon
Starts the error logging daemon errdemon that reads error records from the /dev/error file and creates error log entries in the default system error log /var/adm/ras/errlog.
/usr/lib/errdemon : starts the error logging daemon.
/usr/lib/errdemon -l : displays the path to the system error log file and error log size.
/usr/lib/errdemon -s 2000000 : changes the maximum size of the error log file to 2 MB.
syslogd
The syslogd daemon logs messages from kernel, daemons and system applications using /etc/syslog.conf.
*.debug errlog (add this line to to syslog.conf to redirect all syslog messages to the system error log).
stopsrc -s syslogd : stops the syslogd daemon.
startsrc -s syslogd : starts the syslogd daemon.
refresh -s syslogd : refreshes the syslogd daemon.
errlogger
Logs an operator message.
errlogger new disk added on scsi1 adapter : logs "new disk added on scsi1 adapter" in the system error log.
errclear
Deletes entries from the system error log. Software and operator errors (older than 30 days) and hardware errors (older than 90 days) are removed using crontab.
errinstall
Installs or replaces messages in the error logging message sets of the error log message catalog.
errupdate
Updates the Error Record Template Repository (default file /var/adm/ras/errtmplt).
diag
Menu driven program to run a wide choice of tasks and service aids (diagnostics, hardware error report, format, microcode and bootlist management, ...).
Diagnostics modes:
Concurrent mode: diag is used during normal operation (only devices not in use can be tested).
Single-user mode: run diag after shutdown -m.
Stand-alone mode: boot from Diagnostics CD (press F5 when acoustic beep is heard)
or boot and press F6 when acoustic beep is heard to load diag from hard disk.
if diag returns "diag is not supported on this model" use:
SMS mode: boot and press F1 when acoustic beep is heard, select "test the computer". Some older models use a SMS diskette.
alt_disk_install
Installs an alternate disk with a mksysb install image or clones the currently running system to an alternate disk.
Note: install bos.alt_disk_install fileset to use alt_disk_install.
alt_disk_install -C hdisk2 : Clones the current rootvg to hdisk2.
alt_disk_install -C -b update_all -l /dev/cd0 hdisk4 : Creates clone of the current rootvg on hdisk4, installs a ML on the clone and changes the bootlist to hdisk4.
alt_disk_install -X old_rootvg : Removes the original rootvg from the ODM, after booting from the new alternate disk (you can still reboot from old_rootvg).
nimadm
Performs Alternate Disk Migration (to a new version or release) of AIX using NIM resources.
nimadm -c aix1 -s spot2 -l lpp2 -d "hdisk1 hdisk2" -Y : migrates totarget NIM client aix1, using NIM SPOT resource spot2, the NIM lpp_source lpp2, and hdisk1 and hdisk2 target disks, and agreeing to all required software license agreements for the software being installed (-Y).
nim -o alt_disk_install -a source=rootvg -a disk='hdisk2' -a phase=12 holland : clones a rootvg on client holland to hdisk1, but only run phase1 and phase2 (leaving the /alt_inst file systems mounted).
AIX - User and Group
Management
In user management, we can perform the below operations:
1. Create user
2. List user
3. Change user
4. Remove user
5. Set password for users
In user management, we can perform the below operations:
1. Create user
2. List user
3. Change user
4. Remove user
5. Set password for users
AIX - User Management
- Change User
Using chuser command we can change user properties, i.e. user home directory, shell group, etc. except password
Whenever you create a user that user home directory by default created in /home file system, and default group is staff.
If we want to change the Test user group to system, then your command will be.
#lsuser Test (it will show Test user properties including group information)
#chuser pgrp=system Test (now Test user is assigned to primary group system and secondary group is assigned to staff)
#lsuser Test (It will list modified Test properties, group is system, staff)
Like this we can change all the user properties
Using chuser command we can change user properties, i.e. user home directory, shell group, etc. except password
Whenever you create a user that user home directory by default created in /home file system, and default group is staff.
If we want to change the Test user group to system, then your command will be.
#lsuser Test (it will show Test user properties including group information)
#chuser pgrp=system Test (now Test user is assigned to primary group system and secondary group is assigned to staff)
#lsuser Test (It will list modified Test properties, group is system, staff)
Like this we can change all the user properties
AIX - User Management
- Create User
Using mkuser command we can create a new user, If you want to create new user Test,
#mkuser Test
After this command execution, Test home directory created in /home/Test/
Test user configuration details stored in /etc/passwd
Now you can login the terminal using Test user name without password.
Then you have to set the password for Test user using command passwd
#passwd Test
Enter new password: ******
Confirm password again: ******
After this command execution password assigned to Test user and Test user password configuration entry added in /etc/security/passwd.
NOTE: user configuration data stored in /usr/lib/security/mkuser.sys
Whenever login the server that last login information’s stored in /etc/security/lastlog file.
Using mkuser command we can create a new user, If you want to create new user Test,
#mkuser Test
After this command execution, Test home directory created in /home/Test/
Test user configuration details stored in /etc/passwd
Now you can login the terminal using Test user name without password.
Then you have to set the password for Test user using command passwd
#passwd Test
Enter new password: ******
Confirm password again: ******
After this command execution password assigned to Test user and Test user password configuration entry added in /etc/security/passwd.
NOTE: user configuration data stored in /usr/lib/security/mkuser.sys
Whenever login the server that last login information’s stored in /etc/security/lastlog file.
AIX - User Management
- List User
Using lsuser command we can list the user properties, i.e. user home directory, shell, group, etc. except password
#lsuser all (It will list all the user information’s except password)
#lsuser Test (It will list only Test user information’s except password)
Using lsuser command we can list the user properties, i.e. user home directory, shell, group, etc. except password
#lsuser all (It will list all the user information’s except password)
#lsuser Test (It will list only Test user information’s except password)
AIX - User Management
- Remove User
Using rmuser command we can remove the user, If you want to remove Test user
#rmuser Test
After this command execution, Test user will be deleted.
Using rmuser command we can remove the user, If you want to remove Test user
#rmuser Test
After this command execution, Test user will be deleted.
AIX - User Management
- Set Password
Using passwd command we can set password for user and root
#passwd Test
Enter new password: *****
Confirm password: *****
We are changing password for Test user from root path, it will not ask existing password for Test user, because root is administrator login.
If you are changing password from Test login, it will ask existing password, because user should know the existing password before changing the new password. Otherwise any user can change the Test user password. This not recommended security.
$pwd
/home/Test
$passwd Test
Enter the old password: *****
Enter the new password: *****
Confirm password again: *****
NOTE: If you are forgotten root password that time what you will do.
Answer: boot the server with BOS Cd and go to maintenance mode, access the rootvg, then you can change the password for root.
Like this we can change the password for users.
Using passwd command we can set password for user and root
#passwd Test
Enter new password: *****
Confirm password: *****
We are changing password for Test user from root path, it will not ask existing password for Test user, because root is administrator login.
If you are changing password from Test login, it will ask existing password, because user should know the existing password before changing the new password. Otherwise any user can change the Test user password. This not recommended security.
$pwd
/home/Test
$passwd Test
Enter the old password: *****
Enter the new password: *****
Confirm password again: *****
NOTE: If you are forgotten root password that time what you will do.
Answer: boot the server with BOS Cd and go to maintenance mode, access the rootvg, then you can change the password for root.
Like this we can change the password for users.
AIX -Extend Volume
Group
Extend VG
We can increase VG size by adding Pv into existing VG, example: extendvg command
#lsvg –p datavg
Hdisk4
Hdisk5
#
datavg has 2 PV’s now we want to extend datavg, then your command will be
#extendvg datavg hdisk6
After executed command hdisk6 pv added with datavg
#lsvg –l datavg
Hdisk4
Hdisk5
Hdisk6
Extend VG
We can increase VG size by adding Pv into existing VG, example: extendvg command
#lsvg –p datavg
Hdisk4
Hdisk5
#
datavg has 2 PV’s now we want to extend datavg, then your command will be
#extendvg datavg hdisk6
After executed command hdisk6 pv added with datavg
#lsvg –l datavg
Hdisk4
Hdisk5
Hdisk6
he below are the
activities performed in NETWORK:
1. NIC Configuration
2. Assign IP address to NIC
3. Disable IP address
4. Enable IP address
5. Remove IP address
6. Check the NIC IP status
7. Check the NIC device status
8. Check the network statistics
9. To change HOST name
10. Trace the HOST
11. Assign gateway to network
12. Clear the gateway table
1. NIC Configuration
2. Assign IP address to NIC
3. Disable IP address
4. Enable IP address
5. Remove IP address
6. Check the NIC IP status
7. Check the NIC device status
8. Check the network statistics
9. To change HOST name
10. Trace the HOST
11. Assign gateway to network
12. Clear the gateway table
AIX Version 1,
introduced in 1986 for the IBM 6150 RT workstation, was based on UNIX System V
Releases 1 and 2. In developing AIX, IBM and INTERACTIVE Systems Corporation
(whom IBM contracted) also incorporated source code from 4.2 and 4.3BSD UNIX.
Among other variants,
IBM later produced AIX Version 3 (also known as AIX/6000), based on System V
Release 3, for their IBM POWER-based RS/6000 platform. Since 1990, AIX has
served as the primary operating system for the RS/6000 series (later renamed
IBM eServer pSeries, then IBM System p, and now IBM Power Systems). AIX Version
4, introduced in 1994, added symmetric multiprocessing with the introduction of
the first RS/6000 SMP servers and continued to evolve though the 1990s,
culminating with
AIX 4.3.3 in 1999.
Version 4.1, in a slightly modified form, was also the standard operating system
for the Apple Network Server systems sold by Apple Computer to complement the
Macintosh line.
In the late 1990s,
under Project Monterey, IBM and the Santa Cruz Operation planned to integrate
AIX and UnixWare into a single 32-bit/64-bit multiplatform UNIX with particular
emphasis on running on Intel IA-64 architecture CPUs. A beta test version of
AIX 5L for IA-64 systems was released, but according to documents released in
SCO vs. IBM, less than forty licenses for the finished Monterey Unix were ever sold
before the project was terminated in 2002.
AIX 6 was announced in
May of 2007 and ran an open beta from June 2007 until the general availability
(GA) of AIX 6.1 on November 9th, 2007. Major new features in AIX 6.1 included
full role-based access control, workload partitions (which enable application
mobility), and live partition mobility on the POWER6 hardware.
OS INSTALLATION:
Three kinds of OS installations available in AIX
1. New and Complete Overwrite
2. Migration
3. Preservation
1. New and Complete Overwrite:
This is New installation; in this installation we have three options
A. Start installation with default settings
B. Change/show installation settings and install
C. Start maintenance mode for recovery
A. Start installation with default settings
This is normal installation
B. Change/show installation settings and install
In this installation we can change the installation disk (hdisk0, or hdisk1), Desktop options.
C. Start maintenance mode for recovery
This is used for recover the existing OS problems. (Boot image, Boot list, File systems problems).
2. Migration:
In this migration Installation, Operating system Updated from lower level to higher level i.e. Aix 5.1 To Aix 5.3 or Aix 5.2 To Aix 5.3 ,
NOTE:In this installation System data will not be affected except the /tmp file system. i.e. /tmp file system will be deleted and newly created.
3. Preservation:
This installation is overwriting the existing OS and user data directory /home only persevered, rest of the directories /, /var, /tmp, /etc, /dev, /opt will be deleted and newly created.
NOTE:In this installation we can preserve additional directories also, suppose if you want preserve /opt, this case u should put /opt file system entry in /etc/preserve.list file.
Three kinds of OS installations available in AIX
1. New and Complete Overwrite
2. Migration
3. Preservation
1. New and Complete Overwrite:
This is New installation; in this installation we have three options
A. Start installation with default settings
B. Change/show installation settings and install
C. Start maintenance mode for recovery
A. Start installation with default settings
This is normal installation
B. Change/show installation settings and install
In this installation we can change the installation disk (hdisk0, or hdisk1), Desktop options.
C. Start maintenance mode for recovery
This is used for recover the existing OS problems. (Boot image, Boot list, File systems problems).
2. Migration:
In this migration Installation, Operating system Updated from lower level to higher level i.e. Aix 5.1 To Aix 5.3 or Aix 5.2 To Aix 5.3 ,
NOTE:In this installation System data will not be affected except the /tmp file system. i.e. /tmp file system will be deleted and newly created.
3. Preservation:
This installation is overwriting the existing OS and user data directory /home only persevered, rest of the directories /, /var, /tmp, /etc, /dev, /opt will be deleted and newly created.
NOTE:In this installation we can preserve additional directories also, suppose if you want preserve /opt, this case u should put /opt file system entry in /etc/preserve.list file.
AIX LVM - Remove
Logical Volume copy
Remove LV copy
Using rmlvcopy we can remove the lvcopy from the PV’s
If we want to remove testlv copy from hdisk0
#rmlvcopy testlv 3 hdisk0
After executing the above command third copy of the testlv removed from PV hdisk0, like this we can remove
Remove LV copy
Using rmlvcopy we can remove the lvcopy from the PV’s
If we want to remove testlv copy from hdisk0
#rmlvcopy testlv 3 hdisk0
After executing the above command third copy of the testlv removed from PV hdisk0, like this we can remove
IBM 6150 RT
The original AIX (sometimes called AIX/RT) was developed for the IBM 6150 RT workstation by IBM in conjunction with INTERACTIVE Systems Corporation, who had previously ported UNIX System III to the IBM PC for IBM as PC/IX. Installation media consisted of eight 1.2M floppy disks. The RT was based on the ROMP chip, the first commercial RISC chip, based on a design, the IBM 801, pioneered at IBM Research.
One of the novel aspects of the RT design was the use of a microkernel, called Virtual Resource Manager (VRM). The keyboard, mouse, display, disk drives and network were all controlled by a microkernel. One could "hotkey" from one operating system to the next using the Alt-Tab key combination. Each OS in turn would get possession of the keyboard, mouse and display. Besides AIX v2, the PICK OS also utilized this microkernel.
Much of the AIX v2 kernel was written in the PL/I programming language, which proved troublesome during the migration to AIX v3.[citation needed] AIX v2 included full TCP/IP networking, as well as SNA and two networking file systems: NFS, licensed from Sun Microsystems, and Distributed Services (DS). DS had the distinction of being built on top of SNA, and thereby being fully compatible with DS on the IBM midrange AS/400 and mainframe systems. For the graphical user interfaces, AIX v2 came with the X10R3 and later the X10R4 and X11 versions of the X Window System from MIT, together with the Athena widget set. Compilers for Fortran and C were available. One of the more popular desktop applications was the PageMaker desktop publishing software.
IBM PS/2 series
AIX PS/2 (also known as AIX/386) was developed by Locus Computing Corporation under contract to IBM. AIX PS/2, first released in 1989, ran on IBM PS/2 personal computers with Intel 386 and faster processors.
IBM mainframes
In 1988, IBM announced AIX/370, also developed by Locus Computing. AIX/370 was IBM's first attempt to offer Unix-like functionality for their mainframe line, specifically the System/370. AIX/370 was released in 1990 with functional equivalence to System V Release 2 and 4.3BSD as well as IBM enhancements. With the introduction of the ESA/390 architecture, AIX/370 was replaced by AIX/ESA in 1991, which was based on OSF/1, and also ran on the System/390 platform. This development effort was made partly to allow IBM to compete with Amdahl UTS. Unlike AIX/370, AIX/ESA ran both natively as the host operating system, and as a guest under VM. AIX/ESA, while technically advanced, had little commercial success, partially because UNIX functionality was added as an option to the existing mainframe operating system, MVS, which became MVS/ESA Open Edition in 1999.
POWER/PowerPC-based systems
The release of AIX version 3 (sometimes called AIX/6000) coincided with the announcement of the first IBM RS/6000 models. The RS/6000 was unique in that it not only outperformed all other machines in integer compute performance, but also beat the competition by a factor of 10 in floating-point performance.
Releases of AIX version 3 also took advantage of the developments in the POWER architecture.
AIX v3 innovated in several ways on the software side. It was the first operating system to introduce the idea of a journaling file system, JFS, which allowed for fast boot times by avoiding the need to fsck the disks on every reboot. Another innovation was the introduction of shared libraries, which avoided the need for an application to statically link to the libraries it used. The resulting smaller binaries used less of the hardware RAM, to run, and used less of the disk space to install. Besides improving performance, it was a boon to developers: executable binaries could be in the 10s of kilobytes instead of a megabyte for an executable statically linked to the C library. AIX v3 also ditched the microkernel of AIX v2, a contentious move that resulted in v3 being somewhat more "pure" (and containing no PL/1 code) than v2.
Apple Network Servers
The Apple Network Server systems were PowerPC-based systems designed by Apple Computer to have numerous high-end features that standard Apple hardware did not have, including swappable hard drives, redundant power supplies, and external monitoring capability. These systems were more or less based on the Power Macintosh hardware available at the time but were designed to use AIX (versions 4.1.4 or 4.1.5) as their native operating system in a specialized version specific to the ANS.
AIX was only compatible with the Network Servers and was not ported to standard Power Macintosh hardware. Not to be confused is A/UX, Apple's earlier version of Unix for 68k-based Macintoshes.
The original AIX (sometimes called AIX/RT) was developed for the IBM 6150 RT workstation by IBM in conjunction with INTERACTIVE Systems Corporation, who had previously ported UNIX System III to the IBM PC for IBM as PC/IX. Installation media consisted of eight 1.2M floppy disks. The RT was based on the ROMP chip, the first commercial RISC chip, based on a design, the IBM 801, pioneered at IBM Research.
One of the novel aspects of the RT design was the use of a microkernel, called Virtual Resource Manager (VRM). The keyboard, mouse, display, disk drives and network were all controlled by a microkernel. One could "hotkey" from one operating system to the next using the Alt-Tab key combination. Each OS in turn would get possession of the keyboard, mouse and display. Besides AIX v2, the PICK OS also utilized this microkernel.
Much of the AIX v2 kernel was written in the PL/I programming language, which proved troublesome during the migration to AIX v3.[citation needed] AIX v2 included full TCP/IP networking, as well as SNA and two networking file systems: NFS, licensed from Sun Microsystems, and Distributed Services (DS). DS had the distinction of being built on top of SNA, and thereby being fully compatible with DS on the IBM midrange AS/400 and mainframe systems. For the graphical user interfaces, AIX v2 came with the X10R3 and later the X10R4 and X11 versions of the X Window System from MIT, together with the Athena widget set. Compilers for Fortran and C were available. One of the more popular desktop applications was the PageMaker desktop publishing software.
IBM PS/2 series
AIX PS/2 (also known as AIX/386) was developed by Locus Computing Corporation under contract to IBM. AIX PS/2, first released in 1989, ran on IBM PS/2 personal computers with Intel 386 and faster processors.
IBM mainframes
In 1988, IBM announced AIX/370, also developed by Locus Computing. AIX/370 was IBM's first attempt to offer Unix-like functionality for their mainframe line, specifically the System/370. AIX/370 was released in 1990 with functional equivalence to System V Release 2 and 4.3BSD as well as IBM enhancements. With the introduction of the ESA/390 architecture, AIX/370 was replaced by AIX/ESA in 1991, which was based on OSF/1, and also ran on the System/390 platform. This development effort was made partly to allow IBM to compete with Amdahl UTS. Unlike AIX/370, AIX/ESA ran both natively as the host operating system, and as a guest under VM. AIX/ESA, while technically advanced, had little commercial success, partially because UNIX functionality was added as an option to the existing mainframe operating system, MVS, which became MVS/ESA Open Edition in 1999.
POWER/PowerPC-based systems
The release of AIX version 3 (sometimes called AIX/6000) coincided with the announcement of the first IBM RS/6000 models. The RS/6000 was unique in that it not only outperformed all other machines in integer compute performance, but also beat the competition by a factor of 10 in floating-point performance.
Releases of AIX version 3 also took advantage of the developments in the POWER architecture.
AIX v3 innovated in several ways on the software side. It was the first operating system to introduce the idea of a journaling file system, JFS, which allowed for fast boot times by avoiding the need to fsck the disks on every reboot. Another innovation was the introduction of shared libraries, which avoided the need for an application to statically link to the libraries it used. The resulting smaller binaries used less of the hardware RAM, to run, and used less of the disk space to install. Besides improving performance, it was a boon to developers: executable binaries could be in the 10s of kilobytes instead of a megabyte for an executable statically linked to the C library. AIX v3 also ditched the microkernel of AIX v2, a contentious move that resulted in v3 being somewhat more "pure" (and containing no PL/1 code) than v2.
Apple Network Servers
The Apple Network Server systems were PowerPC-based systems designed by Apple Computer to have numerous high-end features that standard Apple hardware did not have, including swappable hard drives, redundant power supplies, and external monitoring capability. These systems were more or less based on the Power Macintosh hardware available at the time but were designed to use AIX (versions 4.1.4 or 4.1.5) as their native operating system in a specialized version specific to the ANS.
AIX was only compatible with the Network Servers and was not ported to standard Power Macintosh hardware. Not to be confused is A/UX, Apple's earlier version of Unix for 68k-based Macintoshes.
IA-64 systems
As part of Project Monterey, a beta test version of AIX 5L was released for the IA-64 (Itanium) architecture in 2001, but this was abandoned before it became an official product due to the lack of interest in the finished Project Monterey system, as well as the overall lack of uptake of the IA-64 architecture by a skeptical marketplace, which largely gravitated towards the Project Trillian port of Linux as the primary platform OS.
As part of Project Monterey, a beta test version of AIX 5L was released for the IA-64 (Itanium) architecture in 2001, but this was abandoned before it became an official product due to the lack of interest in the finished Project Monterey system, as well as the overall lack of uptake of the IA-64 architecture by a skeptical marketplace, which largely gravitated towards the Project Trillian port of Linux as the primary platform OS.
Unmount FS
Using umount or unmount command we can umount the file system i.e. file system is moved to off line.
#umount /newfs
After this you run the lsfs –a command it wont display /newfs file system details.
#lsfs –a
Using umount or unmount command we can umount the file system i.e. file system is moved to off line.
#umount /newfs
After this you run the lsfs –a command it wont display /newfs file system details.
#lsfs –a
AIX- Network - Assign
Gateway to Network
Using route command we can assign gateway to network
#route add 0 192.168.0.1 (To make 192.168.0.1 as default gateway for entire network)
#route add 192.168.0.1 192.168.1.1 (To make 1.1 as gateway for 0.1 network)
Like this we can assign the gateway for network
Using route command we can assign gateway to network
#route add 0 192.168.0.1 (To make 192.168.0.1 as default gateway for entire network)
#route add 192.168.0.1 192.168.1.1 (To make 1.1 as gateway for 0.1 network)
Like this we can assign the gateway for network
The AIX Os is
installed in IBM P Series or I Series Servers
P Series Servers (32bit and 64 bit Hardware Support)
1. RS6000 P1, P2, P3 ( Very old models)
2. P4 ( Regatta 680, 615, 630, 641, 690(LPAR / DLPAR)
3. P4 +( It will support many no of processors and memory compare than P4)
4. P5 (Squadron P550, P570, P575, P590, P595(Latest)
5. P5 + ( It will support many no of processors and memory compare than P5)
P Series Servers (32bit and 64 bit Hardware Support)
1. RS6000 P1, P2, P3 ( Very old models)
2. P4 ( Regatta 680, 615, 630, 641, 690(LPAR / DLPAR)
3. P4 +( It will support many no of processors and memory compare than P4)
4. P5 (Squadron P550, P570, P575, P590, P595(Latest)
5. P5 + ( It will support many no of processors and memory compare than P5)
AIX - LVM - Change
Logical Volume
In this change LV option we can change LV name and permissions for the LV using chlv command.
#chlv –n newlvname oldlvname
#lslv testlv
Output is some details about testlv
#chlv –n newlv testlv
After executing the above command the testlv renamed to newlv
#lslv testlv
Some error message will come i.e. testlv is not found
#lslv newlv
It will show newlv details, because testlv is renamed as newlv.
Changing the LV permissions: If we want to change LV permissions to read only then the command will be
#chlv –p r testlv
After executing the above command testlv permissions changed as read only , so we can only read the LV, we can not copy new files into this LV.
In this change LV option we can change LV name and permissions for the LV using chlv command.
#chlv –n newlvname oldlvname
#lslv testlv
Output is some details about testlv
#chlv –n newlv testlv
After executing the above command the testlv renamed to newlv
#lslv testlv
Some error message will come i.e. testlv is not found
#lslv newlv
It will show newlv details, because testlv is renamed as newlv.
Changing the LV permissions: If we want to change LV permissions to read only then the command will be
#chlv –p r testlv
After executing the above command testlv permissions changed as read only , so we can only read the LV, we can not copy new files into this LV.
AIX - Create LV copy
We can create LV content copy to another PV, after this same LV content is available in Lvcopy configured PV.
#lspv
Hdisk0
Hdisk1
Hdisk2
#lspv –l hdisk1
Assume testlv available in hdisk1, now we will make testlv copy to hdisk2, using After this testlv data available in both PV, hdisk1 and hdisk2, If hdisk1 is fail, we can recover testlv data from hdisk2
#mklvcopy testlv 2 hdisk2
Testlv –lv name
2- No of copies, (we can make 3 copies also; this case you put 3 and mention hdisk0 then third copy will be available in hdisk0)
##mklvcopy testlv 3 hdisk0 ( It will make third lvcopy on hdisk0
After executing above command testlv is copied to hdisk2
If you want to confirm, execute the following command
#lslv –m testlv (it will show lvcopy details for testlv)
Hdiks1 hdisk2 hdisk0
Testlv (copy1) testlv (copy2) testlv (copy3)
We can create LV content copy to another PV, after this same LV content is available in Lvcopy configured PV.
#lspv
Hdisk0
Hdisk1
Hdisk2
#lspv –l hdisk1
Assume testlv available in hdisk1, now we will make testlv copy to hdisk2, using After this testlv data available in both PV, hdisk1 and hdisk2, If hdisk1 is fail, we can recover testlv data from hdisk2
#mklvcopy testlv 2 hdisk2
Testlv –lv name
2- No of copies, (we can make 3 copies also; this case you put 3 and mention hdisk0 then third copy will be available in hdisk0)
##mklvcopy testlv 3 hdisk0 ( It will make third lvcopy on hdisk0
After executing above command testlv is copied to hdisk2
If you want to confirm, execute the following command
#lslv –m testlv (it will show lvcopy details for testlv)
Hdiks1 hdisk2 hdisk0
Testlv (copy1) testlv (copy2) testlv (copy3)
AIX - Rewind, Eject,
Erase the tape
Using tctl command we can rewind, eject and erase the tape drive.
#tctl –f /dev/rmt0 rewind (To rewind the tape)
#tctl –f /dev/rmt0 eject (To eject the tape)
#tctl –f /dev/rmt0 erase (To erase the tape content)
Using tctl command we can rewind, eject and erase the tape drive.
#tctl –f /dev/rmt0 rewind (To rewind the tape)
#tctl –f /dev/rmt0 eject (To eject the tape)
#tctl –f /dev/rmt0 erase (To erase the tape content)
AIX - LVM - Extend
Logical Volume
If we want to increase LV size using extendlv command
#lslv newlv
The above command shows LV size, no of LP’s and some other information about LV, suppose LV has 10 LP’s and usage is up to 95% full, that time we can increase the LV size online by adding no of LP’s in newlv i.e.
#extendlv newlv 5
After executing the above command 5 PP’s added with newlv, then some additional space will available in newlv. Suppose you want to see this changes again use the lslv command
#lslv newlv (it will show no of LV’s is 15 and some additional space)
If we want to increase LV size using extendlv command
#lslv newlv
The above command shows LV size, no of LP’s and some other information about LV, suppose LV has 10 LP’s and usage is up to 95% full, that time we can increase the LV size online by adding no of LP’s in newlv i.e.
#extendlv newlv 5
After executing the above command 5 PP’s added with newlv, then some additional space will available in newlv. Suppose you want to see this changes again use the lslv command
#lslv newlv (it will show no of LV’s is 15 and some additional space)
AIX -Extend Volume
Group
Extend VG
We can increase VG size by adding Pv into existing VG, example: extendvg command
#lsvg –p datavg
Hdisk4
Hdisk5
#
datavg has 2 PV’s now we want to extend datavg, then your command will be
#extendvg datavg hdisk6
After executed command hdisk6 pv added with datavg
#lsvg –l datavg
Hdisk4
Hdisk5
Hdisk6
Extend VG
We can increase VG size by adding Pv into existing VG, example: extendvg command
#lsvg –p datavg
Hdisk4
Hdisk5
#
datavg has 2 PV’s now we want to extend datavg, then your command will be
#extendvg datavg hdisk6
After executed command hdisk6 pv added with datavg
#lsvg –l datavg
Hdisk4
Hdisk5
Hdisk6
AIX - List Volume
Group
List VG
We can list VG information using following commands
#lsvg – It will display the available vg’s
#lsvg datavg – It will display full details about datavg only
#lsvg –o It will display the online vg’s
#lsvg – l datavg – It will display the all logical volume details across the datavg
#lsvg –p datavg – It will display the information about all PV’s in datavg
Add, change, and delete:
Volume groups
Logical volumes
Physical volumes
Describe mirroring
Describe striping
Logical Volume Manager
# smit lvm
Logical Volume Manager
Move cursor to desired item and press Enter.
Volume Groups
Logical Volumes
Physical Volumes
Paging Space
F1=Help F2=Refresh F3=Cancel F8=Image
F9=Shell F10=Exit Enter=Do
Volume Groups
Physical Volume (PV)
-Hard disk
Volume Group (VG)
-Collection of related disks (PVs)
SMIT Volume Groups Menu
# smit vg
Volume Groups
Move cursor to desired item and press Enter.
-List All Volume Groups
-Add a Volume Group
-Set Characteristics of a Volume Group
-List Contents of a Volume Group
-Remove a Volume Group
-Activate a Volume Group
-Deactivate a Volume Group
-Import a Volume Group
-Export a Volume Group
-Mirror a Volume Group
-Unmirror a Volume Group
-Synchronize LVM Mirrors
-Back Up a Volume Group
-Remake a Volume Group
-Preview Information about a Backup
-Verify the Readability of a Backup (Tape only)
-View the Backup Log
-List Files in a Volume Group Backup
-Restore Files in a Volume Group Backup
F1=Help F2=Refresh F3=Cancel F8=Image
F9=Shell F10=Exit Enter=Do
List All Volume Groups
# lsvg
rootvg
payrollvg
# lsvg -o
rootvg
List Volume Group Contents
# lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: 000bc6fd00004c00000000e10fdd7f52
VG STATE: active PP SIZE: 16 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1084 (17344 megabytes)
MAX LVs: 256 FREE PPs: 1032 (16512 megabytes)
LVs: 11 USED PPs: 52 (832 megabytes)
OPEN LVs: 10 QUORUM: 2
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
List Volume Group Information (Physical Volumes)
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 159 52 24..00..00..00..28
hdisk1 active 159 78 32..02..00..12..32
List Volume Group Information (Logical Volumes)
# lsvg -l rootvg
rootvg:
LVNAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd6 paging 8 8 1 open/syncd N/A
hd5 boot 1 1 1 closed/syncd N/A
hd8 jfslog 1 1 1 open/syncd N/A
hd9var jfs 1 1 1 open/syncd /var
hd4 jfs 1 1 1 open/syncd /
hd2 jfs 77 77 1 open/syncd /usr
hd3 jfs 3 3 1 open/syncd /tmp
hd1 jfs 11 11 1 open/syncd /home
hd10opt jfs 2 2 1 open/syncd /opt
lv00 jfs2 1 2 2 open/syncd /home/john
lv01 jfs2 4 4 2 open/syncd /home/fred
List VG
We can list VG information using following commands
#lsvg – It will display the available vg’s
#lsvg datavg – It will display full details about datavg only
#lsvg –o It will display the online vg’s
#lsvg – l datavg – It will display the all logical volume details across the datavg
#lsvg –p datavg – It will display the information about all PV’s in datavg
Add, change, and delete:
Volume groups
Logical volumes
Physical volumes
Describe mirroring
Describe striping
Logical Volume Manager
# smit lvm
Logical Volume Manager
Move cursor to desired item and press Enter.
Volume Groups
Logical Volumes
Physical Volumes
Paging Space
F1=Help F2=Refresh F3=Cancel F8=Image
F9=Shell F10=Exit Enter=Do
Volume Groups
Physical Volume (PV)
-Hard disk
Volume Group (VG)
-Collection of related disks (PVs)
SMIT Volume Groups Menu
# smit vg
Volume Groups
Move cursor to desired item and press Enter.
-List All Volume Groups
-Add a Volume Group
-Set Characteristics of a Volume Group
-List Contents of a Volume Group
-Remove a Volume Group
-Activate a Volume Group
-Deactivate a Volume Group
-Import a Volume Group
-Export a Volume Group
-Mirror a Volume Group
-Unmirror a Volume Group
-Synchronize LVM Mirrors
-Back Up a Volume Group
-Remake a Volume Group
-Preview Information about a Backup
-Verify the Readability of a Backup (Tape only)
-View the Backup Log
-List Files in a Volume Group Backup
-Restore Files in a Volume Group Backup
F1=Help F2=Refresh F3=Cancel F8=Image
F9=Shell F10=Exit Enter=Do
List All Volume Groups
# lsvg
rootvg
payrollvg
# lsvg -o
rootvg
List Volume Group Contents
# lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: 000bc6fd00004c00000000e10fdd7f52
VG STATE: active PP SIZE: 16 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1084 (17344 megabytes)
MAX LVs: 256 FREE PPs: 1032 (16512 megabytes)
LVs: 11 USED PPs: 52 (832 megabytes)
OPEN LVs: 10 QUORUM: 2
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
List Volume Group Information (Physical Volumes)
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 159 52 24..00..00..00..28
hdisk1 active 159 78 32..02..00..12..32
List Volume Group Information (Logical Volumes)
# lsvg -l rootvg
rootvg:
LVNAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd6 paging 8 8 1 open/syncd N/A
hd5 boot 1 1 1 closed/syncd N/A
hd8 jfslog 1 1 1 open/syncd N/A
hd9var jfs 1 1 1 open/syncd /var
hd4 jfs 1 1 1 open/syncd /
hd2 jfs 77 77 1 open/syncd /usr
hd3 jfs 3 3 1 open/syncd /tmp
hd1 jfs 11 11 1 open/syncd /home
hd10opt jfs 2 2 1 open/syncd /opt
lv00 jfs2 1 2 2 open/syncd /home/john
lv01 jfs2 4 4 2 open/syncd /home/fred
AIX - LVM - Change
Physical Volumes
If we have three PV’s, like hdisk0, hdisk1, hdisk2, now you want to deactivate the hdisk2,
#chpv -vr hdisk2 (To deactivate the hdisk2)
#chpv –va hdisk2 (To activate the hdisk2)
#chpv –an hdisk2 (hdisk2 is not allocatable)
#chpv –ay hdisk2 (hdisk2 is allocatable)
#chpv –hn hdisk2 (hotspare no)
#chpv –hy hdisk2 (Hotspare yes)
#chpv –c hdisk2 (To clear the boot image)
If we have three PV’s, like hdisk0, hdisk1, hdisk2, now you want to deactivate the hdisk2,
#chpv -vr hdisk2 (To deactivate the hdisk2)
#chpv –va hdisk2 (To activate the hdisk2)
#chpv –an hdisk2 (hdisk2 is not allocatable)
#chpv –ay hdisk2 (hdisk2 is allocatable)
#chpv –hn hdisk2 (hotspare no)
#chpv –hy hdisk2 (Hotspare yes)
#chpv –c hdisk2 (To clear the boot image)
List LV
Suppose we want see what are the Lv’s available in datavg, then your command will be
#lsvg –l datavg
It will login list LV details
newlv
Now we want see newlv properties, then your command will be
#lslv newlv
The above command is used to display the newlv properties, i.e. available pp’s mount pint, label name, stale partitions. Etc.
#lslv –m newlv – To display the lvcopy information’s
Suppose we want see what are the Lv’s available in datavg, then your command will be
#lsvg –l datavg
It will login list LV details
newlv
Now we want see newlv properties, then your command will be
#lslv newlv
The above command is used to display the newlv properties, i.e. available pp’s mount pint, label name, stale partitions. Etc.
#lslv –m newlv – To display the lvcopy information’s
Reduce VG
We can remove the VG using reducevg command, if we want remove testvg and testvg has one pv hdisk9
#lsvg –p testvg
Hdisk9
#
Now we will remove the pv from testvg
#reducevg –f testvg hdisk9
f- option is used to force reduce, you have data in pv hdisk9, that time I will not any questions, directly it will remove the pv from testvg. Suppose 2 PV’s available in testvg then one
We can remove the VG using reducevg command, if we want remove testvg and testvg has one pv hdisk9
#lsvg –p testvg
Hdisk9
#
Now we will remove the pv from testvg
#reducevg –f testvg hdisk9
f- option is used to force reduce, you have data in pv hdisk9, that time I will not any questions, directly it will remove the pv from testvg. Suppose 2 PV’s available in testvg then one
AIX LVM - Remove
Logical Volume copy
Remove LV copy
Using rmlvcopy we can remove the lvcopy from the PV’s If we want to remove testlv copy from hdisk0
#rmlvcopy testlv 3 hdisk0
After executing the above command third copy of the testlv removed from PV hdisk0, like this we can remove
Remove LV copy
Using rmlvcopy we can remove the lvcopy from the PV’s If we want to remove testlv copy from hdisk0
#rmlvcopy testlv 3 hdisk0
After executing the above command third copy of the testlv removed from PV hdisk0, like this we can remove
System initialization
and boot management
The numeric 1 key (F1 on graphical display), when pressed during POST (double beep), starts the SMS interface.
The numeric 5 key (F5 on graphical display), when pressed during POST, initiates a system boot in service mode using the default service mode boot list. Sequence: 1. diskette (if installed), 2. CD-ROM (if installed), 3. hard disk, 4. tape drive (if installed), 5. network (a. Token ring, b. Ethernet).
The numeric 6 key (F6 on graphical display) works like the numeric 5 key, but uses the customized service mode bootlist. This is the preferred method of loading AIX diagnostics from the boot hard disk.
ipl_varyon * Used to vary on the root volume group during system boot processing.
ipl_varyon -i : Inquiry mode - skips ipl device processing. Checks which disks are already bootable.
bosboot
Creates boot image. It does not update the bootlist in the NVRAM.
bosboot -a -d /dev/hdisk0 : Re-create boot image on hdisk0.
bosboot -a -d /dev/ipldevice -D : creates a boot image with the KDB debugger enabled.
mklv
Creates a logical volume.
mklv -y hd5 -t boot rootvg 1 : re-create boot LV (BLV) hd5.
lslv
Displays information about a logical volume.
lslv -l hd5 : determines the boot disk.
mkboot
Creates the boot image, the boot record, and the service record.
mkboot -c -d /dev/hdisk0 : clears the boot record of PV hdisk0.
chpv
Changes the characteristics of a physical volume in a volume group.
chpv -c hdisk1 : clears the boot record of PV hdisk1.
bootinfo Determines and displays various boot information, including boot device type and boot device name (NOT supported in AIX 4.2 or later).
bootinfo -b : returns the last boot device.
bootinfo -B hdisk0 : returns 1 if disk is bootable, 0 if not.
bootlist
Displays or alters the list or ordering of boot devices available to the system.
Normal boot list: possible boot devices for normal mode.
Service boot list: possible boot devices for service mode.
Previous boot device: last device from which the system booted.
Support of these boot lists is model dependent.
bootlist -m normal -o : displays the normal boot list.
bootlist -m service -o : displays the service boot list (if available).
bootlist -m normal cd0 hdisk0 hdisk1 : makes changes to the normal boot list.
bootlist -m prevboot : invalidates the last device from which the system booted.
halt or fasthalt
Writes data to disk (sync) and then stops the system. The system does not restart. Do not use this command if other users are logged into the system.
reboot or fastboot
Restarts the system. Can be used if no other users are logged into the system.
shutdown
Halts the operating system. Checks the existence of the executable /etc/rc.shutdown file (added by the administrator) that specifies all the applications and other user processes to close down.
By default the shutdown command powers down the system (if supported and issued).
shutdown -Fr : fast system shutdown and restart.
shutdown -m +1 : brings the system down to maintenance (single user) mode after waiting one minute.
shutdown -l : logs the output during the shutdown to /etc/shutdown.log.
last
Displays information about previous logins using the /var/adm/wtmp file.
last reboot : displays the time between reboots.
last shutdown : lists last shutdowns of the system.
uptime
Shows how long the system has been up.
uptime : displays the current time, the length of time the system has been up, the number of users online, and the load average.
sync
Updates the i-node table and writes buffered files to the hard disk.
sync;sync;sync;reboot : writes everything from the buffer to the hard disk and reboots the system.
lsfont
Lists the fonts available for use by the display.
chfont
Changes the default font selected at boot time.
mkfont
Adds the font code associated with a display to the system.
mkfontdir
Creates a fonts.dir file from a directory of font files.
chlang
Sets LANG environment variable in the /etc/environment file for next login.
chtz
Changes the system time zone information in the /etc/environment file.
chhwkbd
Changes the low-function terminal (LFT) keyboard attributes stored in the Object Data Manager (ODM) database.
lskbd
Lists the keyboard maps currently available to the low-function terminal (LFT) subsystem.
chkbd
Changes the default keyboard map used by the low-function terminal (LFT) at system startup.
chkey
Changes your encryption key.
lslicense
Displays the number of fixed licenses and the status of floating licensing. There are two types of user licensing, fixed and floating. Fixed licensing is always enabled. Floating licensing can be enabled or disabled.
lslicense -A : displays the number of available fixed licences on the system.
chlicense
Changes the number of fixed licenses and the status of the floating licensing (updates login.cfg).
chlicense -I -u 50I -u 50 : changes the fixed license number immediately to 50 (without rebooting).
chlicense -f on : enables the floating licensing.
lsitabLists records in the /etc/inittab file.
chitab
Changes records in the /etc/inittab file.
mkitab
Adds records to the /etc/inittab file.
rmitab
Removes records from the /etc/inittab file.
telinit or init
Initializes and controls processes.
0-9 Tells the init process to put the system in one of the run levels 0-9. S,s,M,m Tells the init process to enter the maintenance mode. a,b,c Tells the init process to examine only those records in the /etc/inittab file with a, b, or c in the run-level field. Q,q Tells the init process to re-examine the entire /etc/inittab file. N Sends a signal that stops processes from being respawned.
telinit q : requests the init command to re-examine the /etc/inittab file.
who
Identifies the users currently logged in.
who -r : displays the runlevel.
who /var/adm/wtmp : displays a history of logins, logouts, system startups, and system shutdowns.
restbase
Restores customized information from the boot image. Attention: The command is executed only during system boot phase 1. Do not execute it in a run-time environment.
savebaseSaves base customized device data in the ODM onto the boot device.
savebase -d /dev/hdisk0 : save the ODM to the boot logical volume.
The numeric 1 key (F1 on graphical display), when pressed during POST (double beep), starts the SMS interface.
The numeric 5 key (F5 on graphical display), when pressed during POST, initiates a system boot in service mode using the default service mode boot list. Sequence: 1. diskette (if installed), 2. CD-ROM (if installed), 3. hard disk, 4. tape drive (if installed), 5. network (a. Token ring, b. Ethernet).
The numeric 6 key (F6 on graphical display) works like the numeric 5 key, but uses the customized service mode bootlist. This is the preferred method of loading AIX diagnostics from the boot hard disk.
ipl_varyon * Used to vary on the root volume group during system boot processing.
ipl_varyon -i : Inquiry mode - skips ipl device processing. Checks which disks are already bootable.
bosboot
Creates boot image. It does not update the bootlist in the NVRAM.
bosboot -a -d /dev/hdisk0 : Re-create boot image on hdisk0.
bosboot -a -d /dev/ipldevice -D : creates a boot image with the KDB debugger enabled.
mklv
Creates a logical volume.
mklv -y hd5 -t boot rootvg 1 : re-create boot LV (BLV) hd5.
lslv
Displays information about a logical volume.
lslv -l hd5 : determines the boot disk.
mkboot
Creates the boot image, the boot record, and the service record.
mkboot -c -d /dev/hdisk0 : clears the boot record of PV hdisk0.
chpv
Changes the characteristics of a physical volume in a volume group.
chpv -c hdisk1 : clears the boot record of PV hdisk1.
bootinfo Determines and displays various boot information, including boot device type and boot device name (NOT supported in AIX 4.2 or later).
bootinfo -b : returns the last boot device.
bootinfo -B hdisk0 : returns 1 if disk is bootable, 0 if not.
bootlist
Displays or alters the list or ordering of boot devices available to the system.
Normal boot list: possible boot devices for normal mode.
Service boot list: possible boot devices for service mode.
Previous boot device: last device from which the system booted.
Support of these boot lists is model dependent.
bootlist -m normal -o : displays the normal boot list.
bootlist -m service -o : displays the service boot list (if available).
bootlist -m normal cd0 hdisk0 hdisk1 : makes changes to the normal boot list.
bootlist -m prevboot : invalidates the last device from which the system booted.
halt or fasthalt
Writes data to disk (sync) and then stops the system. The system does not restart. Do not use this command if other users are logged into the system.
reboot or fastboot
Restarts the system. Can be used if no other users are logged into the system.
shutdown
Halts the operating system. Checks the existence of the executable /etc/rc.shutdown file (added by the administrator) that specifies all the applications and other user processes to close down.
By default the shutdown command powers down the system (if supported and issued).
shutdown -Fr : fast system shutdown and restart.
shutdown -m +1 : brings the system down to maintenance (single user) mode after waiting one minute.
shutdown -l : logs the output during the shutdown to /etc/shutdown.log.
last
Displays information about previous logins using the /var/adm/wtmp file.
last reboot : displays the time between reboots.
last shutdown : lists last shutdowns of the system.
uptime
Shows how long the system has been up.
uptime : displays the current time, the length of time the system has been up, the number of users online, and the load average.
sync
Updates the i-node table and writes buffered files to the hard disk.
sync;sync;sync;reboot : writes everything from the buffer to the hard disk and reboots the system.
lsfont
Lists the fonts available for use by the display.
chfont
Changes the default font selected at boot time.
mkfont
Adds the font code associated with a display to the system.
mkfontdir
Creates a fonts.dir file from a directory of font files.
chlang
Sets LANG environment variable in the /etc/environment file for next login.
chtz
Changes the system time zone information in the /etc/environment file.
chhwkbd
Changes the low-function terminal (LFT) keyboard attributes stored in the Object Data Manager (ODM) database.
lskbd
Lists the keyboard maps currently available to the low-function terminal (LFT) subsystem.
chkbd
Changes the default keyboard map used by the low-function terminal (LFT) at system startup.
chkey
Changes your encryption key.
lslicense
Displays the number of fixed licenses and the status of floating licensing. There are two types of user licensing, fixed and floating. Fixed licensing is always enabled. Floating licensing can be enabled or disabled.
lslicense -A : displays the number of available fixed licences on the system.
chlicense
Changes the number of fixed licenses and the status of the floating licensing (updates login.cfg).
chlicense -I -u 50I -u 50 : changes the fixed license number immediately to 50 (without rebooting).
chlicense -f on : enables the floating licensing.
lsitabLists records in the /etc/inittab file.
chitab
Changes records in the /etc/inittab file.
mkitab
Adds records to the /etc/inittab file.
rmitab
Removes records from the /etc/inittab file.
telinit or init
Initializes and controls processes.
0-9 Tells the init process to put the system in one of the run levels 0-9. S,s,M,m Tells the init process to enter the maintenance mode. a,b,c Tells the init process to examine only those records in the /etc/inittab file with a, b, or c in the run-level field. Q,q Tells the init process to re-examine the entire /etc/inittab file. N Sends a signal that stops processes from being respawned.
telinit q : requests the init command to re-examine the /etc/inittab file.
who
Identifies the users currently logged in.
who -r : displays the runlevel.
who /var/adm/wtmp : displays a history of logins, logouts, system startups, and system shutdowns.
restbase
Restores customized information from the boot image. Attention: The command is executed only during system boot phase 1. Do not execute it in a run-time environment.
savebaseSaves base customized device data in the ODM onto the boot device.
savebase -d /dev/hdisk0 : save the ODM to the boot logical volume.
Varryoff VG
This is just for VG deactivation; some clients want to deactivate VG for project Restriction. Suppose customer want deactivate testvg then your command will be
#lsvg –o
Rootvg
Datavg
Testvg
#Varryoff testvg
#lsvg –o
Rootvg
Datavg
The above command display only two online VG’s and it will not show testvg because testvg is offline VG.
This is just for VG deactivation; some clients want to deactivate VG for project Restriction. Suppose customer want deactivate testvg then your command will be
#lsvg –o
Rootvg
Datavg
Testvg
#Varryoff testvg
#lsvg –o
Rootvg
Datavg
The above command display only two online VG’s and it will not show testvg because testvg is offline VG.
AIX - LVM - VarryOn
Volume Group
Varryon VG
This is just for VG activation; some times clients want to deactivate VG for project restriction. After that we want to activate the VG for further data access
Suppose we want to activate testvg, then your command will be
#lsvg
Rootvg
Datavg
Testvg
The above command shows what are VG’s available
#lsvg –o
Rootvg
Datavg
The above commands shows only online VG’s because testvg is offline so we have to activate testvg
#varryonvg testvg
#lsvg –o
Rootvg
Datavg
Testvg
Now above command is display the testvg.
Varryon VG
This is just for VG activation; some times clients want to deactivate VG for project restriction. After that we want to activate the VG for further data access
Suppose we want to activate testvg, then your command will be
#lsvg
Rootvg
Datavg
Testvg
The above command shows what are VG’s available
#lsvg –o
Rootvg
Datavg
The above commands shows only online VG’s because testvg is offline so we have to activate testvg
#varryonvg testvg
#lsvg –o
Rootvg
Datavg
Testvg
Now above command is display the testvg.
AIX - Create Voulme
Group
We can create VG by using mkvg commands
#mkvg –s 32 –y datavg hdisk4
The above command is creating datavg using pv hdisk4 and pp size is 32MB
#mkvg datavg hdisk4
The above command will create datavg using pv hdisk4 and pp size is by default 128MB.
We can create VG by using mkvg commands
#mkvg –s 32 –y datavg hdisk4
The above command is creating datavg using pv hdisk4 and pp size is 32MB
#mkvg datavg hdisk4
The above command will create datavg using pv hdisk4 and pp size is by default 128MB.