Labels

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

Thursday, June 26, 2014

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

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

   Device name       Size   

        681                    30GB   
        684                    30GB   

Here Device name/Lun id is 681 and 684.

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 disk46
brw-r-----   1 bin        sys          1 0x000012 Sep 20 16:57 disk43
brw-r-----   1 bin        sys          1 0x00000e Sep 13 15:36 disk38
brw-r-----   1 bin        sys          1 0x00000f Sep 13 15:36 disk39

See the timestamp to identify newly added disks.

4.       #ioscan –m dsf   

5.       #ioscan -m lun  

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


7.       # /usr/local/bin/inq.HPUXIA64 -clariion -no_dots

/dev/rdisk/disk35   :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    41943040:   4: 2a2:ASSIGNED
/dev/rdisk/disk36   :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    31457280:   5: 2a4:ASSIGNED
/dev/rdisk/disk37   :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    20971520:   6: 2a6:ASSIGNED
/dev/rdisk/disk38   :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    52428800:   0: 2a1:ASSIGNED
/dev/rdisk/disk39   :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    31457280:   1: 2a3:ASSIGNED
/dev/rdisk/disk40   :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    31457280:   2: 2a5:ASSIGNED
/dev/rdisk/disk41   :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    20971520:   3: 2a7:ASSIGNED
/dev/rdisk/disk43   :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    31457280:   7: 2a9:ASSIGNED
/dev/rdisk/disk46   :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    31457280:   8: 2ac:ASSIGNED

Device name/Lun id will be given by storage team. Here 2ac will be our device name/Lun id which is in hex. Convert it into decimal
2ac in hex=684 in Dec


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

        STATUS INFORMATION FOR LUN : /dev/rdisk/disk46

Generic Status Information

SCSI services internal state                  = UNOPEN
Device type                                   = Direct_Access
EVPD page 0x83 description code               = 1
EVPD page 0x83 description association        = 0
EVPD page 0x83 description type               = 3
World Wide Identifier (WWID)                  = 0x6006016076d02100d526f620b9e3e011


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


Note: If we have OS other than 11.31 then will be not able to use this command.

Wednesday, June 25, 2014

Whats new in HP-UX 11i v3 March 2014 release

HP-UX 11i v3 March 2014 release (Update 13):


1. Among the enhancements available in the new HP-UX release is expanded memory support on HP servers. With the HP-UX 11i v3 Update 13 release, virtual machines of up to 32 processor cores and 256 GB of memory can be utilized.

2.  For HP's high-end Superdome servers, HP-UX also now supports Soft Reboot, which cuts restart times by about 50 percent when upgrading the operating system. Administrators can take a clone of the system disk, apply any patches, flip a switch and boot from new system image without having to do a complete restart from cold. leverage HP's Soft Reboot technology on Integrity i4 server blades to cut reboot times in half, and reconfigure virtualized I/O without any downtime.

Thanks...
Kiran Jadhav

**Let's Share our knowledge**

Friday, June 20, 2014

Basic difference between Trusted and Non-trusted System HPUX

 An HP-UX system is trusted if the file /tcb/files/auth/system/default is present. If that file is not present, then the system is not a trusted system.

The basic difference is:

Non-trusted - encrypted passwords are stored in the /etc/passwd file, which is world-readable.
              Potentially anyone could grab that file and run crack or some other password cracking utility against it.

Trusted - encrypted passwords are NOT stored in /etc/passwd. They are instead stored in files in the /tcb/files/auth/ directory structure which is only readable by root.

Other advantages are that you have more control over when passwords expire, you can disable accounts after X number of bad logins in a row, etc.

 I think it is definitely worth it to have the system be trusted.

----------------------
For command line:
To convert
# /usr/lbin/tsconvert
To unconvert
# /usr/lbin/tsconvert -r

---------------------------

Few Commands:

getprpw - get protected password database

/usr/lbin/getprpw - it displays protected password database for specific username

modprpw - modify protected password database

unlock / enable / reactivate:
/usr/lbin/modprpw -k

lock / expire password:
/usr/lbin/modprpw -e

Note:
-E This option is specified WITHOUT a user name to expire all user’s passwords. It goes through the
protected password database and zeroes the successful change time of all users. The result is all
users will need to enter a new password at their next login.
May be combined with the -l option.

-e This will expire specific username password

/usr/lbin/modprpw -k       (This re-activates accounts)

/usr/lbin/modprpw -v       (This resets age.)

Note:
-V This option is specified WITHOUT a user name to "validate/refresh" all user’s passwords. It goes
through the protected password database and sets the successful change time to the current time for
all users. The result is that all user’s password aging restarts at the current time. 

-v This "validate/refresh" the specified user’s password. It sets the successful change time to the current time. Can be combined with the -l and/or -m options.



Thanks...
Kiran Jadhav

**Let's Share our knowledge**


Wednesday, June 11, 2014

Root Disk mirroring on Integrity servers (HPUX 11.31)

Root Disk mirroring on Integrity servers (HPUX 11.31)

Please take below few outputs before proceeding:

#lvlnboot –v

# cat /stand/bootconf

#ioscan –m dsf |egrep ‘p1|p2|p3’

1.            Use the following commands to determine the size of the EFI, HP-UX, and HPSP partitions in megabytes on the current boot disk:
# /usr/sbin/diskinfo -b /dev/rdisk/boot_disk_p1 | awk '{print $1 / (1024)}'    
# /usr/sbin/diskinfo -b /dev/rdisk/boot_disk_p2 | awk '{print $1 / (1024)}'
# /usr/sbin/diskinfo -b /dev/rdisk/boot_disk_p3 | awk '{print $1 / (1024)}'


2.            Identify a disk that is not currently in use to be used as the mirror. This EFI partition should be as large as the EFI partition on the current disk. The HP-UX partition should be large enough to hold all the logical volumes in the clone. Although the HPSP partition is optional, if it is created, it should be the same size as the HPSP on the clone.


3.       Create a temporary file, for example /tmp/partitionfile , containing the number of partitions and the size of each partition to be created on the mirror disk. Use the information from steps 1 and 2 to determine partition sizes. Here is a sample command to create the file, indicating three partitions with an EFI partition size of 500 MB, an HPSP partition size of 400 MB, and the remaining space allocated to the HP-UX partition:

# print '3\nEFI 500MB\nHPUX 100%\nHPSP 400MB' > /tmp/partitionfile

See idisk(1M) for more information about partitioning disks.
4.       Use the file created in step 3 to partition the mirror disk with idisk .

(The echo will reply to the confirmation request from the idisk command.)

# /usr/bin/echo yes | idisk -wf /tmp/partitionfile /dev/rdisk/mirror_disk
/tmp/partitionfile may be removed if desired.

# /usr/bin/echo yes | idisk -wf /tmp/partitionfile /dev/rdisk/disk140

Check it by using command:

5.       Use ioscan –fnkC disk to determine the hardware path to the mirror disk.
  1. Use the insf command to create device files for all the newly-created partitions:
# /usr/sbin/insf -e -H hardware_path_to_mirror_disk

7.       Run the pvcreate command on the character device file for the HP-UX (second) partition of the mirror disk using the -B option to make the disk bootable and the -f option to overwrite any pre-existing data on the disk:
# /usr/sbin/pvcreate -f -B /dev/rdisk/mirror_disk_p2

8.       Extend the root volume group to the HP-UX partition of the mirror disk using the block device file of the second (HP-UX) partition in the following command:

# /usr/sbin/vgextend /dev/vg00 /dev/disk/mirror_disk_p2

9.       Run mkboot to complete the setup of the disk as a boot disk. The -e option tells mkboot to use EFI layout, and the -l option tells mkboot that this volume will be used by a volume manager even if it is not currently used by one.


NOTE:
No partition number is given to this command; it looks at the whole disk.
  1. # /usr/sbin/mkboot -e -l /dev/disk/mirror_disk
  1. Create a temporary AUTO file and use the efi_cp command to copy it to the mirror using the block device of the first (EFI) partition. The –lq option ensures that the system will boot without quorum. In the event of the primary boot disk failing, this will allow the mirror disk to boot.
# print 'boot vmunix -lq' > /tmp/AUTO
# /usr/sbin/efi_cp -d /dev/disk/mirror_disks2_p1 /tmp/AUTO /EFI/HPUX/AUTO
Finish with (for either) the following:  # /usr/bin/rm /tmp/AUTO

12.   Starting with the boot, swap, and root logical volumes, run lvextend to mirror each logical volume:

# /usr/sbin/lvextend m 1 /dev/vg00/lvol1 /dev/dsk/mirror_disk_p2
# /usr/sbin/lvextend m 1 /dev/vg00/lvol2 /dev/dsk/mirror_disk_p2 . .  . . .  . . .  . . .  . . .  . . .

Note down all LV name in /tmp/lvanme file.

13.   Run the following lvlnboot commands to re-establish LVM’s knowledge of the root and boot file systems and primary swap and dump.

# /usr/sbin/lvlnboot -b /dev/vg00/lvol1
# /usr/sbin/lvlnboot -r /dev/vg00/lvol3                  
# /usr/sbin/lvlnboot -s /dev/vg00/lvol2                  
# /usr/sbin/lvlnboot -d /dev/vg00/lvol2                    
# /usr/sbin/lvlnboot –R
  1. Add the block device special file of the HP-UX (second) partition of the mirror to the /stand/bootconf file. The lower case l in the following command indicates that the disk is managed by LVM or VxVM.
# /usr/bin/echo "l /dev/disk/mirror_disk_p2" >> /stand/bootconf
  1. If desired, set the alternate boot path to the mirror_disk , using the hardware address determined in step 5. For HP-UX 11iv3, you can just use the block device special file name.
# /usr/sbin/setboot -a mirror_disk
  1. If the mirror disk includes an HPSP partition, use the efi_fsinit command on the character device file for the HPSP (third) partition to initialize it with an EFI file system:
# /usr/sbin/efi_fsinit -d /dev/rdisk/mirror_disk_p3


Thanks...
Kalyanjit

**Let's Share our knowledge**


Thursday, June 5, 2014

WARNING: scopeux is not active (MWA data collector) + hpux

MWA: Some Measureware processes are not running.

1. Logon to the system that reported the error message and check the log file for any errors reported, as stated in the request description

# more /var/opt/OV/log/OpC/AO_MWA_status.log

Check the measureware agent status:
 # /opt/perf/bin/mwa status
MeasureWare scope status:
WARNING: scopeux    is not active (MWA data collector)

MeasureWare background daemon status:
(Should always be running when the system is up)
    Running ttd                   (Transaction Tracker daemon) pid 28872

MeasureWare server status:
    Running alarmgen              (alarm generator) pid 1866
    Running agdbserver            (alarm database server) pid 1865
    Running perflbd               (location broker) pid 314

    The following data sources have running repository servers:
                            PID  DATA SOURCE
    Running rep_server     1863  SCOPE

2. If it is found that any of the mwa daemon is not running, do a stop and start of mwa.

# /opt/perf/bin/mwa stop

# /opt/perf/bin/mwa start

3. Confirm the MWA agent daemons are running with the mwa status command.

4. If a normal restart of MWA fails, do the following:

Stop MWA and OPC

# mwa stop all 

Shutting down OVPA collection software
         Shutting down scopeux, pid(s) 2493
         Waiting on 2493  (10 more tries)
         The OVPA collector, scopeux has been shut down successfully.
NOTE:   The ARM registration daemon ttd will be left running.

OVOA is running. Not shutting down coda

Shutting down the OVPA server daemons

         Shutting down the perflbd process

         perflbd process terminated

         The agdbserver process terminated

         Shutting down the rep_server processes
kill: 5133: The specified process does not exist.

         The rep_server processes have terminated

         The OVPA Server has been shut down successfully


# opcagt -kill

Check for still running opc processes:

# ps -ef |grep opc
If so, kill them (except on nlxsl088!!! This is the OPC Server!)

# kill

Start MWA and OPC again and check if it is running...

# opcagt -cleanstart

# opcagt -status

# mwa start all


6. # mwa status


Note : MWA rep_server takes a long time to start, so be patient :-)


Thanks...
Kalyanjit

**Let's Share our knowledge**

Wednesday, June 4, 2014

VG recreation steps in HPUX

VG recreation steps:

Backup your DATA of that volume group on tape or disk.
1. # ll /dev/vgxx/group
To get major & minor number

2. # bdf |grep -i vgxx
To get FS details (current sizes of your FS) of vgxx.

3. #vgdisplay -v vgxx|more
to get PV device names cXtYdZ & lv details etc.

4. #vgdisplay -v vgxx|grep -i  vgxx|grep -v alternate  > /tmp/vgxx.disks
To get number of disks present in vgxx & redirect it to /tmp/vgxx.disks

5. #umount
unmount all filesystems in that vg

6. # vgchange -a n /dev/vgxx
Deactivate vgxx

7. # vgexport /dev/vgxx
Export vgxx. Exporting a VG means the following: remove the VG and corresponding PV entries from /etc/lvmtab and remove the VG directory with their device files in /dev. Again - the data on the disks is left unchanged.

8. # mkdir /dev/vgxx
Create vgxx directory under /dev

9. # mknod /dev/vgxx/group c <64ie .major="" no.=""> <0xyy0000 ie.="" minor="" no.="">
By which LVM kernel & LVM command communicates within the vgxx. Which you will get from step 1

10. #pvcreate /dev/rdsk/cxtxdx
Create the LVM structure on all disks of vgxx. You will get the disks information from step 4.

11. #vgcreate -e -s -p <255_no_of_pvs> -l <255_no_of_lvs> vgxx /dev/dsk/cxtxdx
-e: to set value of max_pe
Formula: -e * -s = Size of disk; Hence this para is very useful

12. #lvcreate -L -n /dev/vgxx
In vg rebuild use -L option instead of -l option. You will get this info from step 3.
If striping is used then u have to use:
-i: No. of disk to stripe across
-I: Stripe size

13.# newfs -F vxfs -o largefiles -b 8192
To create Metadata structure

14. # mkdir
Create Mount point

15. mount
Mount all Filesystem

16. vgextend /dev/vgxx
To create the Alternate links if they were present. You will get this info from step 3.


17. Then restore data to new vg.


Thanks...
Kirraan Jadhav