EFI & service partition : How to create ?

1. # vi /tmp/partitionfile
3
EFI 500MB
HPUX 100%
HPSP 400MB
>>then save the file.
2. idisk -wf /tmp/partitionfile /dev/rdsk/c2t0d0 (boot disk path)
3.insf -e
4. pvcreate -fB /dev/rdsk/c2t0d0s2 (boot disk path)
5. mkboot -e -l /dev/dsk/c2t0d0

Itanium server boot disk Architecture


Pre & post maintenance steps for App/ DB Maintenance in cluster environment


Pre maintenance 

1. Check the cluster status
   # cmviewcl –v

  Check the package status
   # cmviewcl –v –p <package_name>   ( node01)
  Ths out put will give package status and on which node package is running and also list the alternate
 node package can run.

For e, g
# cmviewcl -v -p pkg01 ( node01 )

    PACKAGE      STATUS       STATE        AUTO_RUN     NODE        
    pkg01               up                 running       disabled             node01    

      Policy_Parameters:
      POLICY_NAME     CONFIGURED_VALUE
      Failover        configured_node
      Failback        manual

      Script_Parameters:
      ITEM       STATUS   MAX_RESTARTS  RESTARTS   NAME
      Subnet     up                                10.35.73.0

      Node_Switching_Parameters:
      NODE_TYPE    STATUS       SWITCHING    NAME                      
      Primary      up           enabled      node01     (current)   
      Alternate    up           enabled      node02             

Looks for current in the NAME option that is considered to be primary node.
In the above package pkg01, the primary node is node01 and Alternate node is node02

2.display the mounted file system
#bdf  |grep /dev/ vg01_clutervg (cluster vg)

Collect all the  mounted File Systems  and its mount points in a  TEXT  file for the associated  package , here node01 ;This text file will be used for mounting and unmounting  the file systems asmay be needed by DBA.

3. Halt the package.
# cmhaltpkg –v  <package_name> node01
# cmhaltpkg –v node_02

Monitor the package log file:
# tail –f /etc/cmcluster/<OC pkg Name>/<Oc Pkg Name>.cntl.log

When package hs been successfully started, verify it:
#cmviewcl –v –p <OC Pkg Name>

4. Change Volume Group to Exclusive Mode:   #### This is to write into the disks
# vgchange –a e /dev/<vgname> (/dev/vg01_clutervg)

5.Mount the filesystesm
# mount /dev/vgname/lvol1   /mountpint

Detail list of mountpoints Information can be found on the MCSG control script    
Cat /etc/cmcluster/<pkgname>/<pkgname>.ctrl
OR  Use the Text file created  earlier in step # 3.

6. Verify all the file system has been mounted
   #bdf
=============================================================

Now we can ask DB/ app team to start the maintenance

=============================================================
Once activity done by DB team

Post maintenance

1. Unmount filesystesm
    # umount /mountpoint

Information can be found on the MCSG control script
/etc/cmcluster/<pkgname>/<pkgname>.ctrl

# bdf  /dev/vg01_clutervg*      #### Just to make sure that the file system is not being mounted.


#### Deactive the vg02_clustervg ######
# vgchange –a n /dev/vg01_s1

2. Start the package on the node

Start package when ready:

#cmrunpkg  <Package> <Node Name>

EX : cmrunpkg –v –n node02 node01

Monitor the package log file:
# tail –f /etc/cmcluster/<OC pkg Name>/<Oc Pkg Name>.cntl.log

# cmmodpkg  -v –e node01     #### To enable the package in auto enable mode

Monitor the package log file:
# tail –f /etc/cmcluster/<OC pkg Name>/<Oc Pkg Name>.cntl.log

When package hs been successfully started, verify it:
#cmviewcl –v –p <OC Pkg Name>

Cluster & pakage creation steps in MC service gurad

Here i am going to provide a brief steps only. I posted this with interview preparation point of view.This may help you while attend the interview. In interview most of the time you need to tell the steps only.

Go thrw it..All the best..


Clustering Steps :
  1. edit .rhosts file entries of both node
  2. cd /etc/cmcluster
  3. cmquerycl -C cmclconf.ascii -n node1 -n node2   -->to build cluster config file
  4. edit /etc/cmcluster/cmclconf.ascii (enter cluster name & parameter)
  5. ftp /etc/cmcluster/cmclconf.ascii  (to another node)
  6. vgchange -a y /dev/vg01    (activate volume group)
  7. cmcheckconf -C cmclconf.ascii
  8. cmapplyconf -C cmclconf.ascii
  9. cmcruncl
 10. cmviewcl
 
Package Creation Steps :
 
  1. mkdir /etc/cmcluster/pkg_name
  2. cmmakepkg -p /etc/cmcluster/pkg_name/pkg_name.conf
  3. edit /etc/cmcluster/pkg_name/pkg_name.conf  (enter package parameters)
  4. cmmakepkg -s /etc/cmcluster/pkg_name.cntl
  5. edit /etc/cmcluster/pkg_name.cntl
     enter volume group ip add. services start & end customer defined functions
  6. copy both files to another node /etc/cmcluster/pkg_name
  7. cmcheckconf -C /etc/cmcluster/cmclconf.conf -p /etc/cmcluster/pkg_name/pkg_name.conf
  8. cmapplyconf -C /etc/cmcluster/cmclconf.conf -p /etc/cmcluster/pkg_name/pkg_name.conf
  9. cmrunpkg -v pkg_name
 10. cmmodpkg -e pkg_name
 11. cmviewcl

Autoboot using the EFI shell :how to set?


Enable / Disable autoboot using EFI shell

shell>autoboot on

shell>autoboot off

Enable/disable using "setboot" command

# /usr/sbin/setboot -b on (For enable)
# /usr/sbin/setboot -b off (For Disable)

 To set the autoboot delay to 30 seconds, use the EFI Shell command:

shell> autoboot 30

By use of EFI boot manager:
1.    Select “Boot Option Maintenance Menu” from the boot manager’s main menu
2.    Select “Auto Boot TimeOut” from the boot option maintenance menu
3.    Select “Set TimeOut Value
4.    Enter the number of seconds you want to use for the boot delay (for example 30).

Extending root file system in HP UX

LVM maintenance mode is not going to help you in this. The problem is that the /stand, swap and /
(the root file system), all need to be contiguous. In order to increase /, you would have to move the lvol
containing /home.
The easiest way to do this is to make an ignite backup tape, boot off it and resize your root logical
volumes at that point.

You can not extend as there is no contigous space available for extending the root volume !

Ignite is the best and safe. Still if you wanna do some LVM tasks, I have documented how to increase
/stand in the following thread. With some slight modifications u can use it for root filesystem as well. I
have tested and it works fine

Here i have adjusted the size of SWAP a bit so that it could be successfully added to the /stand
filesystem ... As you have root filesystem it is more simple as you may have /var or /opt to be moved a
little further and then increase root filesystem.

The Logic is as follows

1. Goto LVM Maintanance Level
2. Find out the next lvol after root lvol
3. Create a similier one somewhere else in the rootvg and create fs on it.
4. Transfer the data to the new filesystem
5. Remove the old filesystem and lvol.
6. You will have contigous space for extending root lvol now !
7. Extend it and resize the filesystem with extendfs
8. Compensate the /etc/fstab as you have changed the device file !
9. Update BOOT,ROOT,SWAP and dump definitions using lvlnboot

REBOOT !!!!!

This is really interesting ... why don't you try this after taking an ignite backup ? If u do a mistake u can
always go back to your ignite !

Notes :- This method will save lots of time ! BUUUUUT never go for this first time w/o a proper
backup !!!!!

EXTENDING BOOT /stand

01. You are not just an "HP kid" who will play with ignite like stuff.

02. You like taking some risk & saving your valuable time

Size of /dev/vg00/lvol1 is A (boot or /stand or /dev/vg00/lvol1)

Size of /dev/vg00/lvol2 is B (swap or /dev/vg00/lvol2)

You wanna increase size of lvol1 from A to A+X (where X is not more than B - "physical memory
installed in your machine")

Basically we have to decrease size of swap to increase boot as they are contigous.

Now Extending /stand is an easy job which can be performed in 10-15 minutes.

Steps

01. Boot your machine in LVM maintenance mode
(hpux -lm at ISL>)

#rm /etc/mnttab
#vgchange -a y /dev/vg00
#lvrmboot -r /dev/vg00
#lvremove /dev/vg00/lvol2
#lvextend -L "A+X" /dev/vg00/lvol1
#extendfs /dev/vg00/rlvol1
#lvcreate -L "B-(X+10)" -C y -r n -n lvol2 /dev/vg00
#lvlnboot -b /dev/vg00/lvol1
#lvlnboot -r /dev/vg00/lvol3
#lvlnboot -s /dev/vg00/lvol2
#lvlnboot -d /dev/vg00/lvol2
#reboot -r

You have your /stand extended now

This is a working solution i have tried & found success

Installed date using swlist command:How to get ??

Run the below command to get the installed date

#swlist -l fileset -a revision -a title -a state -a install_date

———Sample output ——
# vmGuestLib B.04.00 Integrity VM vmGuestLib 200903081306.51
vmGuestLib.GUEST-LIB B.04.00 Integrity VM GUEST-LIB fileset 200903081306.51 configured
# vmProvider B.04.00 WBEM Provider for Integrity VM vmProvider 200903081306.59
vmProvider.VM-PROV-CORE B.04.00 WBEM Provider for Integrity VM VM-PROV-CORE 200903081306.59 configured

Serial number of a disk in Hp Unix :How to get ?

Only Serial No.

# echo "selclass qualifier hard;info;wait;infolog"|cstm|grep "Serial Number"

Serial No. & other Information.

# echo "selclass qualifier hard;info;wait;infolog"|cstm

Various log files in HP Unix

1:- Syslog, Old Syslog & mail log

# ll /var/adm/syslog/
-rw-r--r--   1 root       root         29143 Mar  4 14:08 OLDsyslog.log
-r--r--r--   1 root       root           32271 Jun 29 01:26 mail.log
-rw-r--r--   1 root       root         1996112 Jun 29 11:36 syslog.log

2:- Event Log

#ll /var/opt/resmon/log/

lrwxr-xr-x   1 bin   bin    27 Mar 19  2004 api.log -> /etc/opt/resmon/log/api.log
lrwxr-xr-x   1 bin   bin    30 Mar 19  2004 client.log -> /etc/opt/resmon/log/client.log
-rw-r--r--   1  root  root   210813 Jun 29 01:26 event.log
-r--r-----   1   root   root   501871 Apr  4  2004 event.log1
-r--r-----   1   root   root   500326 Jan  2 04:54 event.log2
lrwxr-xr-x  1 bin   bin    33 Mar 19  2004 registrar.log -> /etc/opt/resmon/log/registrar.log

Who Rebooted the server?

Who Rebooted the server?

Please check these following files before judge who that rebooted your server:

1. /var/adm/crash
2. /etc/shutdownlog
3. /var/tombstones/ts99
4. /var/opt/resmon/log/event.log


If there is nothing indication that come from the above files, then it is probably because of a power failure occured for a short time.

#vi .sh_hystory then Esc-Shift-G to go the end of line




If you forget the root password in hp Unix ?

Recover root password in HP Unix

While boot the server Interact the normal boot and,
>boot
Interact with IPL ? Y
ISL>hpux -iS
passwd root

>>enter the new passwd


Convert to trusted system : How to ?

To convert the system into  trusted system the command is :

# /usr/lbin/tsconvert 

After converting it will create a directory /tcb/files/auth/*/*

Note: before converting into trusted system you have to modify /etc/nsswitch.conf file. In that file "passwd  compact " has to be changed into "passwd files"

To unconvert the trusted system with the following command:

    # /usr/lbin/tsconvert –r


Linux useful commands wall paper


Linux useful commands wall paper


Recover deleted (shift+delete) items

Procedure:

1)      First go to Run and type regedit

2)      Go to:
\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\EXCHANGE\CLIENT\OPTIONS registry key.

Shot cut keys : Helpfull to Everyone

Posted by Picasa

Common NFS errors & solutions

Common NFS errors & solutions:

1."Server Not Responding" Message
2.  "Access Denied" Message
3."Permission Denied" Message
4.  "Device Busy" Message

Error 1: If You Receive an NFS "Server Not Responding" Message

ping the nfs server from client

1.ping "nfs serer name or ip"

2./usr/bin/rpcinfo -p servername

The rpcinfo command should display the following processes:

    * portmap
    * nfs
    * mountd
    * status
    * nlockmgr
    * llockmgr

If any of these processes is not running, follow the below steps:


a.Make sure the /etc/rc.config.d/nfsconf file on the NFS server contains the following lines:

NFS_SERVER=1
START_MOUNTD=1

b.Make sure that the /etc/inetd.conf file on the NFS server does not contain a line to start rpc.mountd.
If it does, make sure the START_MOUNTD variable in /etc/rc.config.d/nfsconf is set to 0.

c.Issue the following command on the NFS server to start all the necessary NFS processes:

#/sbin/init.d/nfs.server start

Error 2: If You Receive an "Access Denied" Message

a.check the FS is exported or not

#/usr/sbin/showmount -e server_name

(If it is not exported means u have to edit /etc/exports file in NFS server and put the necessary entry and
then run the command
/usr/sbin/exportfs -a)

Error 3 :If You Receive a "Permission Denied" Message

a.Check the mount options in the /etc/fstab file on the NFS client. A directory you are attempting to write to may have
been mounted read-only.

b.Issue the ls -l command to check the HP-UX permissions on the server directory and on the client directory
that is the mount point. You may not be allowed access to the directory.

c.Issue the following command on the NFS server:

/usr/sbin/exportfs

Or, issue the following command on the NFS client:

/usr/sbin/showmount -e server_name

d. Check the export permissions on the exported directory. The directory may have been exported read-only to your client.
The system administrator of the NFS server can use the remount mount
option to mount the directory read/write without unmounting it

Error 4 : If You Receive a "Device Busy" Message

a.If you received the "device busy" message while attempting to mount a directory, try to access the mounted directory.
  If you can access it, then it is already mounted.
 
b.If you received the "device busy" message while attempting to unmount a directory, a user or process is currently using the directory. Wait until the process completes, or follow these steps:

 1.Issue the following command to determine who is using the mounted directory:

       /usr/sbin/fuser -cu local_mount_point

   The fuser(1M) command will return a list of process IDs and user names that are currently using the directory
   mounted under local_mount_point. This will help you decide whether to kill the processes or wait for them to complete.

 2. To kill all processes using the mounted directory, issue the following command:

            /usr/sbin/fuser -ck local_mount_point

 3. Try again to unmount the directory.





Backup / Recover using tape in HP Unix


HP-UX offers various commands  to backup file system,

a] dump / restore command (HFS filesystem only)

b] vxdump / vxrestore (vxfs filesystem only)

c] cpio command

d] fbackup / frecover command

e] dd command

f] tar command

g] make_net_recovery or make_tape_recovery commands


1. Backup /data directory to /dev/rmt/0m (tape drive)

# fbackup -i /data -I index.data -f /dev/rmt/0m


# -I index.data : index.data specifies the name of the on-line index file to be generated. It consists of one line for each file backed up during the session. Each line contains the file size, the volume number on which that file resides, and the file name. If the -I option is omitted, no index file is generated.
# -f /dev/rmt/0m : Specify tape device name
# -e /tmp : Exclude /tmp from backup
# -g /var/adm/fbackupfiles/hporabox11.backup.list.txt : File that contains a list of files / dirs to be included / excluded from the tape backup

Using the normal tape location to do a full backup but exclude /tmp and /cdrom /nfs directories, insert a new tape and enter:
# fbackup -f /dev/rmt/0m -i / -e /tmp -e /cdrom -e /nfs -v

2.To view contents of an fbackup tape

Type the following command:
# frecover -f /dev/rmt/0m -x -N -v

3.To verify the tape backup

# frecover -f /dev/rmt/0m -N


Restore from tape
=================

1.To restore all files and directories from tape, enter:
# frecover -f /dev/rmt/0m -r -v

2.To restore selected files or directories use -i /path option. For example, just restore /home/backuptest directory, enter:
# frecover -f /dev/rmt/0m -x -v -i /home/backuptest
    * -r : Recovery all data from tape
    * -x : Extracted / recover selected files / dires only specified by -i option
    * -i /path/to/file : Recover only this file or directory
    * -v : Verbose output


Recommendation before patching

- Ensure you've done full dependency analysis on all the patches to be installed. The ITRC patch systems or swa should do all that for you now.

- Review the "special installation instructions" for all patches that you are to install.

- Ensure there are no unconfigured filesets on the system... something like this should return nothing:
swlist -l fileset -a state | sed -e '/^#.*$/d' -e '/^$/d' | grep -v configured

- ensure that you at least review a run of "swverify \*" - in general you don't need to worry too much about the WARNING levels, but you shoulkd always try and resolve the ERROR levels.

- if you have non-HP kernel filesets (such as EMC PowerPath or IBM atdd tape drivers), you should always review the patches you are installing, and the patch process with the relevant vendor.

- make sure you have run a "cleanup -d" on the dpot, so you don't have any superseded patches in it.

- always run a preview of the swinstall process and resolve *all* reported issues before proceeding
With those precautions in place you should really never encounter an unbootbale kernel as a result of patching.

Change IP Addresses for service guard cluster

Before you change the IP Address of your Server you must have all new ips ex. Server ip and package ip then you may go for this changes.

Take backup of these directory and files

1./etc/cmcluster
2./etc/hosts
3./etc/rc.config.d/netconf

modify these files

1./etc/hosts # modify ipaddress

2./etc/rc.config.d/netconf # modify ipaddress and subnet

3./etc/cmcluster/cluster.conf # modify HEARTBEAT_IP

4./etc/cmcluster/packge/cipackage.conf # change SUBNET XX.XX.XX.XX

5./etc/cmcluster/packge/dbpackage.conf # change SUBNET XX.XX.XX.XX

6./etc/cmcluster/packge/cipackage.cntl # change IP[0]=XX.XX.XX.XX
change SUBNET[0]=XX.XX.XX.XX

7./etc/cmcluster/packge/cipackage.cntl # change IP[0]=XX.XX.XX.XX
change SUBNET[0]=XX.XX.XX.XX

8.rcp cluster.conf into /etc/cmcluster
rcp cluster.conf into other node same location

9.rcp these conf,cntl and config file into /etc/cmcluster/packge/
rcp ciVRP.conf,dbVRP.conf,ciVRP.cntl,dbVRP.cntl

10. restart the net for new ip
/sbin/init.d/net stop
/sbin/inti.d/net start

check all ipaddress which we have changed and check with linkloop also

11.cmcheckconf -v -C /etc/cmcluster/cluster.conf -P cipackage.conf -P dbpackage.conf
it should come with no error then go for the next step

12.cmapplyconf -v -C /etc/cmcluster/cluster.conf -P cipackage.conf -P dbpackage.conf



Reinstalling grub from single user mode

1. Boot the system from an installation boot medium.

2. Type linux rescue at the installation boot prompt to enter the rescue environment.

3. Type chroot /mnt/sysimage to mount the root partition.

4. Type /sbin/grub-install /dev/hda to reinstall the GRUB boot loader, where /dev/hda is the boot partition
.
5. Review the /boot/grub/grub.conf file, as additional entries may be needed for GRUB to control additional operating systems.

6. Reboot the system.


Adding mirroring to the root vg - HP Unix

  1. pvcreate -B /dev/rdisk/c2t2d0
    • Create the PV on the second disk so that LVM can manage it
    • -B makes it a bootable volume
  2. mkboot /dev/rdsk/c2t2d0
    • Installs the boot files on the second disk
  3. mkboot -a "hpux-lq (;0)/stand/vmunix" /dev/rdsk/c2t2d0
    • Creates an autoboot file on the disk, with information on how to boot
  4. vgextend /dev/vg00 /dev/dsk/c2t2d0
    • extends the volume group to include this second disk.
  5. vgdisplay -v vg00
    • To verify that the second disk is now part of the volume group
  6. lvlnboot -v
    • To verify that the system thinks this disk can boot
  7. lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t2d0
    • This extends the logical volume to the mirrored disk, effectively creating the mirrored copy.
    • This command needs to be run for each logical volume in the volume group


Make the luns visible to the server as disk devices.

The steps for this are:

  • Determine what the server sees now - the "before" picture"
    • ioscan -fnkC disk 
  • Scan for new disk devices - this should be the luns allocated from the san (the will be just a hardware path and will not have a device file yet)
    • ioscan -fnC disk
  • Create the device files
    • insf
  • Check to make sure the the luns now have device files associated with them
    • ioscan -fnC disk
  • Use the xpinfo command from HP to list the device to lun association (available with the HP "XP" series of sans).
    • xpinfo -il 

Add a Lun to a VG in a SG cluster 11.11/23

Once disk presented to host,
# pvcreate /dev/rdsk/cxtxdx
# vgextend /dev/vgname /dev/dsk/cxtxdx
# lvcreate -L /dev/vgname/lvname
# newfs -F vxfs -o largefiles /dev/vgname/rlvname
# cp -p /etc/cmcluster/pkgname/pkg.cntl /etc/cmcluster/pkgname/pkg.cntl.org
# vi /etc/cmcluster/pkgname/pkg.cntl
LV[33]=/dev/vgname/lvname; FS[33]=/oracle/ABN/sapdata20; FSMOUNT_OPT[33]="-o convosync=direct,mincache=direct,delaylog,nodatainlog"
(Add newly create Logical volume to pkg.cnt.file)

# vgexport -p -s -v -m /tmp/vgname.map /dev/vgname
# rcp /tmp/vgname.map nodee2:/tmp/vgname.map
# cp -p /etc/cmcluster/pkgname/pkg.cntl /etc/cmcluster/pkgname/pkg.cntl.node2
# rcp /etc/cmcluster/pkgname/pkg.cntl.node2 nodee2:/tmp/
(mount the mount point manually on the node where the vg is active now)

# mount -o convosync=direct,mincache=direct,delaylog,nodatainlog /dev/vgname/lvolname /oracle/ABN/sapdata20

On Adoptive Node :-
# vgexport /dev/vgname
# mkdir /dev/vgname
# ll /dev/vg*/group
# mknode /dev/vgname/group c 64 0x0X0000
# vgimport -p -s -v -m /tmp/vgname.map /dev/vgname -> (preview) if no error proceed below by removing -p
# vgimport -s -v -m /tmp/vgname.map /dev/vgname
# cp /tmp/pkg.cntl.node2 /etc/cmcluster/pkgname
# cp -p /etc/cmcluster/pkgname/pkg.cntl /etc/cmcluster/pkgname/pkg.cntl.org
# mv /etc/cmcluster/pkgname/pkg.cntl.node2 /etc/cmcluster/pkgname/pkg.cntl

Extending a VxFS Filesystem (No Online JFS)

Extending a VxFS Filesystem (No Online JFS)
  1. Verify that there is enough space in the volume group
    • vgdisplay <VG Name>
    • If there is not enough space then the volume group must be extended - see procedure below.
  2. First lvextend the logical volume - 2 Options for lvextend:
    1. lvextend -L <New Size in MB> /dev/VG_NAME/LV_NAME
    2. lvextend -l <NEW Size in # of LEs> /dev/VG_NAME/LV_NAME
  3. Unmount the filesystem
  4. extendfs -F vxfs /dev/<VG_Name>/r<LV_Name>
    • Note:  extendfs uses the raw logical volume name (ie rlvol1)

How to determine if you have Online JFS
  • swlist -l fileset | grep -i advanced
How to determine the filesystem type
  • grep <mount point> /etc/fstab
  • Results should show the filesystem type (vxfs or hfs) in the return string

Extending a VxFS Filesystem (Online JFS)

  1. Verify that there is enough space in the volume group
    • Check the volume group for enough space
      • vgdisplay <VG Name>
    • Check the logical volume to determine if mirroring or striping is in effect
      • lvdisplay /dev/vg_name/lv_name
    • If there is not enough space then the volume group must be extended - see procedure below.
  2. First lvextend the logical volume - 2 Options for lvextend:
    1. lvextend -L <New Size in MB> /dev/VG_NAME/LV_NAME
    2. lvextend -l <NEW Size in # of LEs> /dev/VG_NAME/LV_NAME
  3. fsadm -F vxfs  -b <new size of filesystem in K> <MOUNT POINT>
    • NOTE:  extendfs will NOT work with Online JFS, you must use fsadm
    • NOTE:  new size of the filesystem = <# of LEs> * <LE Size in MB> * 1024
    • NOTE:  If lvextend -L was used simply multipy size in MB by 1024
    • NOTE:  If this FAILS with errno 28, then the filesystem is 100% full and must be reduced to less than 100%.
    • NOTE:  If this FAILS with "write failure at block XXXXXXXX : No such device or address" then the new size may be too big, use a smaller number

Create a new file system in HP Unix

Create a new filesystem:
(A new filesystem will require a new logical volume)
  1. Create the Logical Volume (Procedure Below)
  2. Create the File System
    • Using newfs:
      1. newfs -F <filesystem_type> <path_to_lvol_devicefile>
      2. newfs -F vxfs /dev/vg02/lvol1
    • Using mkfs:
      1. mkfs -F <FILESYSTEM TYPE> -o bsize=<OPTIONS>,<OPTIONS> <PATH TO LV>
        1. -F is filesystem type, such as vxfs for the Veritas File System or JFS
        2. -o are options, such as bsize (Block Size) and largefiles.
        3. Path to LV is of the form /dev/VGNAME/LVNAME
      1. For example:  "mkfs -F vxfs -o bsize=8192,largefiles /dev/bgbill/lvbill"
  3. Create the Mount Point
    1. mkdir -p <full path to mountpoint>
    2. -p will make any subdirectories in the path that do not already exist
  4. Set the proper ownership and permissions on the mount point
    1. chown owner:group /<mount point>
    2. chmod XXX /<mount point>
  5. Mount the File System
    1. Edit /etc/fstab using vi and add the proper entry
      1. <LV PATH> <MOUNTPOINT PATH> <FILESYSTEM> <OPTIONS> <BACKUP FREQUENCY> <PASS NUMBER>
      2. For example:  "/dev/vgbill/lvbill  /maindir/subdir/share vxfs rw,suid,largefiles,delaylog,datainlog 0 2"
    2. "mount /<mountpoint>" to mount the file system
  6. Test
    1. Do a "bdf <mount point>".    This command will show if the file system is mounted, and it's size.
    2. Do an "ls -ld <mount point>" to verify that the proper permissions are there.
    3. Have the user test the filesystem, and report back with any problems

Difference : HPUX 11iv2 and 11iv3


  • Major difference is benifit of agile naming view of device files. Both legacy and persistent can be used simultaneously to access mass storage devices. It meant auto multipathing using persistent dsf was new in 11iv3. Multipathing concept was always there from begining, but were done manually using vgextend and all.
  • dvd clon
  • ioscan -m dsf
  • persistant and legacy names
  • nwmgr
  • swconfig
  • check_patches
  • LVM v.2 volume group
  • lvmadm -t

Windows 2000 vs Windows 2003..

2000:

· There is Active Directory
· Tree/Forest Hierarchical Structure are available
· There is Site Relationship is available
· There is parent domain and child domain concept are available
· 2000 Support NTFS 5.0 file system
· 2000 Support Kerberos version 5.0 authentication protocol
· In 2000 by default Two-way Trust Relationship are configured
· In 2000 we will use Group Policy
· 2000 support maximum 32 Processor and 64 GB Ram
· In 2000 Specific client site operating system is available i.e. 2000 Professional
· In 2000 we will use Exchange 2000 server
· In 2000 no stub zone is available in DNS
· In 2000 Resultant Setup Policy is not available
· In 2000 GPMC is not available
· In 2000 Conditional forwarding option is not available
· In 2000 Effective Permission option is not available
· In 2000 only some Administrative Command Line Tools are available
· Active Directory saved query option is not available
· Shadow copy Option is not available in windows 2000 Operating System
· ASR Option is not available in Windows 2000 operating System
· In Windows 2000 we can create Maximum 1 DFS Root on a single DFS Server in the network.
· In 2000 we can create two way trust relationship inside the network
2003:
· There is Active Directory
· Tree/Forest Hierarchical Structure are available
· There is site relationship is available
· There is parent domain and child domain concept are available
· 2003 support NTFS 6.0 File system
· 2003 support Kerberos 5.0 Authentication Protocol
· In 2003 we will use group policy
· 2003 support maximum 64 Processor and 64 GB RAM
· In 2003 no specific client site Operating System is available you can use either windows 2000 Professional either

Windows

XP Professional in the network
· In 2003 we will use Exchange 2003 Server
· In 2003 Stub Zone is available in DNS
· In 2003 GPMC is available
· In 2003 Resultant Setup Policy is available
· In 2003 Conditional Forwarding option is available
· In 2003 Effective Permission option is available
· Active Directory Saved Query option is available
· Shadow Copy option is available in Windows 2003 Operating System
· ASR Option is available in Windows 2003 Operating System
· In Windows 2003, we can create more than 1 DFS Root on A single DFS Server in the Network
· In 2003 we can create two way Trust Relationship inside the network

subnet mask and default gateway

Subnet Mask:-

The mask is used to detrmine that which part of IP belonged to network or which part belong to host. E.g. if u have a IP 172.16.25.32 and its subnet mask is 255.255.0.0. then the 172.16 is network part , and 25.16 is host part. If subneting is enable then we can use some bit of host part in network .Subnet mask mainly use in subneting. for above example subnet mask is 255.255.255.0 the nwk address become 172.16.25. and the host part is 32.

Default gateway:-

For a simple LAN there is no use of default gateway, It is used when network communicate with other network. it is just like a Main gate of home when a person wanna go to outside from home or come inside he can only do the same by main gate. Same Concept used here. In network if the packet have address of same address then switch direct forward the packet to its desired destination. And if packet have another network address it should be come out from Default gate way. Basically it reduces the collision.   subnetmask is just used to identify the class of ip address and its is used for subnetting of ip address for eg:-

ipaddress -192.168.1.2
subnetmask- 255.255.255.0
we can find N/W part that is 192.168.1 and Host part that is 2
the class of ip is C

where as default gateway is a ip address given to a router or ASDL modem which is used to communuicate with other N/Ws or internet

During bootup my computer hangs at "Verifying DMI pool data." What is it and how do I fix it?


DMI or DesktopManagement Interface (pdf) is a layer of abstraction between system components and the software that manages them. The System Management BIOS (SMBIOS) is an extension of the Basic Input Output System (BIOS) that formulates and delivers this information to the operating system. The pool data is the information. In short, when the BIOS is "Verifying DMI pool data" it is verifying the table of data it sends to the operating system (Windows, etc.). If it isn't sucessful, it should return an error. Wait a reasonable period of time for it to finish. It may make take some time or it may be stuck.

Possible fixes:

1. If you changed the hardware just before this problem occurred (e.g., installed a new hard disk drive), unchange it.

2. If you installed a new hard disk drive, set the motherboard CMOS Setup to Auto for the drive type. You may have to disconnect the drive first.

3. Enable "Reset Configuration Data" (may be "Force Update ESCD" in some CMOS Setuups) in the motherboard CMOS Setup PNP/PCI configuration. (Rebooting will automatically disabled it after it has done its thing.)

4. The CMOS may be corrupted. Clear it.

5. Disconnect all drives not required to boot the computer. If this fixes it, reconnect one at time.

6. The floppy drive may be bad or not connected properly.

7. Reseat all expansion boards.

8. Pull all boards not required to boot the computer.

Difference between NTFS and FAT32?


a) FAT (FAT16 and FAT32) and NTFS are two methods for storing data on a hard drive. The hard drive has to either be formatted using one or the other, or can be converted from one to the other (usually FAT to NTFS) using a system tool

NTFS is a high-performance and self-healing file system proprietary to Windows XP 2000 NT, which supports file-level security, compression and auditing. It also supports large volumes and powerful storage solution such as RAID.
The most important new feature of NTFS is the ability to encrypt files and folders to protect your sensitive data

NTFS   1)allows access local to w2k,w2k3,XP,win NT4 with SP4 & later may get access for somefile.
2)Maximum size of partition is 2 Terabytes & more.
3)Maximum File size is upto 16TB.
4)File & folder Encryption is possible only in NTFS.

FAT 32       1)Fat 32 Allows access to win 95,98,win millenium,win2k,xp on local partition.
2)Maximum size of partition is upto 2 TB.
3)Maximum File size is upto 4 GB.
4)File & folder Encryption is not possible.

Swapoff in HP Unix

# swapinfo -tam
Mb      Mb      Mb   PCT  START/      Mb
TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
dev       12288       0   12288    0%       0       -    1  /dev/vg00/lvol2
reserve       -     391    -391
memory     1938     628    1310   32%
total     14226    1019   13207    7%       -       0    -
 
# lvcreate -L 1024 -n swap2 /dev/vg01
Logical volume "/dev/vg01/swap2" has been successfully created with
character device "/dev/vg01/rswap2".
Logical volume "/dev/vg01/swap2" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
 
# swapon -p 1 /dev/vg01/swap2
 
# swapinfo -tam
Mb      Mb      Mb   PCT  START/      Mb
TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
dev       12288       0   12288    0%       0       -    1  /dev/vg00/lvol2
dev        1024       0    1024    0%       0       -    1  /dev/vg01/swap2
reserve       -     391    -391
memory     1938     628    1310   32%
total     15250    1019   14231    7%       -       0    -
 
# swapoff /dev/vg01/swap2
 
# swapinfo -tam
Mb      Mb      Mb   PCT  START/      Mb
TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
dev       12288       0   12288    0%       0       -    1  /dev/vg00/lvol2
reserve       -     391    -391
memory     1938     628    1310   32%
total     14226    1019   13207    7%       -       0    -
 
# lvremove /dev/vg01/swap2
The logical volume "/dev/vg01/swap2" is not empty;
do you really want to delete the logical volume (y/n) : y
Logical volume "/dev/vg01/swap2" has been successfully removed.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf

Verify the latest standard patch bundles

HP-UX 11i v1

# swlist -l bundle BUNDLE11i HWEnable11i GOLDBASE11i GOLDAPPS11i

HP-UX 11i v2

# swlist -l bundle BUNDLE11i HWEnable11i FEATURE11i QPKBASE QPKAPPS
 
HP-UX 11i v3
# swlist -l bundle BUNDLE11i HWEnable11i FEATURE11i QPKBASE
 
Verify latest available patches
 
After installing the latest standard patch bundles, that are delivered on a six month schedule, you need to check for the latest available patches for your products. Using any of the available tools to perform patch assestments of your systems will give you detailed information on the patches available.

Configure disk to use for veritas volume manager (VxVM)

1. Detect new disk -> dfsadm, cfgadm -c configure control_number
2. Labeling disk -> format, choose disk number, label
3. Configure disks
# vxdisksetup -i disk_name
or using vxdiskadm -> choose 1. Add or initialize one or more disks
4. make diskgroup
# vxdg init dg_name disk_name=device_name
* vxdg init backupdg backupdg01=Disk_24
5. make volume
# vxassist -g backupdg maxsize
2096883712
# vxassist -g backupdg make backuplv 2096883712
*size=output from vxassist -g dg_name maxsize
6. Start volume
# vxvol -g backupdg startall
7. Make Filesystem
# mkfs -F vxfs /dev/vx/rdsk/backupdg/backuplv
8. Mounting Filesystem
# mkdir /backup
# mount -F vxfs /dev/vx/dsk/backupdg/backuplv /backup
9. Edit /etc/vfstab

Bootup/Shutdown in HP unix

shutdown -r 0 –> reboot
shutdown -h now  –> shutdown and halt
shutdown 0 –> shutdown to single user mode
reboot 0 –> reboot
init 1 – single user mode
hpux -is  boots single user mode

Interupting the boot process:

  • Configuration Menu
  • Information Menu
  • Service Menu

GSP Mode

  • From the console hit <ctrl><b>
  • Hit <Enter> at the GSP console login (default is no password)
  • Now low level commands can be entered
    • ps  –> power status

To reboot to single user mode:

  1. shutdown -r 0
  2. hit <space> during 10 sec window to interrupt reboot
  3. enter: <b><o>
  4. interact with ipl? yes
  5. hpux -is  (i=init, s=single user)

How to relate a failing disk(lun) with its remote port (nport_id)


This is only for legacy HDW paths.
After a problem we had today with our SAN, we where loosing link(milisenconds) to only 1 path
of the four we have:
LVM: Performed a switch for Lun ID = 0 (pv = 0x00000000c0f9c000), from raw device 0x1f170600 (with priority: 0, and current flags: 0x40) to raw device 0x1f0f0600 (with priority: 1, and current flags: 0x0).
from syslog we get the raw device major/minor numer: 0x1f170700
With the minor we get to know our disk:
root:/> ls -l /dev/dsk | grep 170700
brw-r----- 1 bin sys 31 0x170700 May 4 2010 c23t0d7
From the disk the HDW path:
root:/> lssf /dev/dsk/c23t0d7
sdisk card instance 23 SCSI target 0 SCSI LUN 7 section 0 at address 0/0/4/0/0.97.11.19.24.0.7 /dev/dsk/c23t0d7
From the HDW path the san(port info)
0/0/4/0/0 ---> HBA
97.11.19 ---> san(n_port id) info
24.0.7 ---> scsi target lun
Now we need to convert these numers into hex 97.11.19:
97 -> 61
11 -> 0b
19 -> 13
And finally with fcmsutil we can find the nport id using our hex conversion 610b13:
root:/> fcmsutil /dev/td0 get remote all | grep -e 610b13 -e Port
Target N_Port_id is = 0x610b13
Port Type = N_PORT
Target Port World Wide Name = 0x50050763030846e2
So Now you can tell your SAN admins which is the wwn of the failing port.
Check Failed stats:
root:/> fcmsutil /dev/td0 devstat all | grep -E '(Nport|Failed)'
Device Statistics for Nport_id 0x610b13
Failed Open of previously opened device 6
Device Statistics for Nport_id 0x613713
Failed Open of previously opened device 5
Device Statistics for Nport_id 0x750b13
Failed Open of previously opened device 6

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks