Académique Documents
Professionnel Documents
Culture Documents
1.User password Reset Clearing the unsuccessful login count. /usr/local/bin/sudo chsec f /etc/security/lastlog "unsuccessful_login_count=0" s username Where, -f File Specifies the name of the stanza file to modify. -a Attribute = Value Specifies the attribute to modify and the new value attribute. If you do not specify the value, the attribute removed from the given stanza. -s Stanza Specifies the name of the stanza to modify. To confirm the unsuccessful login count becomes zero,use /usr/local/bin/sudo lsuser f username Where, -f Displays the output in stanzas, with each stanza by a user name. Each Attribute=Value pair is listed on a line: user: attribute1=value attribute2=value attribute3=value Setting the new password /usr/local/bin/sudo passwd username 2.User needs recently used password,while setting same password getting below error 3004-314 Password was recently used and is not reuse.
/usr/local/bin/sudo chuser histexpire=0 username /usr/local/bin/sudo chuser histsize=0 username 3. Creating new user Example: (testuser,primarygroup-dba,sec.group/usr/local/bin/sudo useradd -u 238 -d dba -G cp,chris -m -c "Testuser " -s /usr/bin/ksh Where, -u uid Specifies the user ID. -d dir Identifies the home directory of the user by the login parameter. -g group Identifies the user's primary group. The group parameter must contain a valid group name and cannot be a value. -G group1,group2,... Identifies the groups the user belongs to. The group1,group2,... parameter is a comma-separated list of group names. -m Makes user's home directory if it does not default is not to make the home directory. -c comment -s shell Defines the program run for the user at session initiation. The shell parameter is a full path name. 4.To change users primary group to DBA and add secondary groups finance and accounting, #chuser pgrp=dba groups=finance, accounting Where, pgrp
Identifies the user's primary group. The Value parameter must contain a valid group name and cannot be a value. groups Identifies the groups the user belongs to. The parameter is a comma-separated list of group names. 5. Check password has been set for the user or not more /etc/passwd |grep username Note: Second field options( ! ,*) Example: sundarsu: ! :774:1:Suresh Sundaresan:/home/sundarsu:/usr/bin/ksh Pwd kaveti: * Pwd not set 6. To change ownership, /usr/local/bin/sudo chown owner:group Example: /usr/local/bin/sudo chown oracle:dba 7. To disable/lock user account, /usr/local/bin/sudo chuser account_locked=true To confirm, /usr/local/bin/sudo lsuser f username 8. To change comment/gecos of user. sivarara@kaxdev02:/>passwd -f sivarara's current gecos: "Rajkumar.Sivaraman" Change (yes) or (no)? >
Devices:
1.lscfg 2.lscfg -v lists all installed devices lists all installed devices in detail lists device details
Eg: sivarara@kaxdev02:/>lscfg -vl fcs0 fcs0 U7311.D20.103E18B-P1-C06-T1 FC Adapter Part Number.................03N5029 EC Level....................A Serial Number...............1B621042F1 Manufacturer................001B Customer Card ID Number.....5759 FRU Number.................. 03N5029 Device Specific.(ZM)........3 Network Address.............10000000C95612DA 4.bootinfo -b booted from reports last device the system
Eg: sivarara@kaxdev02:/>/usr/local/bin/sudo bootinfo -r 12582912 6.bootinfo -s (disk device) reports size of disk drive Eg: sivarara@kaxdev02:/>/usr/local/bin/sudo bootinfo -s hdisk0 73728 7.lsdev -C Eg: lists all customised devices ie installed
sivarara@kaxdev02:/>lsdev -Cc disk hdisk0 Available Virtual SCSI Disk Drive hdisk1 Available Virtual SCSI Disk Drive hdisk2 Defined 02-08-02 EMC CLARiiON FCP RAID 5 Disk hdisk30 Available 02-08-02 HP HSV450 Enterprise Virtual Array Where , -C Lists information about a device that is in the Customized Devices object class. -c Class Specifies a device class name. 8.lsdev -P lists all pre-defined devices ie supported Eg: sivarara@kaxdev02:/>lsdev -P -H|pg class type subclass description 3dx 03000008 PCM ds4k-ui Interface PCM ds4k-ui Path Control Module PCM fcpother Path Control Module Where, -P Lists information about a device that is in the Predefined Devices object class. -H Displays headers above the column output. 9.chdev l hdisk1 a pv=yes
a physical volume(pvid) Where, Changes an available disk to a
USB 3D mouse DS3/4K PCM User Active/Passive Disk AIX SCSI/FCP Disk
-l Name Specifies the device logical name in the Customized Devices object class whose characteristics are to be changed. -a Attribute=Value
Specifies the device attribute. 10.lsattr -EH -l (device) List detailed configuration a device Eg: $ /usr/local/bin/sudo lsattr -El sys0 | grep max maxbuf 20 Maximum number of pages in block I/O BUFFER CACHE True maxmbuf 0 Maximum Kbytes of real memory allowed for MBUFS True maxpout 0 HIGH water mark for pending write I/Os per file True maxuproc 256 Maximum number of PROCESSES allowed per user True Where, -H Displays headers above the column output. -h Displays the command usage message. -l Name Specifies the device logical name in the Customized Devices object class whose attribute names or values you want displayed. 11.rmdev -l (device) available to defined 12.rmdev -l (device) -d Change device state from
LVM
mkvg -y datavg -s 64 hdisk2 hdisk3 Explanation: In this a volume group is created with user defined name(datavg) with partition size of 64 megabytes physical volumes(pv) hdisk2 and hdisk3. Eg-2: Mkvg s 32 t 2 hdisk3 Explanation: In this the volume group is created with system name(-y flag is not used),with physical partition size 32mb and Max.PP per PV(-t flag is used) is twice the default(2*1016=2032). Eg-3: To create big VG. Mkvg B y bigvg hdisk3 hdisk4 Explanation: Here the Big (-B used )volume group is created the Max.PVs upto 128PV .And physical partition flag not used) it takes default size as per HDD size. Eg-4: To create Scalable VG. Mkvg S y scalablevg hdisk3 hdisk4 Explanation: Here the Scalable (-S used )volume group is created has the Max.PVs upto 1024PV . .And physical size(-s flag not used) it takes default size as per HDD
Extendvg:
Used to extend or increase size of volume group by physical volumes. Extendvg f datavg hdisk5 Explanation: Using extendvg command ,we are increasing the size already existing volume group dynamically. If HDD varies,it is not an issue.(-f flag is used for force ).
removing physical volumes. Reducevg d f datavg hdisk4 Explanation: Using reducevg command ,we are decereasing the already existing volume group dynamically. (-f flag used for force ).
-d Deallocates the existing logical volume partitions and then deletes resultant empty logical logical volumes from the specified physical volumes. User confirmation is required unless unless the -f
1.Logical volume is group of logical partition which span physical volumes. 2.Logical volume can be dynamically extended. 3.Logical partitions are mapped one-to-one with partitions unless its mapped.
Logical volumes:
Eg-1: Mklv y newlv datavg 2 Explanation: To make a logical volume in volume group datavg logical partition of the data. Eg-2: mklv -u 3 -S 64K vg05 12 Explanation: To make a striped logical volume in vg05 with a strip of 64K across 3 physical volumes and 12 logical List information about logical volumes. Lslv lv02
Lslv:
extendlv lv05 3
Explanation: To increase the size of the logical volume represented the lv05 directory by three logical partitions. Eg-2: Chlv x 1000 lv01 Explanation: To increase size of logical volume in volume group.
To increase the /usr file system size by 1000000. Eg-3: chfs -d size=-2G /test To decrease the /test file system size by 2GB.
See PP size and FREE PPS - > PP Size*FREE PP / 1024 - > Here, > Here, 256*92/1024 = 23 ( This is VG is having 23 GB available available space)
If the requested size to extend FS is more than the avaibale size, then raise a case with storage team requesting new luns. See KM : 1014 Once the Luns are assigned SA will get an e-mail from storage storage with device ID details. Example :- Added a 34gb lun, dev 185, to the listed hba's. Note :If the VG is having space to extend, then go to step no- 9 no- 9
ADD disk to VG
2.Discover the luns. $ cfgmgr 3.Identify the newly added disk by using LUN ID? $ powermt display dev=all | grep -ip <Device ID> Example: -$powermt display dev=all | grep -ip 185 Pseudo name=hdiskpower5 CLARiiON ID=APM00091900487 [kenabkp001p] Logical device ID=600601607332260022C5B5645879DF11 [LUN ID=600601607332260022C5B5645879DF11 [LUN 185] state=alive; policy=CLAROpt; priority=0; queued-IOs=0 Owner: default=SP B, current=SP A Array failover mode: 3 mode: 3 4.Check the size of newly added luns $ bootinfo -s (disk Name) Example:- $ bootinfo hdiskpower5 51200 5.Set the PV Id for the newly assigned disk. $chdev -l (diskname) -a pv=yes 6.Check if the PV id is set to one disk. $ lspv hdiskpower4 none None hdisk22 none None hdisk23 none None hdisk24 none None hdisk25 none None hdiskpower5 000abd166473c321 TSMDB TSMDB active 7.Add the disk to existing volume group $extendvg <vgname> <diskname> Example :-$extendvg TSMDB hdiskpower5 8. Check if the disk is added to volume group $ lsvg -p TSMDB TSMDB: PV_NAME PV STATE TOTAL PPs FREE PPs FREE PPs FREE DISTRIBUTION hdiskpower0 active 999 0 00..00..00..00..00
hdiskpower5
active
199
92
12..00..00..40..40
9.Extending the file system as requested, here we are extending extending 20GB of /ut01 $chfs -a size=+<Size>G <Mount Point> Example : chfs -a size=+20G /ut01 In Some case,
When trying to increase filesystem size ,some times we are getting errors like extendlv. Maximum number of LPs for the logical volume has been exceeded - must increase the allocation
2. When trying to increase filesystem size ,some times we are getting errors like extendlv. Maximum number of LPs for the logical volume has been exceeded - must increase the allocation $ /usr/local/bin/sudo chfs -a size=+35G /u02 0516-787 extendlv: Maximum allocation for logical volume volume vg2lvol1 is 2048. 3. Check that logical volume,Maximum LP's and Used LP's using lslv command. $ lslv vg2lvol1 LOGICAL VOLUME: vg2lvol1 VOLUME GROUP: max11vg2 LV IDENTIFIER: 0009fa0f00004c0000000105ee23775c.1 0009fa0f00004c0000000105ee23775c.1 PERMISSION: read/write VG STATE: active/complete LV STATE: opened/syncd TYPE: jfs2 WRITE VERIFY: off MAX LPs: 2048 PP SIZE: 16 megabyte(s)
COPIES: 1 SCHED POLICY: parallel LPs: 1988 PPs: 1988 STALE PPs: 0 BB POLICY: nonrelocatable INTER-POLICY: maximum RELOCATABLE: RELOCATABLE: yes INTRA-POLICY: middle UPPER BOUND: 32 MOUNT POINT: /u02 LABEL: /u02 MIRROR WRITE CONSISTENCY: on/ACTIVE EACH LP COPY ON A SEPARATE PV ?: yes Serialize IO ?: NO Note: (2048-1988=50LP)Which is not sufficient for 35GB space. To calculate the number of LPs needed = LV Size in MB / LP size in MB $ bc 35*1024/16 2240 2240+2048 (Adding the new space with the existing space) 4288 Quit 4. Command to extend logical partitions in logical volume. $ /usr/local/bin/sudo chlv -x 4288 vg2lvol1 5. Checking the logical volume,And increase in maximum LP's. Number of LP's in vg2lvol1 LV is increased. $ lslv vg2lvol1 LOGICAL VOLUME: vg2lvol1 VOLUME GROUP: max11vg2 LV IDENTIFIER: 0009fa0f00004c0000000105ee23775c.1 0009fa0f00004c0000000105ee23775c.1 PERMISSION: read/write VG STATE: active/complete LV STATE: opened/syncd TYPE: jfs2 WRITE VERIFY: off MAX LPs: 4288 PP SIZE: 16 megabyte(s) COPIES: 1 SCHED POLICY: parallel parallel
LPs: 1988 PPs: 1988 STALE PPs: 0 BB POLICY: nonrelocatable INTER-POLICY: maximum RELOCATABLE: RELOCATABLE: yes INTRA-POLICY: middle UPPER BOUND: 32 MOUNT POINT: /u02 LABEL: /u02 MIRROR WRITE CONSISTENCY: on/ACTIVE EACH LP COPY ON A SEPARATE PV ?: yes Serialize IO ?: NO 6. Again trying to increase the size of filesystem.Now able to increase $ /usr/local/bin/sudo chfs -a size=+35G /u02 Filesystem size changed to 138543104 7.Checking the filesystem for increase in free space. $ df -g /u02 Filesystem GB blocks Mounted on /dev/vg2lvol1 66.06
16 megabyte(s)
#mklv -y vg1lvo5 max10vg1 960 (960*16/1024 = 15GB) 2.Make filesystem, create the mountpoint and updates to /etc/filesystems #crfs -v jfs/jfs2 -d <LV_NAME> -m /<MOUNTPOINT> -A yes A yes Where, jfs/jfs2 - check the existing lv's in the VG(lsvg -l vgname) vgname) for fstype and - A = auto mount to yes. Ex:crfs -v jfs2 -d /dev/vg1lv05 -m /u10 -A yes 3.Mount the new fileystem ( crfs will create the mount point on point on own) #mount /<MOUNTPOINT> 4. Change the permission of mount point as requested ex : chown oracle:dba /MOUNTPOINT 5.verifies the mount and the size of the new filesystem #df /<MOUNTPOINT>
PP SIZE:
256 megabyte(s)
Create VG :
Volume Groups are of 3 types, i. Normal 32 pvs ii. Big 128 pvs iii.Scalable 1024 pvs. Create a New volume group: #mkvg -y <name_of_volume_group> s <partition_size> <list_of_hard_disks>
eg. #mkvg y norvg hdisk3 hdisk4 Explanation:Here this Normal volume group is created ,which ,which has the Max.PVs up to 32PV .And physical partition size partition size (-s flag not used) it takes default size as per HDD HDD size. Additional Info :
1.How to check WWN number? Example: $ lsdev -Cc adapter ent0 Available 05-08 2-Port 10/100/1000 Base-TX X Adapter (14108902) ent1 Available 05-09 2-Port 10/100/1000 Base-TX X Adapter (14108902) ent2 Available 09-08 2-Port 10/100/1000 Base-TX X Adapter (14108902) ent3 Available 09-09 2-Port 10/100/1000 Base-TX X Adapter (14108902) ent4 Available 0B-08 2-Port 10/100/1000 Base-TX X Adapter (14108902) ent5 Available 0B-09 2-Port 10/100/1000 Base-TX X Adapter (14108902) ent6 Available EtherChannel / IEEE 802.3ad Aggregation ent7 Available VLAN ent8 Available VLAN ent9 Available VLAN ent10 Available VLAN fcs0 Available 00-08 FC Adapter fcs1 Available 00-09 FC Adapter fcs2 Available 06-08 FC Adapter fcs3 Available 06-09 FC Adapter fcs4 Available 07-08 FC Adapter fcs5 Available 07-09 FC Adapter fcs6 Available 0A-08 FC Adapter fcs7 Available 0A-09 FC Adapter ide0 Available 03-08 ATA/IDE Controller Device sisscsia0 Available 04-08 PCI-X Dual Channel SCSI Adapter usbhc0 Available 08-08 USB Host Controller (33103500) usbhc1 Available 08-09 USB Host Controller usbhc2 Available 08-0a USB Enhanced Host (3310e000) vsa0 Available LPAR Virtual Serial Adapter
/usr/local/bin/sudo lscfg -vpl <adapter> $ /usr/local/bin/sudo lscfg -vpl fcs0 fcs0 U787F.001.DPM440X-P1-C4-T1 FC Adapter Part Number.................10N8620 Serial Number...............1B7450579B Manufacturer................001B EC Level....................A Customer Card ID Number.....5759 FRU Number.................. 10N8620 Device Specific.(ZM)........3 Network Address.............10000000C96EBCDE WWN Number