Search This Blog

Showing posts with label DB installation in HPUX. Show all posts
Showing posts with label DB installation in HPUX. Show all posts

Tuesday, 22 February 2011

Renaming Volume Group in HP Unix

Renaming VG in hpux.
Here is the procedure for renaming a VG in hpux. Renaming a VG is simple as exporting the the VG as importing with different name. (eg: vgapp to vgdb)
1. Verify the existing configuration

#vgdisplay vgapp
VG Name                     /dev/vgapp
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      2
Open LV                     2
Max PV                      16
Cur PV                      4
Act PV                      4
Max PE per PV               1016
VGDA                        8
PE Size (Mbytes)            32
Total PE                    508
Alloc PE                    336
Free PE                     172
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0
VG Version                  1.0
VG Max Size                 508g
VG Max Extents              16256


1. Umount all the logical volume from vgapp.
# bdf|grep vgapp
/dev/vgapp/test1   10485760   20062 9811599    0% /apps/test1
# umount /apps/test1



2. Deactivate Vg.

# vgchange -a n vgapp
Volume group "vgapp" has been successfully changed.



3. Create  a map file which can be used whileimporting back . File name is /tmp/vgapp

# vgexport -v \ # -->
-p \   # Preview the actions to be taken without updating lvmtab
-s \ #  Scan option for creating map file
-m /tmp/vgapp vgapp  #description of the volume group and its associated logical volume
Beginning the export process on Volume Group "vgapp".
/dev/disk/disk38
/dev/disk/disk39
/dev/disk/disk40
/dev/disk/disk41
vgexport: Preview of vgexport on volume group "vgapp" succeeded.



4. Export VG

# vgexport vgapp
vgexport: Volume group "vgapp" has been successfully removed.



5. Create device files for vgdb

root@rx16-243   [/root]
# ls -l /dev/*/group
crw-r-----   1 root       sys         64 0x000000 Feb 18 20:30 /dev/vg00/group
# mknod /dev/vgdb/group c 64 0x010000
# ls -l /dev/*/group
crw-r-----   1 root       sys         64 0x000000 Feb 18 20:30 /dev/vg00/group
crw-r--r--   1 root       sys         64 0x010000 Feb 20 04:36 /dev/vgdb/group



6. Import the VG with new name using the mapfile
# vgimport -s -N -m /tmp/vgapp vgdb
vgimport: Volume group "/dev/vgdb" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
Note: -N is for pvlink to be in new persistant dsf naming 



7.  Activate the new VG.

# vgchange -a y vgdb
Activated volume group.
Volume group "vgdb" has been successfully changed.



8. Verify the VG and mount the volume

# vgdisplay -v vgdb
--- Volume groups ---
VG Name                     /dev/vgdb
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      2
Open LV                     2
Max PV                      16
Cur PV                      4
Act PV                      4
Max PE per PV               1016
VGDA                        8
PE Size (Mbytes)            32
Total PE                    508
Alloc PE                    336
Free PE                     172
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0
VG Version                  1.0
VG Max Size                 508g
VG Max Extents              16256


   --- Logical volumes ---
   LV Name                     /dev/vgdb/test
   LV Status                   available/syncd
   LV Size (Mbytes)            512
   Current LE                  16
   Allocated PE                16
   Used PV                     1


   LV Name                     /dev/vgdb/test1
   LV Status                   available/syncd
   LV Size (Mbytes)            10240
   Current LE                  320
   Allocated PE                320
   Used PV                     3




   --- Physical volumes ---
   PV Name                     /dev/disk/disk38
   PV Status                   available
   Total PE                    127
   Free PE                     0
   Autoswitch                  On
   Proactive Polling           On


   PV Name                     /dev/disk/disk39
   PV Status                   available
   Total PE                    127
   Free PE                     0
   Autoswitch                  On
   Proactive Polling           On


   PV Name                     /dev/disk/disk40
   PV Status                   available
   Total PE                    127
   Free PE                     45
   Autoswitch                  On
   Proactive Polling           On


   PV Name                     /dev/disk/disk41
   PV Status                   available
   Total PE                    127
   Free PE                     127
   Autoswitch                  On
   Proactive Polling           On
# mount /dev/vgdb/test1 /mnt
# bdf /mnt
Filesystem          kbytes    used   avail %used Mounted on
/dev/vgdb/test1    10485760   20062 9811599    0% /mnt


Saturday, 5 February 2011

Changing kernel parameters in HP-UX


Changing kernel parameters in HP-UX.


While Installing DB it failed due to  below kernel parameters


Checking for maxssiz=134217728; maxssiz=8388608.         Failed <<<<
Checking for maxssiz_64bit=1073741824; maxssiz_64bit=268435456.         Failed <<<<
Checking for maxuprc=3687; maxuprc=3686.         Failed <<<<
Checking for semmns=8192; semmns=4096.          Failed <<<<


I resolved this issue by setting this parameters using kctune command as below.


For verifying the current Value

# kctune -v for  maxssiz maxssiz_64bit maxuprc semmns
Tunable             maxssiz
Description         Maximum size of the stack segment of a 32-bit process (bytes)
Module              vm
Current Value       8388608 [Default]
Value at Next Boot  8388608 [Default]
Value at Last Boot  8388608
Default Value       8388608
Constraints         maxssiz >= 262144
                    maxssiz <= 401604608
Can Change          Immediately or at Next Boot


Tunable             maxssiz_64bit
Description         Maximum size of the stack segment of a 64-bit process (bytes)
Module              vm
Current Value       268435456 [Default]
Value at Next Boot  268435456 [Default]
Value at Last Boot  268435456
Default Value       268435456
Constraints         maxssiz_64bit >= 262144
                    maxssiz_64bit <= 2147483648
Can Change          Immediately or at Next Boot


Tunable             maxuprc
Description         Maximum number of processes for each non-root user
Module              pm_proc
Current Value       3686 [((nproc*9)/10)]
Value at Next Boot  3687
Value at Last Boot  3686
Default Value       256
Constraints         maxuprc >= 3
                    maxuprc <= nproc - 5
Can Change          Immediately or at Next Boot


Tunable             semmns
Description         Maximum number of semaphores
Module              pm_usync
Current Value       4096 [Default]
Value at Next Boot  4096 
Value at Last Boot  4096
Default Value       4096
Constraints         semmns >= 2
                    semmns <= 335534080
                    semmns >= semmni
                    semmns >= semume
Can Change          At Next Boot Only


For changing the Value:


# kctune maxssiz=134217728
     ==> Update the automatic 'backup' configuration first? yes
             yes     - Update backup before every change
             once    - Update backup now; ask for each future change
             no      - Don't update backup now; ask for each future change
             disable - Don't update backup before any change
     ==> Update the automatic 'backup' configuration first? yes
       * The automatic 'backup' configuration has been updated.
       * Future operations will update the backup without prompting.
       * The requested changes have been applied to the currently
         running configuration.
Tunable                Value  Expression  Changes
maxssiz  (before)    8388608  Default     Immed
         (now)     134217728  134217728


# kctune maxssiz_64bit=1073741824
       * The automatic 'backup' configuration has been updated.
       * The requested changes have been applied to the currently
         running configuration.
Tunable                       Value  Expression  Changes
maxssiz_64bit  (before)   268435456  Default     Immed
               (now)     1073741824  1073741824


# kctune maxuprc=3687
       * The automatic 'backup' configuration has been updated.
       * The requested changes have been applied to the currently
         running configuration.
Tunable            Value  Expression      Changes
maxuprc  (before)   3686  ((nproc*9)/10)  Immed
         (now)      3687  3687


# kctune semmns=8192
NOTE:    The requested changes could not be applied to the currently
         running system, for the following reasons:
         - The tunable 'semmns' cannot be changed without a reboot.
       * The requested changes have been saved, and will take effect at
         next boot.
NOTE:    No change to the tunable 'semmns' was needed.
Tunable               Value  Expression
semmns   (now)         4096  Default
         (next boot)   8192  8192


After Changing the value using kctune command, it require a reboot of the system for some of the value to get effected. As show below output.


 
# kctune -v for  maxssiz maxssiz_64bit maxuprc semmns
Tunable             maxssiz
Description         Maximum size of the stack segment of a 32-bit process (bytes)
Module              vm
Current Value       134217728
Value at Next Boot  134217728
Value at Last Boot  134217728
Default Value       8388608
Constraints         maxssiz >= 262144
                    maxssiz <= 401604608
Can Change          Immediately or at Next Boot


Tunable             maxssiz_64bit
Description         Maximum size of the stack segment of a 64-bit process (bytes)
Module              vm
Current Value       1073741824
Value at Next Boot  1073741824
Value at Last Boot  1073741824
Default Value       268435456
Constraints         maxssiz_64bit >= 262144
                    maxssiz_64bit <= 2147483648
Can Change          Immediately or at Next Boot


Tunable             maxuprc
Description         Maximum number of processes for each non-root user
Module              pm_proc
Current Value       3687
Value at Next Boot  3687
Value at Last Boot  3687
Default Value       256
Constraints         maxuprc >= 3
                    maxuprc <= nproc - 5
Can Change          Immediately or at Next Boot


Tunable             semmns
Description         Maximum number of semaphores
Module              pm_usync
Current Value       8192
Value at Next Boot  8192
Value at Last Boot  8192
Default Value       4096
Constraints         semmns >= 2
                    semmns <= 335534080
                    semmns >= semmni
                    semmns >= semume
Can Change          At Next Boot Only