Wednesday, August 28, 2013

Read and Clear big wtmpx

Read
/usr/lib/acct/fwtmp < wtmpx


Clear
cd /var/adm
gzip -c wtmpx > wtmpx-2013.gz
> wtmpx

Friday, June 28, 2013

Adding New Xml Encoding Alias to Xerces

Recently I developed an xmlrpc application that failed on testing from an existing client (the stupid one). That client set its request encoding in xml header as "UTF8" (the standard IANA is "UTF-8"). It result in rejecting the request immediately in xmlroc server (I deployed in Jboss EAP 6.1) by following exception.

Invalid encoding name "UTF8"

So after searching I found the EncodingMap class of xerces that allow add new alias for encoding names. So first add xercesImpl dependency in maven file, an then statically add the desired encoding name as follow:

EncodingMap.putIANA2JavaMapping( "UTF8", "UTF8" );

EncodingMap.putJava2IANAMapping( "UTF8", "UTF8" );


Saturday, June 8, 2013

Create Solaris 10 IPMP

Requirement:
2 connected interface
3 IP addresses (1 for active, 2 for interface tests)

It is probe based IPMP (testing destination IP)

Update /etc/hosts
10.132.174.144    hostaddress

10.132.174.146    host-testaddr0
10.132.174.146    host-testaddr1

ifconfig intf0 host-testaddr0 deprecated -failover netmask + broadcast + group host_g0 up
ifconfig intf0 addif hostaddress netmask + broadcast + up

ifconfig intf1 host-testaddr1 deprecated -failover netmask + broadcast + group host_g0 up

Make it permanent by /etc/hostname.intfx

Tuesday, May 28, 2013

Netra T2000 PCIEX Fault

After installing new Solaris (u11 01/13) I got hardware fault for PCIEX as follow:
  ID Time              FRU               Fault
   6 JAN 01 02:08:21   IOBD              Host detected fault, MSGID: PCIEX-8000-DJ  UUID: 598ad722-6e4c-4335-f86a-ec627b5c2b3c
   7 JAN 01 02:08:21   MB                Host detected fault, MSGID: PCIEX-8000-DJ  UUID: 598ad722-6e4c-4335-f86a-ec627b5c2b3c

Finally found in server product notes a trick for /etc/system to config system to fix it

/etc/system
set pcie:pcie_aer_ce_mask=0x1
set segkmem_lpsize=0x400000

Also found some other config that may relate to improve performance for other things

set ip:ip_soft_rings_cnt=0
set pcie:pcie_aer_ce_mask=0x1
forceload: sys/shmsys
forceload: sys/semsys
set semsys:seminfo_semmni=20
set semsys:seminfo_semmsl=100
set semsys:seminfo_semmns=2000
set semsys:seminfo_semmnu=2000
set shmsys:shminfo_shmmax=0x140000000

Solaris Fault Management

SC (ILOM/ALOM):
showfaults
showfaults -v

Clear faults

clearfault

OS
List faults with details
fmadm faulty

fmdump

TIME                 UUID                                 SUNW-MSG-ID
May 28 14:27:27.3993 247a4225-6ed7-ca23-c85f-c98c461ac7ec ZFS-8000-D3

Fault location and more details

#fmdump -vu

Clear faults

fmadm repair 
cd /var/fm/fmd
rm e* f* c*/eft/* r*/*
fmadm reset cpumem-diagnosis
fmadm reset cpumem-retire
fmadm reset eft
fmadm reset io-retire

-----------------------------------------------------------
iLom
show /SP/faultmgmt

start /SP/faultmgmt/shell

fmadm faulty

fmadm repaired 1feeeff2-5371-c970-c8c7-d82c50b42c6b

Monday, April 22, 2013

Prepare Used Disk for ZPool

Is the disk is already used, you may get can't attach EFI disk to root pool.

If it happens, use format to remove all partition and make sure S2 (in sparc) P0 (in X86) is owning whole disk to assign the disk to pool completely.


partition> p
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 -    25      129.19MB    (26/0/0)       264576
  1       swap    wu      26 -    51      129.19MB    (26/0/0)       264576
  2     backup    wu       0 - 14086       68.35GB    (14087/0/0) 143349312
  3 unassigned    wm       0                0         (0/0/0)             0
  4 unassigned    wm       0                0         (0/0/0)             0
  5 unassigned    wm       0                0         (0/0/0)             0
  6        usr    wm      52 - 14086       68.10GB    (14035/0/0) 142820160
  7 unassigned    wm       0                0         (0/0/0)             0

partition> 0
Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 -    25      129.19MB    (26/0/0)       264576

Enter partition id tag[root]: unassigned
Enter partition permission flags[wm]:
Enter new starting cyl[0]:
Enter partition size[264576b, 26c, 25e, 129.19mb, 0.13gb]: 0
partition> 1
Part      Tag    Flag     Cylinders         Size            Blocks
  1       swap    wu      26 -    51      129.19MB    (26/0/0)       264576

Enter partition id tag[swap]: unassigned
Enter partition permission flags[wu]:wm
Enter new starting cyl[26]: 0
Enter partition size[264576b, 26c, 25e, 129.19mb, 0.13gb]: 0


partition> 2
Part      Tag    Flag     Cylinders         Size            Blocks
  2     backup    wu       0 - 14086       68.35GB    (14087/0/0) 143349312

Enter partition id tag[backup]: unassigned
Enter partition permission flags[wu]: wm
Enter new starting cyl[0]:
Enter partition size[143349312b, 14087c, 14086e, 69994.78mb, 68.35gb]: 68.35gb


partition> l
Ready to label disk, continue? y

Solaris Fiber Channel Check

fcinfo hba-port

Check local side
fcinfo hba-port -l

Check remote side
fcinfo remote-port -slp

Port status
luxadm -e port

Link errors
luxadm -e rdls /dev/cfg/c2
luxadm -e rdls /dev/cfg/c3

Test path
luxadm disp /dev/rdsk/c2t0d0s2

Inquiry Path
luxadm inq /dev/rdsk/c2t0d0s2

SCSI information
cfgadm -al

FC ports
mpathadm list initiator-port

MPath support
mpathadm list mpath-support

Show logical units
mpathadm show lu /dev/rdsk/c2t0d0s2