Vous êtes sur la page 1sur 56

TOPICS

1. BASIC AIX HARDWARE 2. OS INSTALLATION 3. BOOT PROCESS 4. SOFTWARE MAINTENANCE 5. FIX MAINTENANCE 6. ODM (Object Data Manager) 7. DEVICE MANAGEMENT 8. LVM (Logical Volume Manager) 9. PAGING SPACE 10. SRC AND DAEMONS 11. NETWORK 12. NFS (Network File System) 13. USER AND GROUP MANAGEMENT 14. SCHEDULING 15. BACKUP AND RESTORE 16. PERFORMANCE MONITORING 17. LPAR /DLPAR

1. BASIC AIX HARDWARE


The AIX Os is installed in IBM P Series or I Series Servers P Series Servers (32bit and 64 bit Hardware Support) 1. 2. 3. 4. 5. RS6000 P1, P2, P3 ( Very old models) P4 ( Regatta 680, 615, 630, 641, 690(LPAR / DLPAR) P4 +( It will support many no of processors and memory compare than P4) P5 (Squadron P550, P570, P575, P590, P595(Latest) P5 + ( It will support many no of processors and memory compare than P5)

2. 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.

3. 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. 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

4. 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 7. Clear the braked Fileset installation 8. List the Installed Fileset 9. List the Installed Fileset contents 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, LPPs (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 CDs. 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 wont 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 (hdisks) 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 wont 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

10

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

5. 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
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 -d - Keyword to mention the fix name - Device to mention device name

The above command is used to install the given fix IK00891 from cdrom drive.

11

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

12

6. ODM (Object Data Manager)


ODM generally used for Maintain the System information, whenever we install and reconfigure the hardware device and software, that informations added in ODM, Mainly ODM used to store the following informations 1. Hardware vital product data information 2. Software information 3. Smit menu 4. Nim 5. TCPIP 6. Error log
1. 2. 3. 4. 5.

Device configuration information Display information for SMIT (menus, selectors, and dialogs) Vital product data for installation and update procedures Communications configuration information 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)

13

Object: (Physical Informations) 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 informations) hdisk0 hdisk1 fd0 sa0 rmt0 cd0 scsi0 ODM States: ODM has two states

like this all the devices

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


14

1. odmadd The above command is used to manually we can add object information in ODM 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 dont have permissions for ODM)

15

7. 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.

16

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

17

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

18

#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)

19

8. LVM (Logical Volume Manager)


In AIX first Physical volumes (PV) are added into volume group(VG), After that only we can create logical volumes, and file systems. Minimum one PV is belongs to VG, While creating the VG we should mention physical partition (pp) size, this pps pointed to logical portions (LP), Suppose we have 40GB HDD, we have added in one VG named DataVG , While creating the VG we should mention the pp size, i.e. PP size will be 4MB to 128MB, suppose we are mentioned pp size is 32MB, then that 40GB HDD divided into 1024MB *40 = 40960MB Each pp size is 32MB, then 40GB HDD spited into i.e. 40960 / 32 = 1280 PPs So DATAVG has 1280 PPs While creating the Logical volumes we should mention the lv size by giving the no of pp Suppose you want to create one file system /userdata, that file system size will be 1GB, this file system is belongs to one particular LV, So while creating the LV we should mention the lv size is 1GB, but directly we cannot mention the GB size. Each pp has 32MB, So you create LV with 315 PPs, then that lv size will be 1GB. After creating the LV using 1GB space we can increase LV size online, reboot is not required. This LVM we can do following things,

1. List PV 2. Change PV 3. Create VG 4. List VG 5. Extend VG 6. Reduce VG 7. Varryon VG 8. Varryoff VG 9. Create LV 10. List LV

20

11. Extend LV 12. Change LV 13. Create LV copy 14. Remove LV copy 15. Remove LV 16. Create FS 17. Change FS 18. List Fs 19. Mount FS 20. Unmount FS 21. Remove FS 22. Repair FS 23. Mirror VG 24. Syncvg 25. Unmirror VG 26. Migrate PV 27. Migrate LV 28. Export VG 29. Import VG 30. Change VG
NOTE: After AIX installation by default root volume group (rootvg) will be available 1. List Physical Volumes Suppose we want to know how many PVs available in server, The following command is list the Pvs #lspv hdisk0 hdisk1 hdisk2 The above command is used to display the pv availability Suppose you want to see particular PV information then your command will be #lspv hdisk1 After executing lspv command it will display the hdisk2 PV information. All the information, like pp size, used pps, free pp, allocatable, hotspare etc.

21

Suppose we want to see logical volumes details in single hdisk2 PV Then your command will be #lspv l hdisk2 The above command is used to display all the LV details across the PV hdisk2 Suppose we want to see pp storage information in hdisk2, then your command will be #lspv p hdisk2 The above command is display the pp usage information across the PV hdisk2 2. Change PV Suppose we have three PVs, 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) Above operations we can do by using chpv command 3. Create VG, 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 is creating datavg using pv hdisk4 and pp size is by default 128MB 4. List VG We can list VG information using following commands #lsvg It will display the available vgs #lsvg datavg It will display full details about datavg only

22

#lsvg o It will display the online vgs #lsvg l datavg It will display the all logical volume details across the datavg #lsvg p datavg It will display the information about all PVs in datavg Above operations we can do by using lsvg commands 5. Extend VG We can increase VG size by adding Pv into existing VG using extendvg command #lsvg p datavg Hdisk4 Hdisk5 # datavg has 2 PVs 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 # 6. Reduce VG We can remove the VG using reducevg command, Suppose 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 PVs available in testvg then one by one we can reduce the PVs

23

7. 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 VGs available #lsvg o rootvg datavg The above commands shows only online VGs because testvg is offline so we have to activate testvg #varryonvg testvg #lsvg o rootvg datavg testvg Now above command is display the testvg. 8. 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 VGs and it will not show testvg because testvg is offline VG.

24

9. Create LV All the File systems belongs to individual LV, after creating the VGs 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 PPs allocated for newlv ( 1 pp size 32MB the newlv size is 32MB*5 = 160MB) Hdisk4 that newlv is belongs to PV hdisk4 10. List LV Suppose we want see what are the Lvs 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 pps mount pint, label name, stale partitions. Etc. #lslv m newlv To display the lvcopy informations

11. Extend LV Suppose we want to increase LV size using extendlv command #lslv newlv The above command shows LV size, no of LPs and some other information about LV, suppose LV has 10 LPs and usage is up to 95% full, that time we can increase the LV size online by adding no of LPs in newlv i.e. #extendlv newlv 5

25

After executing the above command 5 PPs 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 LVs is 15 and some additional space) 12. Change 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: suppose 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.

13. 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

26

#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, suppose 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 run the following command #lslv m testlv (it will show lvcopy details for testlv) Hdiks1 hdisk2 hdisk0

Testlv (copy1) testlv (copy2) testlv (copy3) 14. Remove LV copy Using rmlvcopy we can remove the lvcopy from the PVs Suppose 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 15. Remove LV Suppose we want to LV testlv from server #rmlv testlv (If data is available in testlv It will ask confirmation) #rmlv f testlv (It wont ask any confirmation, directly it will delete the data) After executing the above command testlv removed from the server.

27

16. Create FS Using crfs command we can create a file system. File systems belongs to LVs 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) 17. Change FS 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

28

18. List Fs 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) 19. Mount FS 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 put lsfs command it will show the /newfs details #lsfs a 20. 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 21. Remove FS Using rmfs command we can remove the file systems #lsfs a

29

/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) 22. Repair FS Using fsck command we can repair the problematic FS or corrupted FS Suppose 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) 23. Mirror VG We can do mirroring in AIX, using mirrorvg command and we can create max. Three copy of mirror. Suppose we have two PVs 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. 24. Synchronize VG Using Syncvg command we can sync the mirrored Vg and LV copy informations Suppose we want to sync lvcopy

30

#syncvg l lvname #syncvg l testlv After executing the above command, testlv copy get sync with lv copied PV Suppose we want to sync mirrored PVs #syncvg v rootvg The above sync the mirrored PVs in rootvg 25. Unmirror VG Using Unmirror command we can Unmirror the VG #unmirrorvg rootvg hdisk1 PV hdisk1 is removed from rootvg mirror #getconf KERNEL_BITMODE 26. Migrate PV 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 Suppose we want to migrate data from PV to PV #migratepv hdisk1 hdisk2 After executing above command hdisk1 data is moved to hdisk2 Displays if the kernel is 32 or 64 bit (AIX 5.2).

27. Migrate LV Using migratepv command we can migrate lv from PV to PV Suppose we want to migrate single LV #migratepv l testlv hdisk1 hdisk2 After executing above command testlv LV is moved hdisk2.

31

28. Export VG Using exportvg command we can export VG (including all the PVs) from one server to another server. Suppose you have ServerA, in this server has DATAVG with two PVs. 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 wont 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 PVs from ServerA for import DATAVG to ServerB 29. Import VG 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 PVs installed or not using lspv command #lspv (it will display the installed PVs) if hdisk3, hdisk4 is available then PVs 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)

32

NOTE: Suppose 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. 30. Change VG 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) NOTE: Quorum, VGDA, VGSA, LVCB 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). 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.

33

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. Quorum 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 PVs 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.

34

9. 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 1GB. In this paging space we can do following things

1. 2. 3. 4. 5. 6.

List paging space Create paging space Change paging space Activate paging space Deactivate paging space Remove paging space

1. List paging space Using lsps command we can view the paging space details #lsps a (It will display the paging space details)

2. Create Paging space Using mkps command we can create the 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

35

3. Change paging space Using chps command we can increase, decrease, auto on, and auto off the paging space. #chps s 5 newpaging (5 LPs added with newpaging) To increase #chps d 3 newpaging (3 LPs 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)

4. 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

6. 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

36

10. SRC AND DAEMONS


Group of subsystems called daemons, using src command we can do following things with subsystems and daemons

1. 2. 3. 4.

Start daemon List daemon stop daemon refresh (restart) daemon

1. Start daemon Using srcstart command we can start the daemon, suppose we want to start nfs 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 Suppose 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 Suppose 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. 2. List Daemon Using lssrc command we can list the daemons Suppose we want see check status of the nfs daemon, whether subsystems are started or not. #lssrc g nfs Nfsd started Biod started

37

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 The above command list the status of all the daemons, Like this we can list and check the status of the daemons 3. Stop Daemon Using stopsrc command we can stop the daemon, Suppose 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 4. 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

38

11. NETWORK
In this chapter we can do following things,

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 Using cfgmgr command we can configure to server Cfgmgr command is device management related command. Suppose we want to install new network card, first we should connect network in server. While booting the server boot process is starting the cfgmgr, 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 2. 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

39

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) 3. Disable IP address Using ifconfig command we can disable the IP address #ifconfig en0 down (Turns off network card en0) 4. Enable IP address #ifconfig en0 up (Turns on network card en0) 5. 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) 6. 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) 7. 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)

40

8. 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)

9. 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 10. Trace the HOST Using traceroute command we can trace the route to the host #traceroute ServerA (To trace the route to ServerA)

41

11. 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 12. Clear the Gateway Using route command we can clear the gateway #route f (To clear the gateway)

12. 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 nfsd, rpc.mountd subsystems is running on server end rpc.statd, rpc.lockd, rpc.mountd subsystems running on client end

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

42

Then we should import the file system to client end.

5. Import 6. List the imported file systems 7. Remove the imported file systems
1. 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. 2. List the exported file system Using lsnfsexp command we can list the exported file system #lsnfsexp /usr rw 3. Remove the exported file system Using smitty rmnfsexp command we can remove the exported file system #smitty rmnfsexp

43

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 4. 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 5. Import the 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. 6. List the imported files system Using mount command we can check the imported file system status. #mount

44

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 7. Remove the 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.

13. USER AND GROUP MANAGEMENT


In this user management we can do following commands

1. 2. 3. 4. 5.

Create user List user Change user Remove user Set password for users

1. Create user Using mkuser command we can create a new user, suppose you want to create new user, #mkuser lingam After this command execution, lingam home directory created in /home/lingam/ lingam user configuration details stored in /etc/passwd Now you can login the terminal using lingam user name without password. Then you have to set the password for lingam user using command passwd #passwd lingam Enter new password: ****** Confirm password again: ******

45

After this command execution password assigned to lingam user and lingam 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 informations stored in /etc/security/lastlog file. 2. 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 informations except password) #lsuser <username> (It will list only user informations except password) 3. 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. Suppose we want to change the user group to system, then your command will be. #lsuser <username> (it will show user properties including group information) #chuser pgrp=system <username> (now user is assigned to primary group system and secondary group is assigned to staff) #lsuser <username> (It will list modified user properties, group is system, staff) Like this we can change all the user properties 4. Remove user Using rmuser command we can remove the user, suppose you want to remove user #rmuser <username> After this command execution, particular user will be deleted. 5. Set password for Users Using passwd command we can set password for user and root

46

#passwd <username> Enter new password: ***** Confirm password: ***** We are changing password for user from root path, it will not ask existing password for user, because root is administrator login. Suppose you are changing password from user login, it will ask existing password, because user should know the existing password before changing the new password. Otherwise any user can change the user password. This not recommended security. $pwd /home/<username> $passwd <username> Enter the old password: ***** Enter the new password: ***** Confirm password again: ***** NOTE: Suppose 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.

GROUP MANAGEMENT
In this group management we can do following things,

1. 2. 3. 4.

Create group List group Change group Remove group

1. Create group Using mkgroup command we can create the group, suppose 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.

47

2. List group Using lsgroup command we can list group informations. Suppose we want to list oracle group information #lsgroup oracle (it will display the oracle group informations, gname, gid, members) #lsgroup all (It will list all group details) 3. Change group Using chgroup command we can change the group informations. #chgroup options oracle 4. Remove group Using rmgroup command we can remove a group, suppose we want to remove oracle group. #rmgroup oracle After this command execution oracle group removed and group configuration information removed from /etc/groups files.

14. SCHEDULING
In Aix Os we can schedule jobs using crontab command; these jobs are executed in background at mentioned time. Suppose 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. 2. 3. 4.

List scheduling Edit scheduling Clear scheduling Assign user permissions

48

1. List scheduling Using crontab command we can list scheduled job. #crontab l The above command is list the scheduled jobs 2. 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 hour day of month month day of week 0-59 0-23 1-31 1-12 (or names, see below) 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 lingam lingam user will be created on mentioned time NOTE: Once crontab jobs completed, that output logs stored in /var/spool/cron/crontabs 3. Clear the scheduling Using crontab command we can clear the scheduled jobs. #crontab r After command execution this crontab file entries will be removed. 4. Assign the user permissions We can allow and deny crontab usage permissions for users Suppose u want to deny lingam user for crontab process, that time you put entry in /var/adm/cron/cron.allow file

49

Suppose u want to allow lingam 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

15. BACKUP AND RESTORE


In this chapter we can do following things using backup and restore commands

1. 2. 3. 4. 5. 6. 7.

backup restore rootvg backup restore rootvg backup non rootvg backup(other than rootvg) restore non rootvg backup(other than rootvg) rewind, eject and erase the tape

1. 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)). Suppose you want to take Sunday backup then your command will be #backup -0 vf destination source

50

#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 2. 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 3. 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 informations in rootvg while restore the rootvg backup, before start the restore it will read the informations from the image.data file After the command execution rootvg backup created in tap, suppose 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. Suppose you not required following file systems in mksysb backup, /var log files

51

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) First block has boot image. The BOS boot image contains a copy of the systems 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. 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

52

4. 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 5. Backup the non rootvg backup Using savevg command we can backup the non rootvg backup Suppose 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. Suppose you not required following file systems in mksysb backup, /var log files That time you should put entry in /etc/exclude.datavg, 6. 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.

53

7. 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)

16. PERFORMANCE MONITORING


In this performance monitoring we can check following things 1. 2. 3. 4. Cpu bound Memory bound Network bound I/O bound

1. CPU bound Using Topas command we can check the server performance monitor, the following things we can monitor. 1. 2. 3. 4. 5. processor (CPU Usage) Network (KB in / KB out) Memory (Page in / Page out) I/O (HDD read and write) Top 8 process

2. Memory bound Using vmstart command we can monitor the memory bound #vmstart 2 3 After this command execution, it will show the memory page in and page out process. Within 2 seconds, 3 outputs is displayed Suppose you are checking paging space usage using command lsps #lsps s 11% - this is normal

54

40% - Server running on slow performance 70% - users cannot logon the server, Some error message will appear (fork exist failed) 3. Network bound Using topas command we can monitor the network bound, in this network monitor we can find KB in and KB out process. 4. I/O bound Using iostat command we can monitor the I/O bound In this I/O bound we can monitor the disk usage, suppose you are using two or three heavy used file system in one PV that time that particular PV usage will be very high

17. LPAR / DLPAR


We can configure LPAR and DLPAR in P690 Servers, LPAR (Logical partitions) In single server we can install multiple operating systems, like AIX 5.1, AIX 5.2, AIX 5.3, Susi Linux, AIX 4.3, and using LPAR concept The above Os are installing in single server, before that we have to partition the hardware resources, like processors and memory, Harddisk, Using HMC (Hardware Management Console) we can partition and operate the LPAR servers Suppose you have one P690 server with 16 CPUs and 16GB Ram, in this server we can make 16 partitions, Now each partitions has 1 CPU and 1GB Ram, Suppose one particular Os assigned for 500 users that time we have to assign additional hardware resources to that partition, online we can assign the hardware resources using HMC. No need to reboot the server, this concept called DLPAR (dynamic Logical Partition) Like this we can create the LPAR / DLPAR HMC - it is a desktop pc (Linux OS) connected with P690 server through Communication (com port) cable or RJ45 Ethernet cat cable

55

Using HMC we can Create, Delete, and Change the Logical Partitions This LPAR server has hypervisor Controller, all the informations stored in this hypervisor, and it is used to maintain the server Accessing methods: 1. wsm (Web based system management , using this concept we can access the LPAR servers from windows desktops) 2. ssh (Secured shell, using this concept we can access the LPAR servers through telnet)

56

Vous aimerez peut-être aussi