Showing posts with label HP-UX. Show all posts
Showing posts with label HP-UX. Show all posts
Thursday, October 25, 2012
How to extend / root filesystem in hp-ux 11.31.
#How to extend / root filesystem in hp-ux 11.31.
#get a space disk.
#Add a disk
ioscan -fnC disk
vgdisplay -v vg00
/usr/sbin/diskinfo /dev/rdsk/c0t8d0
insf -Cdisk
#add spare disk to vg00
ioscan -fnC disk
pvcreate /dev/rdsk/c0t8d0
vgextend vg00 /dev/dsk/c0t8d0
vgdisplay -v vg00
#unmirror vg00
lvreduce -m 0 -A n /dev/vg00/lvol4
lvreduce -m 0 -A n /dev/vg00/lvol5
lvreduce -m 0 -A n /dev/vg00/lvol6
#Move to spare disks.
pvmove -n /dev/vg00/lvol4 /dev/disk/disk7_p2 /dev/dsk/c0t8d0
pvmove -n /dev/vg00/lvol5 /dev/disk/disk7_p2 /dev/dsk/c0t8d0
pvmove -n /dev/vg00/lvol6 /dev/disk/disk7_p2 /dev/dsk/c0t8d0
#Extend root lv
lvextend -L 10000M /dev/vg00/lvol3
fsadm -F vxfs -b 10000M /
#Move back.
pvmove -n /dev/vg00/lvol6 /dev/dsk/c0t8d0 /dev/disk/disk7_p2
pvmove -n /dev/vg00/lvol5 /dev/dsk/c0t8d0 /dev/disk/disk7_p2
pvmove -n /dev/vg00/lvol4 /dev/dsk/c0t8d0 /dev/disk/disk7_p2
#remove the space disk
vgreduce vg00 /dev/dsk/c0t0d0
pvremove /dev/rdsk/c0t8d0
rmsf -H 0/0/0/1/0/0/0.8.0
ioscan -funC disk
#mirror vg00
lvextend -m 1 /dev/vg00/lvol4
lvextend -m 1 /dev/vg00/lvol5
lvextend -m 1 /dev/vg00/lvol6
Tuesday, September 25, 2012
hp-ux password reset
hp-ux password reset
disable password rule.
/usr/lbin/modprpw -l -x (User ID)
modify /etc/default/security/
PASSWORD_HISTORY_DEPTH=0
enable password rule.
/usr/lbin/modprpw -l -k (User ID)
disable password rule.
/usr/lbin/modprpw -l -x (User ID)
modify /etc/default/security/
PASSWORD_HISTORY_DEPTH=0
enable password rule.
/usr/lbin/modprpw -l -k (User ID)
Thursday, July 19, 2012
hp-ux : Verify the status of the link aggregate
Determine which lans to configure
Link Speeds and Duplex settings should be the same.
ioscan -fnkC lan ## to determine available lans
each lan used in the aggregate must be disabled before starting APA.
# ifconfig lan(n) down
# ifconfig lan(n) unplumb
ioscan -fnkC lan ## to determine available lans
each lan used in the aggregate must be disabled before starting APA.
# ifconfig lan(n) down
# ifconfig lan(n) unplumb
To stop/start the new configuration (APA doesn’t require a reboot to take effect)
/sbin/init.d/hpapa stop
/sbin/init.d/hpapa start
/sbin/init.d/hpapa start
Assign an ipaddress to lan900.
# ifconfig lan900 ipaddress netmask netmaskaddress
# ifconfig lan900 # # to check
# modify /etc/rc.config.d/netconf ##to make the ipaddress permanent
# ifconfig lan900 # # to check
# modify /etc/rc.config.d/netconf ##to make the ipaddress permanent
Verify the status of the link aggregate
* lanadmin -x -v 900 ## will show the number of ports, state, mode
* lanscan -v ## verify which link aggregates have been configured.
* lanadmin –x –p 2 900 ## verify the status of a particular port
* lanscan -v ## verify which link aggregates have been configured.
* lanadmin –x –p 2 900 ## verify the status of a particular port
Monday, June 18, 2012
HP-UX reset password history
Problem :
"you may not re use a previously used password" hp ux
Solution:
make the PASSWORD_HISTORY_DEPTH=0 in your /etc/deafault/security.
"you may not re use a previously used password" hp ux
Solution:
make the PASSWORD_HISTORY_DEPTH=0 in your /etc/deafault/security.
Tuesday, May 22, 2012
CIM Server / cimprovagt take 100% memory.
Problem:
CIM Server / cimprovagt take 100% memory.
Solution:
Install following bundles.
HP-UX_11i_v3_WBEMMgmtBundle_C.03.01_HP-UX_B.11.31_IA.depot
HP-UX_11i_v3_nParProvider_B.31.02.03.01_HP-UX_B.11.31_IA_PA.depot
Monday, May 7, 2012
What is ^Ecf?
HP-UX Accessing MP Console
What is ^Ecf?
you have to push the control key, and e key at the same time, then c and f key.
What is ^Ecf?
you have to push the control key, and e key at the same time, then c and f key.
Monday, April 16, 2012
HP-UX Network Tuning.
ndd -set network_device parameter value
ex)ndd -set /dev/udp udp_def_ttl 128
And also change the file /etc/rc.config.d/nddconf
Parameter Scope Default Tuned value
maxfiles /stand/system 2048 4096 *
maxfiles_lim /stand/system 2048 4096 *
tcp_time_wait_interval ndd/dev/tcp 60000 60000
tcp_conn_request_max ndd/dev/tcp 20 1024 ; 4096
tcp_ip_abort_interval ndd/dev/tcp 600000 60000
tcp_keepalive_interval ndd/dev/tcp 72000000 900000
tcp_rexmit_interval_initial ndd/dev/tc 1500 1500
tcp_rexmit_interval_max ndd/dev/tcp 60000 60000
tcp_rexmit_interval_min ndd/dev/tcp 500 500
tcp_xmit_hiwater_def ndd/dev/tcp 32768 32768
tcp_recv_hiwater_def ndd/dev/tcp 32768 32768
ex)ndd -set /dev/udp udp_def_ttl 128
And also change the file /etc/rc.config.d/nddconf
Parameter Scope Default Tuned value
maxfiles /stand/system 2048 4096 *
maxfiles_lim /stand/system 2048 4096 *
tcp_time_wait_interval ndd/dev/tcp 60000 60000
tcp_conn_request_max ndd/dev/tcp 20 1024 ; 4096
tcp_ip_abort_interval ndd/dev/tcp 600000 60000
tcp_keepalive_interval ndd/dev/tcp 72000000 900000
tcp_rexmit_interval_initial ndd/dev/tc 1500 1500
tcp_rexmit_interval_max ndd/dev/tcp 60000 60000
tcp_rexmit_interval_min ndd/dev/tcp 500 500
tcp_xmit_hiwater_def ndd/dev/tcp 32768 32768
tcp_recv_hiwater_def ndd/dev/tcp 32768 32768
Friday, March 23, 2012
HP Commands
#exportfs -u : unshare
#exportfs -a : share all
#vi r : replace
#vi :%s/up/right/g
#exportfs -a : share all
#vi r : replace
#vi :%s/up/right/g
Wednesday, March 21, 2012
hp-ux how to add swap space file system.
powermt display dev=all |more
ioscan -fnC disk
insf -C disk
ioscan -fnC disk
powermt display dev=all
pvcreate /dev/rdsk/c29t4d5
mkdir vg09
cd vg09
mknod group c 64 0x010000
vgcreate vg09 /dev/dsk/c29t4d5
lvcreate -L 20000 /dev/vg09
lvdisplay /dev/vg09/lvol1
swapon /dev/vg09/lvol1
cd /etc
vi fstab
swapinfo -atm
glance
uname -a
kctune
kctune -v swchunk
kctune swchunk=4096
kctune -v swchunk
ioscan -fnC disk
insf -C disk
ioscan -fnC disk
powermt display dev=all
pvcreate /dev/rdsk/c29t4d5
mkdir vg09
cd vg09
mknod group c 64 0x010000
vgcreate vg09 /dev/dsk/c29t4d5
lvcreate -L 20000 /dev/vg09
lvdisplay /dev/vg09/lvol1
swapon /dev/vg09/lvol1
cd /etc
vi fstab
swapinfo -atm
glance
uname -a
kctune
kctune -v swchunk
kctune swchunk=4096
kctune -v swchunk
Sunday, March 11, 2012
HP-UX : unlock oracle user
HP-UX : unlock oracle user
/usr/lbin/modprpw -k oracp
/usr/lbin/modprpw -k oracp
Friday, March 9, 2012
cimprovagt occupies memory 100%
WBEM/CIM
Web-Based Enterprise Management/Common Information Model.
Process Name PID Name ( 800% max) Cnt IOrate RSS/VSS On
--------------------------------------------------------------------------------
cimprovagt 3782 root 34.7 33 34.0 15.9gb 16.1gb VM
Solution:
# /sbin/init.d/cim_server stop
If not all the "cimprovagt" processes died, you can kill them.
# /sbin/init.d/cim_server start
Web-Based Enterprise Management/Common Information Model.
Process Name PID Name ( 800% max) Cnt IOrate RSS/VSS On
--------------------------------------------------------------------------------
cimprovagt 3782 root 34.7 33 34.0 15.9gb 16.1gb VM
Solution:
# /sbin/init.d/cim_server stop
If not all the "cimprovagt" processes died, you can kill them.
# /sbin/init.d/cim_server start
Wednesday, February 8, 2012
How to find all the files containing a particular text string.
How to find all the files containing a particular text string.
find . -exec grep -l "needle" {} \;
find . -exec grep -l "needle" {} \;
Tuesday, February 7, 2012
copy without overwirte.
yes n | cp -R -h -i /dirone/* /dirtwo
Monday, February 6, 2012
HP-UX : to use old password again.
HP-UX
Change the password restriction.
- /etc/default/security
- Change the value for # PASSWORD_HISTORY_DEPTH=0
to use the old password again.
Change the password restriction.
- /etc/default/security
- Change the value for # PASSWORD_HISTORY_DEPTH=0
to use the old password again.
Wednesday, February 1, 2012
Remove Volume Group in HP-UX
#vgchange -a v vg04
#vgexport -v /dev/vg04
#vgreduce /dev/vg05 /dev/dsk/cxtydz
#vgremove /dev/vg05
#vgexport -v /dev/vg04
#vgreduce /dev/vg05 /dev/dsk/cxtydz
#vgremove /dev/vg05
Tuesday, January 17, 2012
HP-UX mwa perfalarm
mwa status
root@ $ /opt/perf/bin/mwa stop
root@ $ /opt/perf/bin/mwa start
/var/opt/perf/alarmdef #definition file
/perfstat -e #see error mesage
ovpa start
ovpa status
50 ovpa status
51 ovpa start
52 ovpa status
53 perfalarm –e
61 cd /var/opt/OV/datafiles/
63 mv coda.db coda.db.old
64 ovc -stop
65 cd /var/opt/OV/bin
70 ./ovc status
71 ./ovc start
72 ./ovc –stop
78 ovpa start all
79 ovpa status
80 ./ovc -restart
81 ./ovc -kill
82 ./ovc -start
84 ovpa status
85 ovcodautil -ping
87 ovpa status
88 perfstat -e
89 ovpa status
96 cd /var/opt/OV/datafiles/
98 ovpa status
root@ $ /opt/perf/bin/mwa stop
root@ $ /opt/perf/bin/mwa start
/var/opt/perf/alarmdef #definition file
/perfstat -e #see error mesage
ovpa start
ovpa status
50 ovpa status
51 ovpa start
52 ovpa status
53 perfalarm –e
61 cd /var/opt/OV/datafiles/
63 mv coda.db coda.db.old
64 ovc -stop
65 cd /var/opt/OV/bin
70 ./ovc status
71 ./ovc start
72 ./ovc –stop
78 ovpa start all
79 ovpa status
80 ./ovc -restart
81 ./ovc -kill
82 ./ovc -start
84 ovpa status
85 ovcodautil -ping
87 ovpa status
88 perfstat -e
89 ovpa status
96 cd /var/opt/OV/datafiles/
98 ovpa status
Wednesday, January 11, 2012
NFS Files
#### Version 11.11
/etc/auto_direct on 11.11 is
/homologation -soft,nosuid,proto=udp hsapt9:/homologation
exportfs -a
#### Version 11.31
/etc/exports on 11.31 is
/homologation -access=hsapt7,root=hsapt7
/etc/dfs/dfstab
mount host:/file_system /local_directory
shareall
/etc/auto_direct on 11.11 is
/homologation -soft,nosuid,proto=udp hsapt9:/homologation
exportfs -a
#### Version 11.31
/etc/exports on 11.31 is
/homologation -access=hsapt7,root=hsapt7
/etc/dfs/dfstab
mount host:/file_system /local_directory
shareall
How to extend File System in HP-UX v3
How to extend File System in HP-UX v3
ioscan - fnC disk
insf -Cdisk
powermt config
powermt save
powermt display
pvcreate -f /dev/rdisk/disk/c23t0d1
vgextend /dev/vg02 /dev/dsk/c23t0d1
lvextend -L 62000M /dev/vg02/lvol2
lvextend -L 62000M /dev/vg02/lvol3
lvextend -L 47000M /dev/vg02/lvol4
lvextend -L 50000M /dev/vg02/lvol5
fsadm -b 62000M /oracle/data1
fsadm -b 62000M /oracle/data2
fsadm -b 47000M /oracle/data3
fsadm -b 50000M /oracle/data4
ioscan - fnC disk
insf -Cdisk
powermt config
powermt save
powermt display
pvcreate -f /dev/rdisk/disk/c23t0d1
vgextend /dev/vg02 /dev/dsk/c23t0d1
lvextend -L 62000M /dev/vg02/lvol2
lvextend -L 62000M /dev/vg02/lvol3
lvextend -L 47000M /dev/vg02/lvol4
lvextend -L 50000M /dev/vg02/lvol5
fsadm -b 62000M /oracle/data1
fsadm -b 62000M /oracle/data2
fsadm -b 47000M /oracle/data3
fsadm -b 50000M /oracle/data4
Monday, January 9, 2012
HP Cluster Commands
#cmviewcl –v
#netstat -in
#cmhaltpkg -v seacrm_pkg
#cmrunpkg -v seacrm_pkg
#cmmodpkg -v -e seacrm_pkg
#shutdown -ry 0
#cmrunnode seauxcp1
#cmruncl -v #start entire cluster
#cmhaltcl #stop entire cluster
#cmviewcl #check status of cluster
#cmrunnode -v nodename #start a single node
#cmhaltnode -f -v nodename #stop a node
#cmgetconf -C config_name #get current configuration
#cmrunpkg -n nodename package_name #start package on node
#cmmodpkg -e package_name #enable switching
#cmhaltpkg package_name #stop package
#cmcheckconf #Verifying and distributing the configuration
#cmapplyconf #generate the binary configuration file and distribute it across the nodes
#netstat -in
#cmhaltpkg -v seacrm_pkg
#cmrunpkg -v seacrm_pkg
#cmmodpkg -v -e seacrm_pkg
#shutdown -ry 0
#cmrunnode seauxcp1
#cmruncl -v #start entire cluster
#cmhaltcl #stop entire cluster
#cmviewcl #check status of cluster
#cmrunnode -v nodename #start a single node
#cmhaltnode -f -v nodename #stop a node
#cmgetconf -C config_name #get current configuration
#cmrunpkg -n nodename package_name #start package on node
#cmmodpkg -e package_name #enable switching
#cmhaltpkg package_name #stop package
#cmcheckconf #Verifying and distributing the configuration
#cmapplyconf #generate the binary configuration file and distribute it across the nodes
Thursday, October 20, 2011
HP-UX Disk
HP-UX: Disk and Filesystem tasks
Search for attached disk
ioscan -fnC disk
---
Create special file
insf -Cdisk
---
Initialize a disk for use with LVM
pvcreate -f /dev/rdsk/c0t1d0 #"-f" option only when absolutely needed.
---
Create the device structure needed for a new volume group.
cd /dev
mkdir vgdata
cd vgdata
mknod group c 64 0x010000
---
Create volume group vgdata
vgcreate vgdata /dev/dsk/c0t1d0
{ if your expecting to use more than 16 physical disks use the -p option, range from 1 to 256 disks. }
---
Display volume group vgdata
vgdisplay -v vg01
---
Add another disk to volume group
pvcreate -f /dev/rdsk/c0t4d0
vgextend vg01 /dev/dsk/c0t4d0
---
Remove disk from volume group
vgreduce vg01 /dev/dsk/c0t4d0
---
Create a 100 MB logical volume lvdata
lvcreate -L 100 -n lvdata vgdata
newfs -F vxfs /dev/vgdata/rlvdata
--- OR
Extend logical volume to 200 MB
lvextend -L 200 /dev/vgdata/lvdata
---
Extend file system to 200 MB
{ if you don't have Online JFS installed volumes must be unmounted before you can extend the file system. }
fuser -ku /dev/vgdata/lvdata { kill all process that has open files on this volume. }
umount /dev/vgdata/lvdata
extendfs /data
{ for Online JFS, 200 MB / 4 MB = 50 LE; 50 x 1024 = 51200 blocks }
fsadm -F vxfs -b 51200 /data
---
Set largefiles to support files greater than 2GB
fsadm -F vxfs -o largefiles /data
---
Exporting and Importing disks across system.
1. make the volume group unavailable
vgchange -a n /dev/vgdata
2. Export the the disk while creating a logical volume map file.
vgexport -v -m data_map vgdata
3. Disconnect the drives and move to new system.
4. Move the data_map file to the new system.
5. On the new system recreate the volume group directory
mkdir /dev/vgdata
mknod /dev/vgdata/group c 64 0x02000
6. Import the disks to the new system
vgimport -v -m data_map /dev/vgdata /dev/dsk/c2t1d0 /dev/dsk/c2t2d0
7. Enable the new volume group
vgchange -a y /dev/vgdata
Renaming a logical volume
/dev/vgdata/lvol1 ; /dev/vgdata/data_lv
umount /dev/vgdata/lvol1
ll /dev/vgdata/lvol1 take note of the minor ( e.g 0x010001 )
brw-r----- 1 root root 64 0x010001 Dec 31 17:59 lvol1
mknod /dev/vgdata/data_lv b 64 0x010001 create new logical volume name
mknod /dev/vgdata/rdata_lv c 64 0x010001
vi /etc/fstab { reflect the new logical volume }
mount -a
rmsf /dev/vgdata/lvol1
rmsf /dev/vgdata/rlvol1
=== Adding disk/new vg/create file systems.
ioscan -m dsf | grep disk
diskinfo /dev/rdsk/c2t2d0
strings /etc/lvmtab
pvcreate -f /dev/rdsk/c2t2d0
pvcreate -f /dev/rdsk/c2t3d0
mknod group c 64 0x010000
vgcreate vg02 /dev/dsk/c2t2d0
vgdisplay -v vg02
lvcreate -L 10000 -n lvdata vg02
newfs -F vxfs /dev/vg02/rlvdata
mount -F vxfs -o largefiles /dev/vg02/lvdata /dtCollector
== mirror file system to new disk.
vgextend vg02 /dev/dsk/c2t3d0
lvchange -s g /dev/vg02/lvdata
lvchange -s y /dev/vg02/lvdata
lvextend -m 1 /dev/vg02/lvdata
lvextend -m 1 /dev/vg02/lvdata /dev/dsk/c2t3d0
== delete vg
vgexport /dev/vg01
vgremove /dev/vg01
Search for attached disk
ioscan -fnC disk
---
Create special file
insf -Cdisk
---
Initialize a disk for use with LVM
pvcreate -f /dev/rdsk/c0t1d0 #"-f" option only when absolutely needed.
---
Create the device structure needed for a new volume group.
cd /dev
mkdir vgdata
cd vgdata
mknod group c 64 0x010000
---
Create volume group vgdata
vgcreate vgdata /dev/dsk/c0t1d0
{ if your expecting to use more than 16 physical disks use the -p option, range from 1 to 256 disks. }
---
Display volume group vgdata
vgdisplay -v vg01
---
Add another disk to volume group
pvcreate -f /dev/rdsk/c0t4d0
vgextend vg01 /dev/dsk/c0t4d0
---
Remove disk from volume group
vgreduce vg01 /dev/dsk/c0t4d0
---
Create a 100 MB logical volume lvdata
lvcreate -L 100 -n lvdata vgdata
newfs -F vxfs /dev/vgdata/rlvdata
--- OR
Extend logical volume to 200 MB
lvextend -L 200 /dev/vgdata/lvdata
---
Extend file system to 200 MB
{ if you don't have Online JFS installed volumes must be unmounted before you can extend the file system. }
fuser -ku /dev/vgdata/lvdata { kill all process that has open files on this volume. }
umount /dev/vgdata/lvdata
extendfs /data
{ for Online JFS, 200 MB / 4 MB = 50 LE; 50 x 1024 = 51200 blocks }
fsadm -F vxfs -b 51200 /data
---
Set largefiles to support files greater than 2GB
fsadm -F vxfs -o largefiles /data
---
Exporting and Importing disks across system.
1. make the volume group unavailable
vgchange -a n /dev/vgdata
2. Export the the disk while creating a logical volume map file.
vgexport -v -m data_map vgdata
3. Disconnect the drives and move to new system.
4. Move the data_map file to the new system.
5. On the new system recreate the volume group directory
mkdir /dev/vgdata
mknod /dev/vgdata/group c 64 0x02000
6. Import the disks to the new system
vgimport -v -m data_map /dev/vgdata /dev/dsk/c2t1d0 /dev/dsk/c2t2d0
7. Enable the new volume group
vgchange -a y /dev/vgdata
Renaming a logical volume
/dev/vgdata/lvol1 ; /dev/vgdata/data_lv
umount /dev/vgdata/lvol1
ll /dev/vgdata/lvol1 take note of the minor ( e.g 0x010001 )
brw-r----- 1 root root 64 0x010001 Dec 31 17:59 lvol1
mknod /dev/vgdata/data_lv b 64 0x010001 create new logical volume name
mknod /dev/vgdata/rdata_lv c 64 0x010001
vi /etc/fstab { reflect the new logical volume }
mount -a
rmsf /dev/vgdata/lvol1
rmsf /dev/vgdata/rlvol1
=== Adding disk/new vg/create file systems.
ioscan -m dsf | grep disk
diskinfo /dev/rdsk/c2t2d0
strings /etc/lvmtab
pvcreate -f /dev/rdsk/c2t2d0
pvcreate -f /dev/rdsk/c2t3d0
mknod group c 64 0x010000
vgcreate vg02 /dev/dsk/c2t2d0
vgdisplay -v vg02
lvcreate -L 10000 -n lvdata vg02
newfs -F vxfs /dev/vg02/rlvdata
mount -F vxfs -o largefiles /dev/vg02/lvdata /dtCollector
== mirror file system to new disk.
vgextend vg02 /dev/dsk/c2t3d0
lvchange -s g /dev/vg02/lvdata
lvchange -s y /dev/vg02/lvdata
lvextend -m 1 /dev/vg02/lvdata
lvextend -m 1 /dev/vg02/lvdata /dev/dsk/c2t3d0
== delete vg
vgexport /dev/vg01
vgremove /dev/vg01
Subscribe to:
Posts (Atom)