Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (10) AWS (5) numerology (5)

Wednesday, December 31, 2014

Identify new Lun’s added in 11.31 on EMC SYMMETRIX storage + HPUX

How to identify new Lun’s added in 11.31 on EMC SYMMETRIX storage:

   Device name       Size   

        9da                30GB   
       
Here Device name/Lun id is 9da.

{Note :

EMC SYMMETRIX - No need to convert it into hexadecimal to get Lun ID 

EMC SYMMETRIX - convert it into hexadecimal to get Lun ID }


Steps:

1.       #ioscan –fnCdisk  

2.       #insf   -e disk   

3.       #ls –lt /dev/disk |more
brw-r-----   1 bin        sys          1 0x000013 Sep 20 16:57 disk411


See the timestamp to identify newly added disks.

4.       #ioscan –m dsf /dev/disk/disk411

5.       #ioscan -m lun  

6.       #strings /etc/lvmtab |grep –i disk411 


7.    # /usr/local/bin/inq.HPUXIA64 -showvol |grep -i 9da
        ........../dev/rdisk/disk411  :EMC     :SYMMETRIX       :5874  :02009da000 :   009DA:    40266240
        /dev/rdsk/c25t8d2   :EMC     :SYMMETRIX       :5874  :02009da000 :   009DA:    40266240
        /dev/rdsk/c28t8d2   :EMC     :SYMMETRIX       :5874  :02009da000 :   009DA:    40266240


8.       #scsimgr -v get_info all_lun   < To get all status information of all the LUNs>


or       #scsimgr get_info -D /dev/rdisk/disk411 |grep "SCSI services internal state"


"SCSI services internal state" is UNOPEN then that is unused disk. If disk is used then the state will be ONLINE



Thanks...
Kiran Jadhav

**Let's Share our knowledge and keep visiting here**

Wednesday, December 24, 2014

Mr Perfectionist with Midas Touch

Legendary movies by Mr Perfectionist (Aamir Khan):

Indeed Aamir Khan is perfectionist. He showed his legendary acting in many movies and by his Midas touch he made that character alive. 

Below are the list of movies in which he did superb acting, yaah we all know the list will go further:-)

1. Qayamat Se Qayamat Tak - 1988

2. Dil - 1990

3. Dil Hai Ke Manta Nahin - 1991

4. Jo Jeeta Wohi Sikandar - 1992

5. Hum Hain Rahi Pyar Ke - 1993

6. Andaz Apna Apna - 1994

7. Rangeela - 1995

8. Akele Hum Akele Tum - 1995

9. Raja Hindustani - 1996

10. Ghulam - 1998

11. Sarfarosh - 1999

12. Mann    - 1999

13. Lagaan -2001

14. Dil Chahta Hai    - 2001

15. Rang De Basanti - 2006

16. Fanaa      - 2006

17. Taare Zameen Par - 2007

18. Ghajini - 2008

19. 3 Idiots - 2009

20. Talaash: The Answer Lies Within - 2012

21. PK - 2014


the list continues......



Thanks...
Kiran Jadhav


**Let's Share our knowledge and keep visiting here**

Tuesday, December 23, 2014

How to find system is booted from which disk - hpux

How to find system is booted from which disk in Hpux:


On HPUX 11.31 (11iv3) :

1. From setboot command

testsrv:/] setboot
Primary bootpath : 0/0/0/2/0/0/0.0x0.0x1000000c0000000 (/dev/rdisk/disk5)
HA Alternate bootpath :
Alternate bootpath : 1/0/0/2/0/0/0.0x0.0x1010000c0000000 (/dev/rdisk/disk7)

Autoboot is ON (enabled)
Hyperthreading : ON
               : ON (next boot)

See the primary bootpath.

2. From reading the information from /stand/vmunix

testsrv:/] echo "bootdev/X" | adb -o /stand/vmunix /dev/kmem
bootdev:
bootdev:        0x100000a

testsrv:/] ll /dev/disk/* |grep 00000a
brw-r-----   1 bin        sys          1 0x00000a Nov 30  2011 /dev/disk/disk5_p2
cr--------   1 root       root        12 0x00000a Feb 15  2013 /dev/disk/disk5_p2.pt




Thanks...
Kiraan B Jadhhav


**Let's Share our knowledge and keep visiting here**

Lyrics of “Bhagwan Hai Kahan Re Tu” in Hindi

#Lyrics of “Bhagwan Hai Kahan Re Tu” in Hindi#


है सुना ये पुरी धरती तू चलाता है
मेरी भी सुनले अरज मुझेे घर बुलाता है
भगवान है कहा रे तू
हे खुदा है कहा रे तू...

है सुना तू भटके मन को राह दिखाता है
मै भी खोया हूँ मुझे घर बुलाता है
भगवान है कहा रे तू
हे खुदा है कहा रे तू...

मै पूजा करु, या नमाजे पढू
अरदासे करु दिन रैन
ना तू मंदिर मिलें, ना तू गिरजे मिले
तुझे ढूँढे थके मेरे नैन … 3

जो भी रस्मे है वो सारी मै निभाता हूँ
इन करोडो की तरह मै सर झुकाता हूँ
भगवान है कहा रे तू
हे खुदा है कहा रे तू

तेरे नाम कई, तेरे चेहरे कई
तुझे पाने की राहें कई
हर राह चला पर तू ना मिला
तु क्या चाहे मै समझा नही … 3

सोच बिन जतन करता ही जाता हूँ
तेरी जिद सर आँखो पर रख के निभाता हूँ
भगवान है कहा रे तू
हे खुदा है कहा रे तू…

है सुना ये पुरी धरती तू चलाता है
मेरी भी सुनले अरज मुझे घर बुलाता है
भगवान है कहा रे तू
हे खुदा है कहा रे तू..

भगवान है कहा रे तू
हे खुदा है कहा रे तू..

Lyrics penned by Swanand Kirkire
Movie: PK


* To write this lyrics I had to listen this song more than 20-25 times. But doesn't matter, now I can say it was worth :-) Hope you all will love it too...

Thanks...
Kirraan Jadhav

Friday, December 19, 2014

Few points on LVM - HPUX

Few points on LVM:

1. We can create a LV of size greater than a PV size. This feature is called "Disk Spanning".

2. We can create upto 6 mirror copies simultaneously which required a product "HP MIRROR DISK/UX".

3. Mirrored data can be configured to automatically create a new mirror to a separate disk when of mirror copies fails called as "SPARING" & required a product "HP MIRROR
DISK/UX".

4. We can create a LV so that contiguous data can be distributed accross multiple disks, which speeds I/O throughput for large files by reading and writing sequentially. This
feature is called "STRIPING".



Thanks...
Kiran Jadhav


**Let's Share our knowledge and keep visiting here**

Wednesday, December 17, 2014

Extending root FS (mirrored) online - hpux

Extending root FS (mirrored) online

mysrv:/> lvdisplay /dev/vg00/lvol1 |grep -i allocation
Allocation                  strict/contiguous

mysrv:/> lvdisplay /dev/vg00/lvol2 |grep -i allocation
Allocation                  strict/contiguous


mysrv:/> lvdisplay /dev/vg00/lvol3 |grep -i allocation
Allocation                  strict/contiguous


mysrv:/> lvdisplay /dev/vg00/lvol4 |grep -i allocation
Allocation                  strict

if strict policy then LVM helps to avoid creating multiple mirror copies on a single bus.
contiguous - means PEs are adjoining/touching.


This method can be used on HP-UX 11.11 / 11.23 with Legacy Addressing (/dev/dsk/c#t#d#)

HP-UX versions prior to 11.31:


Here we want to extend FS / or LV /dev/vg00/lvol3

#bdf /

1. Take ignite backup or have full backup of vg00

2. Identify primary disk and secondary/alternate disk:

2.1 # setboot
2.2 # lvlnboot -v
2.3 #cat /stand/bootconf

   primary disk= /dev/dsk/c0t8d0
   secondary/alternate disk = /dev/dsk/c1t8d1

3. Reduce the mirror on every LV under vg00; if we have 8 lvs in vg00 then remove mirror from those LVS

#lvreduce -m 0 /dev/vg00/lvol1
#lvreduce -m 0 /dev/vg00/lvol2

.
.
#lvreduce -m 0 /dev/vg00/lvol8

4. Remove the mirror disk/secondary disk (/dev/dsk/c1t8d1) from vg00

#vgreduce vg00 /dev/dsk/c1t8d1

5. Create a PV on secondary disk

#pvcreate /dev/rdsk/c1t8d1

6. Add that PV in vg00

#vgextend vg00 /dev/dsk/c1t8d1

7. Move the PEs of all the Lvs in vg00 other than lvol1, lvol2 & lvol3 as they are contiguous in nature on secondary disk(/dev/dsk/c1t8d1)

Note : here we are making space on primary disk so moved all LEs from lovl4 .... to secondary disk.

#pvmove -n /dev/vg00/lvol4 /dev/dsk/c0t8d0 /dev/dsk/c1t8d1
#pvmove -n /dev/vg00/lvol5 /dev/dsk/c0t8d0 /dev/dsk/c1t8d1
.
.

8. Extend the root FS.

#lvextend -L {size in MB} /dev/vg00/lvol3
#fsadm -b {size in MB}m /

9.Move back all LE's of all LVs from secondary disk to primary disk.

#pvmove -n /dev/vg00/lvol4 /dev/dsk/c1t8d1 /dev/dsk/c0t8d0
#pvmove -n /dev/vg00/lvol5 /dev/dsk/c1t8d1 /dev/dsk/c0t8d0
.
.

10. Remove secondary disk from vg00 so we can make the disk as bootable disk.

vgreduce /dev/vg00 /dev/dsk/c1t8d1

11.Create a boot disk.

#pvcreate -B /dev/rdsk/c1t8d1

#mkboot -a "hpux -lq" /dev/rdsk/c1t8d1

{Change the AUTO file to hpux -lq so the host can boot without quorum if one mirror disk fails.}

12. Extend the root VG with new boot disk

#vgextend /dev/vg00 /dev/dsk/c1t8d1

13. Mirror all Lvs present on primary disk to secondary disk.

#lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t8d1
#lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c1t8d1
.
.
.
#lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c1t8d1

14. check if root,boot,swap& dump are properly configured.

#lvlnboot -v

15. Verify low quorum is set for both disk

#lifcp /dev/dsk/c0t8d0:AUTO-
#lifcp /dev/dsk/c1t8d1:AUTO-

16. run bdf command and compare old bdf output with current bdf output

#bdf /



Thanks...
Kiran Jadhav


**Let's Share our knowledge and keep visiting here**




Thursday, December 4, 2014

Identify VG is in cluster or not - hpux

How to identify VG is in cluster or not in HPUX

Just by checking the VG status we can identify whether that particular VG is in cluster or not?

#vgdisplay |grep -i "vg status"

VG status = available --> VG is online and available and not in cluster.

or

VG status = available/exclusive --> VG is cluster aware. If VG is in exclusive mode then the node on which VG is activated in exclusive mode will have read - write access to this VG; other node
will be having read only access


Thanks...
Kiraan B Jadhhav


**Let's Share our knowledge and keep visiting here**

Wednesday, December 3, 2014

Sticky bit - HPUX

Sticky bit - HPUX

If the sticky bit is set on a directory then files inside the dir will be renamed/removed only by owner of the file; the owner of the dir or the superuser.

The classic example is /tmp.

$ ls -ld /tmp
drwxrwxrwt  25 bin        bin          16384 Dec  3 09:54 /tmp

How to set sticky bit:

$ ls -ld learn
drwx------   2 kiran      users           96 Dec  3 10:03 learn

$ chmod +t learn

or
$ chmod 1700 learn

$ ls -ld learn
drwx-----T   2 kiran      users           96 Dec  3 10:03 learn

How to unset sticky bit:

$ chmod -t learn

or

$ chmod 0700 learn


if 4000 = set uid  ---> directories with set Gid permission will force all files and sub-directories created in them to be owned by the directory group and not the group of the user creating the 
file.
2000 = set Gid  --> setuid permission set on a directory is ignored on UNIX. Set UID allows an executable to be run with the privilages of the executables owner.



Thanks...
Kiran Jadhav


**Let's Share our knowledge and keep visiting here**


Tuesday, December 2, 2014

Command to check when root password was changed - HPUX

Command to check when root password was changed:

myserver:/> /usr/lbin/getprpw -m spwchg root
spwchg=Fri Nov  7 09:06:37 2014


orgetprpw -m spwchg {username}

where:

-m  Displays the value for the argument passed

spwchg - last sucessful password change time


We can use following parameters  with -m option.

      uid        - get the users uid

      mintm      - get the minimum time between password changes

      maxpwln    - get the maximum password length for this user

      exptm      - get password expiration time

      lftm       - get password lifetime

      upwchg     - last unsucessful password change time

      acctexp    - get account expiration time

      llog       - last login time interval


      expwarn    - password expiration warning time


Thanks for reading!

Kiran Jaddhav