2.16.2012

HP SmartArray controller disk replacement steps on HP i2 blades

This is for the BL860c i2 blades (and other i2 models):


Replace a failed LVM mirror disk that is attached to a SmartArray SAS controller.

 

Notes:  For this example /dev/disk/disk2 is the failed disk and /dev/disk/disk4 is the new device that was created because the SAS controller identified a new disk.

Notes:  For this example the SAS controller device is /dev/ciss0

Notes:  The failed disk is in volume group vg00

 

Identify the disk by serial number.  Give the Bay number to the HP CE so they know which disk to replace:

sautil /dev/ciss0 -s

scsimgr get_info -D /dev/rdisk/disk2

 

Deactivate the PV:

pvchange -a n /dev/disk/disk2

 

Replace the failed disk.

 

Activate the WWID of the new disk.  The Error can be ignored.  A new disk device should be created:

scsimgr -f replace_wwid -D /dev/rdisk/disk2 dsf

scsimgr: ERROR: Cannot convert hardware path to an IO tree node

 

Find the new disk device that was created:

ioscan -fNnC disk

 

Create a description file to create the EFI partitions:

# cat >> /tmp/idf << EOF

3

EFI 500MB

HPUX 100%

HPSP 400MB

 

Use idisk to setup the disk partitioning on the new disk device:

idisk -wf /tmp/idf  /dev/rdisk/disk4

insf -e –C disk

 

Assign the old instance number to the replacement disk:

io_redirect_dsf -d /dev/disk/disk2 -n /dev/disk/disk4

 

Verify that /dev/disk/disk2 is in a claimed state:

ioscan –fnNC disk

 

Use mkboot to format and populate the newly created EFI partition:

mkboot -e -l /dev/disk/disk2

 

Change the AUTO file contents to the proper mode:

mkboot -a "boot vmunix -lq" /dev/rdisk/disk2

 

Restore the LVM reserved areas (PVRA/VGRA):

vgcfgrestore –n vg00 /dev/rdisk/disk2_p2

 

Reattach the new disk:

pvchange -a y /dev/disk/disk2_p2

 

Sync volume group:

vgsync vg00

 

Use lvlnboot to ensure that the LVM logical volumes are prepared:

lvlnboot -R

lvlnboot -v

SAS controller on HPUX itanium disk replace

The SAS controller in the first generation BL860C (and other models) has some special commands in order to replace a failed disk.  I would recommend using the built-in RAID-1 capabilities of this controller - that way you no longer need to worry about LVM mirroring.  But if you need to use LVM mirroring then, add the couple steps below to your standard LVM mirror root/boot disk procedure:

#get the SAS controller dsf:
saslist get_info ctrl sasd

#get info on the disks:
sasmgr get_info -D /dev/sasd0 -q raid

#if the disk is working enough to turn on the attention LED:
sasmgr set_attr -D /dev/sasd0 -q lun=/dev/dsk/c0t1d0 -q locate_led=on

AFTER the disk is replaced:
#since each disk will have a unique WWID, the server will assign a new HW path and persistent dsf
#to change them first change the hardware path (legacy style)
sasmgr replace_tgt -D /dev/sasd0 -q old_tgt_hwpath=0/2/1/0.0.0.1.0 -q new_tgt_hwpath=0/2/1/0.0.0.2.0

#then change the persistent dsf
io_redirect_dsf -d /dev/disk/disk3 -n /dev/disk/disk8

1.26.2012

sas commands (Hardware mirroring) hp-ux

HPUX SAS controller commands - hardware mirroring (only on some controllers)

status of serial attached SCSI raid set:
sasmgr get_info -D /dev/sasd0 -q raid

get controller HW path and device file
saslist get_info ctrl sasd

get list of LUNs being controlled by the sasd driver
saslist get_info lun sasd

status all physical drives
sasmgr get_info -D /dev/sasd0 -q phy=all

statistics of HBA (for problems)
sasmgr get_stat -D /dev/sasd0

track down disk problems
sasmgr get_stat -D /dev/sasd0 -q phy=all

clear statistics on PHY 1
sasmgr clear_stat -D /dev/sasd0 -q phy_in_port=1

1.12.2012

start a search when opening a file in vi

To start a search when opening a file: vi +/Search_string /tmp/filename
It'll open a vi session placing your cursor at the start of the line containing the first match of the keyword.   You can hit 'n' to continue the search like normal

1.09.2012

cimprovagt using too much memory

if cimprovagt is using too much memory, you can restart it by restarting the whole cimserver ( /sbin/init.d/cim_server stop / start  OR cimserver -s ; cimserver ).  Or you can just disable then re-enable the module.  There seems to be lots of memory leaks in the modules, or upgrade if possible.

- Identify the provider:
# ps -ef | grep cimprovagt
# cimprovider -l -s

- Disable provider sample:

#cimprovider -d -m MODULE

#cimprovider -l -s

or shutdown/start the module:
#cimprovider -d -m MODULE
#cimprovider -e -m MODULE

12.07.2011

excessive dots during HPUX startup

two ways to mitigate a bunch of dots during the startup script process on HP-UX:
Change the GSP/MP/iLO "asynchronous" port to the correct terminal
type: vt100 verses HPTERM. usually you can get in and do a "CA"
(configure asynchronous) and change the console terminal type there.

OR:
One suggestion I've seen on the HP forums is to try setting
"LIST_MODE=1" in /etc/rc.config.d/list_mode, rather than the default
value of zero. This forces the startup to use the same line-oriented
mode regardless of the terminal type. It might be worth a try.

11.29.2011

HPUX LVM logical volume size limit

2TB is the max size for a logical volme and file system on 11.23,
unless some patches are installed:
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&taskId=110&prodSeriesId=459574&prodTypeId=18964&objectID=c02742533

with the patches or on 11.31 it's 16TB

9.20.2011

AT&T vs T-mobile sim card in straight talk phone

difference between att and tmobile sim card in a straghttalk phone or service:

look at the SIM card numbers. If it starts with 890126 its T-mobile. 890141 for AT&T.
OR  check bottom of packaging of the phone. Look for the white label. Look on the right for an "A" or "T" (AT&T or T-mobile)

Packet tracing in HPUX

quick primer to packet tracing/logging/sniffing in hpux.  "nettl" network tracing and logging, no need for tcpdump (even though it's probably better).

get status on trace or logging:
/usr/sbin/nettl -status [log |trace |all]


start/stop trace:
nettl -tn pduin pduout loopback -e all -tracemax 65536 -f /tmp/me
nettl -tf -e all

the output file can be opened in wireshark/ethereal.

format commands
netfmt -vf nettl.LOG000 > /tmp/nettl.txt
netfmt -nl1f me.TRC000 > me.out


combine both nettl and netfmt to filter results:
add a filter to ~/.netfmtrc like the following for dns
filter tcp_sport 53
filter tcp_dport 53
filter udp_sport 53
filter udp_dport 53

then start the trace (be sure to turn off):
nettl -tn pduin pduout -e ns_ls_ip | netfmt -1
or
nettl -tn pduin pduout -e ns_ls_ip -m 250 -ks 10M -us 30M -nk 5 -nu 5 | netfmt -1

turn it off again, even if control-c (intr) was used:
nettl -tf -e all


tui/gui:
nettladm

9.14.2011

enable CDE on hpux

uncomment in inetd.conf:
dtspc stream tcp nowait root /usr/dt/bin/dtspcd /usr/dt/bin/dtspcd
rpc xti tcp swait root /usr/dt/bin/rpc.ttdbserver 100083 1 /usr/dt/bin/rpc.ttdbserver
cde rpc dgram udp wait root /usr/dt/bin/rpc.cmsd 100068 2-5 rpc.cmsd
rpc dgram udp wait root /usr/dt/bin/rpc.cmsd 100068 2-5 rpc.cmsd

then inetd -c (of course)

should be commented out in /etc/dt/config/Xconfig and /usr/dt/config/Xconfig:
#Dtlogin.requestPort: 0


update inetd.sec if it exists, change hostname to the server's hostname
dtspc allow 127.0.0.1 hostname

make the DESKTOP=CDE, either manually or through this: /usr/dt/bin/dtconfig -e

OR

$ ch_rc -a -p DESKTOP=CDE
$ grep -i desktop /etc/rc.config.d/desktop
DESKTOP=CDE


finally start CDE:
$ /sbin/init.d/dtlogin.rc start

check if running properly:
ps -ef | grep dt and netstat -an | grep 177
dtlogin should be running and UDP port 177 should be listening (for XDMCP traffic)

diagnostics command: /usr/contrib/bin/X11/dr_dt

not a tech topic - the real reason why they hate us

Be honest with yourself, they (the terrorists) don't hate and want to kill us because we're free and our culture is different from their's.  If that was true, then why haven't we been attacked earlier than the 1990's; why isn't Canada, Switzerland, and the Netherlands being attacked?

The real reason, which might be hard for some to accept, is that we have military bases, occupy their "holy land", and invade their country.  Violence is not acceptable, but put yourself in their shoes and ask what you would do if that was happening in your country.

8.29.2011

HPUX 11.31 native multipathing

to see the lun path status, this give you the number of paths and if they are active/alive/dead:

scsimgr lun_map -D /dev/rdisk/diskXXX

8.26.2011

swinstall strange errors - check your hosts file for correct IP

if you get any of the following weird errors doing sdux command, then make sure your hosts file has the correct IP address for the hostname.

swacl, swreg, swinstall 
ERROR:   There is no "depot" ACL at "XXXXXXXXXXX".  The object is, or is part of, a read-only depot.

ERROR:   Could not open remote depot/root
         "XXXXXXXXXXXXXXXX".  The remote daemon failed to
         create the remote agent process:  You do not have the proper
         permissions to perform the requested operation.  Generally,
         this either means the ACL protecting the software object does
         not grant you the permission required for this operation, or
         the software object is part of an unregistered depot.  Use
         "swacl -v" to list and/or edit the ACL, use "swlist -l depot"
         to list registered depots, and use "swreg -l depot" to
         register an unregistered one
ERROR:   Cannot open source.  Check above for errors, as well as the
         daemon logfile on the source host (default location:
         /var/adm/sw/swagentd.log

Verizon Mifi Diags page - force EVDO/3g mode only

to get to the diags page on a Verizon MiFi, open up VZAccess Manager,  do NOT connect.  do: control-D, enter password: diagvzw, hit settings and there you go.

8.18.2011

samsung GSM A687 (Strive) factory reset -- in case you don't have password

dial this:  *2767*3855#   be careful - this erases everything, including the sim card and sd card, I think.

7.24.2011

Garmin Nuvi Issue - "updating GPS Firmware"

Updating GPS Firmware  and  GPS Firmware update complete - if these messages show up on your Garmin Nuvi 260 (or other Garmin GPS devices) consistently when you turn it on, or while it's running, then you may have to delete the contents of the garmin\RemoteSW folder.  Just plug the gps into a PC using a usb cable and it should show up like a storage device/flash drive.  Go into the garmin\remotesw folder/directory and delete the contents.

see the following thread:
https://forums.garmin.com/showthread.php?t=3375

7.01.2011

no powerpath and getting LUN ID

If you don't have powerpath and need to get the LUN ID to device special file (dsf)/ disk device on HP-UX, try using the following switch on the syminq command (part of Solutions Enabler):

syminq -identifier device_name

example:
syminq -identifier device_name | head

Device Device
------------------------- ----------------------- ----------------
Name Num Vendor Array ID Name
------------------------- ----------------------- ----------------

/dev/rdisk/disk428 09B8 EMC *redacted* N/A
/dev/rdisk/disk429 09B9 EMC *redacted* N/A


Actually I think the default syminq output (without any switches) shows the lun id, but it’s hidden in the “device” “serial Number” column. Skip the first 3 digits in the column (part of the array ID). The next 4 digits (or so) are the Lun ID.

Example (lun ID in bold):
Device Product Device
-------------------------- --------------------------- ---------------------
Name Type Vendor ID Rev Ser Num Cap (KB)
-------------------------- --------------------------- ---------------------
/dev/rdisk/disk437 EMC SYMMETRIX 5874 93009C1000 35692800

4.27.2011

Symbolic links on HP CIFS/Samba 3.5.4

using symlinks on HP CIFS/Samba 3.5.4 can be an issue if the parameter unix extensions = yes (which is the default). Look up the man page for smb.conf for more info on it.

use the testparm -v command (-v = verbose), this will show ALL settings (built-in defaults) along with all the custom settings from your config file.

Since "unix extensions" only helps when using HP CIFS clients, IMO it should be disabled by default. so do this in the global section of smb.conf

unix extensions = no

4.19.2011

dbprofile on Itanium servers (and 4.0+ HPVM)

at EFI shell:
display dbprofile:
dbprofile

add/update profile named "ignite" providing only one parameter: dhcp
dbprofile -dn ignite -dhcp

when modifying the profile, only the parameters that are changing need to be listed; you don't need to re-do the entire syntax

three ways that work: first two only work if the ignite server and client are in the same ethernet broadcast domain (subnet).
  - last option gives fast boot time, first and second options requires less administration.

1. dbprofile -dn ignite -dhcp
2. dbprofile -dn ignite -dhcp -b "/opt/ignite/boot/nbp.efi"
3. dbprofile -dn ignite -sip IGNITE.IP.ADDRESS -cip CLIENT.IP.ADDRESS -gip GATEWAY.IP.ADDRESS -m NETMASK -b "/opt/ignite/boot/nbp.efi"

example - ignite IP 192.168.1.2,  client IP 192.168.0.2, gateway/router IP 192.168.0.1, netmask 255.255.255.0
dbprofile -dn ignite -sip 192.168.1.2 -cip 192.168.0.2 -gip 192.168.0.1 -m 255.255.255.0 -b "/opt/ignite/boot/nbp.efi"

to actually use the dbprofile:
lanboot -dn ignite
or to pick a specific NIC to boot from: lanboot select -dn ignite

to find list of NICs, run:
lanaddress

sometimes on NPARS, not all NICs show up, so do the following to re-connect the EFI drivers:
reconnect -r

4.18.2011

HPUX 11.31 lvm2

Wow LVM2 found in HPUX 11.31 has lifted a lot of burdensome limits on volume groups.  vgcreate automatically creates the  device group file; VGs are only limited by the MAX VG size you specify when creating the VG, using the -S option; hitting the max VG size is the only case where a backup/recreate/restore is needed.  Here's a list of helpful commands:

LVMP_CONF_PATH_NON_BOOT  found in /etc/lvmrc  (in March 2010 release)  allows lvm2 vg configuration file backups to an alternate location because of the large size of VG 2.X backups

lvmadm - (-t) displays limits of LVM1 and LVM2 VG 1.0 and VG 2.0 and up;  (-l) also lists the contents of /etc/lvmtab and lvmtab_p

lvmadm -l
--- Version 1.0 volume groups ---
VG Name /dev/vg00
PV Name /dev/disk/disk3_p2
        /dev/disk/disk2_p2

--- Version 2.1 volume groups ---
VG Name /dev/vgXX
PV Name /dev/disk/diskXXX


convert from legacy to persistent DSF: use vgdsf
/usr/contrib/bin/vgdsf –c vgXX

vgcreate using the new LVM2 VG2.0+ notation:
vgcreate -V 2.1 -s 16 -S 4t vgXXX /dev/disk/diskxxx /dev/disk/diskxxx

convert from VG1.0 to VG2.0+
The -r does a "review" to make sure the VG can be converted.
vgversion -V 2.1 -r vgXX

before the convert will run the VG has to be deactivated:
vgchange -a n vgXX
vgversion -V 2.1 vgXX


ioscan new options for persistent dsfs:
ioscan -m dsf /dev/disk/disk127
Persistent DSF           Legacy DSF(s)
========================================
/dev/disk/disk127        /dev/dsk/c5t5d0
                         /dev/dsk/c6t5d0