UnixPedia : HPUX / LINUX / SOLARIS: March 2013

Thursday, March 7, 2013

HPUX : Testing the disk status to identify the Health

Testing Disk :

 

 

# dd if=/dev/rdsk/c#t#d# of=/dev/null bs=1024k count=2048 (this will do a read/write test of 2048) # dd if=/dev/rdsk/c#t#d# of=/dev/null bs=1024k (this will do a full read/write test but will consume more time)

 

Here is an example

 

root@rx2620:> # dd if=/dev/rdsk/c#t#d# of=/dev/null bs=1024k count=2048

2048+0 records in

2048+0 records out

root@rx2620:> # dd if=/dev/rdsk/c#t#d# of=/dev/null bs=1024k

34732+1 records in

34732+1 records out

 

Monday, March 4, 2013

VxVM : Step for creating a Stripe File system in Vxvm

 Step for creating Stripe file system in VxVM :Veritas Volume Manager, VxVM

# ioscan -fnC disk
# insf -eC disk
# /usr/local/bin/xpinfo -i |grep -iE "17:7E|23:B7|27:7E"
/dev/rdsk/c32t8d0            00  08  00  CL3C  17:7e  OPEN-V           00022605
/dev/rdsk/c32t8d1            00  08  00  CL3C  23:b7  OPEN-V           00022605
/dev/rdsk/c32t8d2            00  08  00  CL3C  27:7e  OPEN-V           00022605
/dev/rdsk/c30t8d0            00  08  00  CL4C  17:7e  OPEN-V           00022605
/dev/rdsk/c30t8d1            00  08  00  CL4C  23:b7  OPEN-V           00022605
/dev/rdsk/c30t8d2            00  08  00  CL4C  27:7e  OPEN-V           00022605
                                                    
# Freeze all Service groups
# vxdctl enable
# vxdisk -o alldgs list |grep -iE "c30t8d0|c30t8d1|c30t8d2"
c30t8d0      simple    -            -            online invalid
c30t8d1      simple    -            -            online invalid
c30t8d2      simple    -            -            online invalid
# /etc/vx/bin/vxdisksetup -i /dev/rdsk/c30t8d0
vxdisksetup: /dev/rdsk/c30t8d0: Device address must be of the form cCtTdD[sS] where

    C = host bus adapter controller number
    T = target device controller number
    D = logical unit (disk) number within target device controller
    S = HP-UX partition number (for EFI formatted disks only)
# /etc/vx/bin/vxdisksetup -i c30t8d0
# /etc/vx/bin/vxdisksetup -i c30t8d1
# /etc/vx/bin/vxdisksetup -i c30t8d2
# vxdisk -o alldgs list |grep -iE "c30t8d0|c30t8d1|c30t8d2"
c30t8d0      simple    -            -            online
c30t8d1      simple    -            -            online
c30t8d2      simple    -            -            online
# vxdg init wldg11 wldg111=c30t8d0 wldg112=c30t8d1 wldg113=c30t8d2
# vxdg list wldg11
Group:     wldg11
dgid:      1206565925.5003.ebzdbd01
import-id: 0.5002
flags:
version:   90
local-activation: read-write
detach-policy: global
copies:    nconfig=default nlog=default
config:    seqno=0.1029 permlen=727 free=725 templen=1 loglen=110
config disk c30t8d0 copy 1 len=727 state=clean online
config disk c30t8d1 copy 1 len=727 state=clean online
config disk c30t8d2 copy 1 len=727 state=clean online
log disk c30t8d0 copy 1 len=110
log disk c30t8d1 copy 1 len=110
log disk c30t8d2 copy 1 len=110
#
# vxdisk -o alldgs list |grep -iE "c30t8d0|c30t8d1|c30t8d2"
c30t8d0      simple    wldg111      wldg11       online
c30t8d1      simple    wldg112      wldg11       online
c30t8d2      simple    wldg113      wldg11       online
#
# vxassist -g wldg11 make wl11_cpc_grs_u01_vol 10G layout=stripe stwidth=256k ncols=3 wldg111 wldg112 wldg113
# vxassist -g wldg11 make wl11_cpc_u01_vol 5G layout=stripe stwidth=256k ncols=3 wldg111 wldg112 wldg113
# vxassist -g wldg11 make wl11_cpc_u02_vol 5G layout=stripe stwidth=256k ncols=3 wldg111 wldg112 wldg113
# vxassist -g wldg11 make wl11_cpc_u03_vol 10G layout=stripe stwidth=256k ncols=3 wldg111 wldg112 wldg113
#
# vxprint -g wldg11
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg wldg11       wldg11       -        -        -        -        -       -

dm wldg111      c30t8d0      -        14214400 -        -        -       -
dm wldg112      c30t8d1      -        14214400 -        -        -       -
dm wldg113      c30t8d2      -        14214400 -        -        -       -

v  wl11_cpc_grs_u01_vol fsgen ENABLED 10485760 -        ACTIVE   -       -
pl wl11_cpc_grs_u01_vol-01 wl11_cpc_grs_u01_vol ENABLED 10486272 - ACTIVE - -
sd wldg111-01   wl11_cpc_grs_u01_vol-01 ENABLED 3495424 0 -      -       -
sd wldg112-01   wl11_cpc_grs_u01_vol-01 ENABLED 3495424 0 -      -       -
sd wldg113-01   wl11_cpc_grs_u01_vol-01 ENABLED 3495424 0 -      -       -

v  wl11_cpc_u01_vol fsgen    ENABLED  5242880  -        ACTIVE   -       -
pl wl11_cpc_u01_vol-01 wl11_cpc_u01_vol ENABLED 5243136 - ACTIVE -       -
sd wldg111-02   wl11_cpc_u01_vol-01 ENABLED 1747712 0   -        -       -
sd wldg112-02   wl11_cpc_u01_vol-01 ENABLED 1747712 0   -        -       -
sd wldg113-02   wl11_cpc_u01_vol-01 ENABLED 1747712 0   -        -       -

v  wl11_cpc_u02_vol fsgen    ENABLED  5242880  -        ACTIVE   -       -
pl wl11_cpc_u02_vol-01 wl11_cpc_u02_vol ENABLED 5243136 - ACTIVE -       -
sd wldg111-03   wl11_cpc_u02_vol-01 ENABLED 1747712 0   -        -       -
sd wldg112-03   wl11_cpc_u02_vol-01 ENABLED 1747712 0   -        -       -
sd wldg113-03   wl11_cpc_u02_vol-01 ENABLED 1747712 0   -        -       -

v  wl11_cpc_u03_vol fsgen    ENABLED  10485760 -        ACTIVE   -       -
pl wl11_cpc_u03_vol-01 wl11_cpc_u03_vol ENABLED 10486272 - ACTIVE -      -
sd wldg111-04   wl11_cpc_u03_vol-01 ENABLED 3495424 0   -        -       -
sd wldg112-04   wl11_cpc_u03_vol-01 ENABLED 3495424 0   -        -       -
sd wldg113-04   wl11_cpc_u03_vol-01 ENABLED 3495424 0   -        -       -
#
# mkdir -p /wl11/cpc/grs/u01
# mkdir -p /wl11/cpc/u01
# mkdir -p /wl11/cpc/u02
# mkdir -p /wl11/cpc/u03
#
# newfs -F vxfs -o largefiles /dev/vx/rdsk/wl11 cpc grs u01 vol
vxfs newfs: Cannot not get the status of /dev/vx/rdsk/wl11_cpc_grs_u01_vol: No such file or directory
# newfs -F vxfs -o largefiles /dev/vx/rdsk/wldg11/wl11 cpc grs u01 vol
    version 4 layout
 10485760 sectors, 10485760 blocks of size 1024, log size 16384 blocks
    unlimited inodes, largefiles supported
    10485760 data blocks, 10466672 free data blocks
    320 allocation units of 32768 blocks, 32768 data blocks
# newfs -F vxfs -o largefiles /dev/vx/rdsk/wldg11/wl11 cpc u01 vol
    version 4 layout
 5242880 sectors, 5242880 blocks of size 1024, log size 16384 blocks
    unlimited inodes, largefiles supported
    5242880 data blocks, 5225112 free data blocks
    160 allocation units of 32768 blocks, 32768 data blocks
# # newfs -F vxfs -o largefiles /dev/vx/rdsk/wldg11/wl11 cpc u01 vol# newfs -F vxfs -o largefiles /dev/vx/rdsk/wldg11
/wl11 cpc u0
    version 4 layout
 5242880 sectors, 5242880 blocks of size 1024, log size 16384 blocks
    unlimited inodes, largefiles supported
    5242880 data blocks, 5225112 free data blocks
    160 allocation units of 32768 blocks, 32768 data blocks
# # newfs -F vxfs -o largefiles /dev/vx/rdsk/wldg11/wl11 cpc u02 vol# newfs -F vxfs -o largefiles /dev/vx/rdsk/wldg11
/wl11 cpc u0
    version 4 layout
 10485760 sectors, 10485760 blocks of size 1024, log size 16384 blocks
    unlimited inodes, largefiles supported
    10485760 data blocks, 10466672 free data blocks
    320 allocation units of 32768 blocks, 32768 data blocks
#
# # configure in VCS and mount through VCS
# bdf |grep -i wl11
/dev/vx/dsk/wldg11/wl11_cpc_grs_u01_vol
                   10485760   19030 9812567    0% /wl11/cpc/grs/u01
/dev/vx/dsk/wldg11/wl11_cpc_u01_vol
                   5242880   17745 4898572    0% /wl11/cpc/u01
/dev/vx/dsk/wldg11/wl11_cpc_u03_vol
                   10485760   19030 9812567    0% /wl11/cpc/u03
/dev/vx/dsk/wldg11/wl11_cpc_u02_vol
                   5242880   17745 4898572    0% /wl11/cpc/u02
#
# ll -d /wl11/cpc/*
drwxr-xr-x   3 root       sys             96 Mar 26 17:18 /wl11/cpc/grs
drwxr-xr-x   3 root       root            96 Mar 26 17:21 /wl11/cpc/u01
drwxr-xr-x   3 root       root            96 Mar 26 17:21 /wl11/cpc/u02
drwxr-xr-x   3 root       root            96 Mar 26 17:21 /wl11/cpc/u03
# ll -d /wl11/cpc/grs/u01
drwxr-xr-x   3 root       root            96 Mar 26 17:20 /wl11/cpc/grs/u01

Friday, March 1, 2013

HPUX : how to check port is listening to what

how to check port is listening to what

 

#-> whereis /opt/atdd/bin/lsof

lsof: /opt/atdd/bin/lsof /opt/OMImag/bin/lsof

 

#-> /opt/atdd/bin/lsof -i :8014

COMMAND  PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME

icman   3366 fs3adm   20u  IPv4 0xe00000039a4a8580      0t0  TCP dbcifs3.na.jnj.com:8014 (LISTEN)

icman   3366 fs3adm   42u  IPv4 0xe000000302290580      0t0  TCP dbcifs3.na.jnj.com:8014->null-e07bf88fb608.jjcus.na.jnj.com:3792 (ESTABLISHED)