Archive

Archive for April, 2011

configure syslog to redirect WebSphere Message Broker (mq) messages to file

April 29th, 2011 No comments

On Linux® and UNIX® systems, all WebSphere® Message Broker messages (other than those generated by the command line utilities) are sent to the syslog, so it is useful to redirect user messages to a separate file.

Start of changeOn UNIX, syslog entries are restricted in length and messages that are sent to the syslog are truncated by the new line character. To record a large amount of data in a log on UNIX, set the Destination property on the Trace node to File or User Trace instead of Local Error Log.End of change

Before you create a broker on Linux or UNIX systems, configure the syslog daemon to redirect user messages to a file called user.log:

Log on as root.
Enter the following commands to create a file called user.log.
On UNIX systems, enter the command: Read more…

Categories: IT Architecture, Linux Tags: , ,

Resolved:solaris patch panic – cannot start the system after patch

April 27th, 2011 No comments

Here goes the whole story:

Step 1. patch with PCA. after reboot — -r

Rebooting with command: boot -r

Boot device: /pci@1c,600000/scsi@2/disk@0,0:a  File and args: -r

SunOS Release 5.10 Version Generic_142900-13 64-bit

Copyright 1983-2010 Sun Microsystems, Inc.  All rights reserved.

Use is subject to license terms.

WARNING: mod_load: cannot load module ‘sharefs’

WARNING: Cannot mount /etc/dfs/sharetab

 

Hardware watchdog enabled

/kernel/drv/sparcv9/ip: undefined symbol ‘ddi_get_lbolt64′

WARNING: mod_load: cannot load module ‘ip’

/kernel/fs/sparcv9/sockfs: undefined symbol ‘sock_comm_create_function’

/kernel/fs/sparcv9/sockfs: undefined symbol ‘smod_lookup_byname’

/kernel/fs/sparcv9/sockfs: undefined symbol ‘sctp_disconnect’

/kernel/fs/sparcv9/sockfs: undefined symbol ‘sctp_getsockname’

/kernel/fs/sparcv9/sockfs: undefined symbol ‘nd_free’

/kernel/fs/sparcv9/sockfs: undefined symbol ‘nd_load’

/kernel/fs/sparcv9/sockfs: undefined symbol ‘UDP_WR’

 

Step 2. zfs Roll back

ok>boot -F failsafe

#zfs rollback rpool/ROOT/sol10_sparc@pre_patched.142900-13_04.03.2011

 

Step 3. Patch with PCA again, then “halt”, boot archive is not updated after patching, so we need remove the boot_archive

ok>boot -F failsafe

# mv /a/platform/`uname -i`/boot_archive /a/root/b_back

# /a/sbin/bootadm update-archive -R /a

# reboot

 

Step 4. Server is patched

root@solaris01~# uname -a

SunOS solaris01 5.10 Generic_144488-06 sun4u sparc SUNW,Sun-Fire-V240

Step 5. Restore the Zone Read more…

Categories: Kernel, Unix Tags: ,

Steps to create new volume of VxVM under solaris

April 27th, 2011 1 comment

1.Take snapshot of running processes, filesystem partitions, network connections:
#/usr/ucb/ps aauuxxww>/running_processes.2011.04.25
#df -k>/filesystem.2011.04.25
#netstat -rnv>/networking.2011.04.25

2.Check free space of dg(disk group), sector position of dm(disk media), and subdisk allocation:
#vxprint

3.Let’s see the lengths and offsets of all subdisks under plexes:

vxprint -st

You can also use iostat -En.

Where free sectors lay on the disks:

#vxdg -g abinitio free

#vxassist -g abinitio maxsize

4.Create v(volume):
vxassist -g abinitio make ora2 5g

After this, you can see in vxprint:
v  ora2         fsgen        ENABLED  10485760 -        ACTIVE   -       -
pl ora2-01      ora2         ENABLED  10487040 -        ACTIVE   -       -
sd disk1-14     ora2-01      ENABLED  10487040 0        -        -       -

And,
#fstyp /dev/vx/dsk/abinitio/ora2
Unknown_fstyp (no matches)

Let’s create filesystem for volume ora2: Read more…

Categories: Storage Tags:

luxadm usage

April 24th, 2011 No comments

Here’s the more detailed one about luxadm, please refer to this:

 

luxadm forcelip/display on solaris 10

http://www.doxer.org/learn-linux/luxadm-forcelipdisplay-on-solaris-10/

Some of the basic usage:

luxadm probe                 (discovers fcal)
luxadm display Enclosure (displays information on fcal box)
luxadm reserve /dev/rdsk/c#t#d#s# (reserves device so it can’t be accessed)
luxadm -e offline /dev/rdsk/c#t#d#s#     (takes a device offline)
luxadm -e bus_quiesce /dev/rdsk/c#t#d#s#    (quiesce the bus)
luxadm -e bus_unquiesce /dev/rdsk/c#t#d#s# (unquiesce the bus)
luxadm -e online /dev/rdsk/c#t#d#s#    (bring the disk device back online)
luxadm release /dev/rdsk/c#t#d#s#    (unreserved the device for use)
luxadm remove_device BAD,f2    (removes a device from slot f2 on enclosure BAD)
luxadm insert_device BAD,f2     (hot plug a new device to slot f2 on enclosure BAD)

What’s luxadm used for?

luxadm is an utility, which discovers FC devices (luxadm probe), shut downs devives (luxadm shutown_device …) runs a firmware upgrade (luxadm download_firmware …) and many other things. Read more…

Categories: Storage, Unix Tags: ,

Difference between dm, dmp, rdmp, v, pl, sd, lun, c, t, d, s

April 24th, 2011 No comments

dm – disk media

dmp – disk media mapping

rdmp – an rdmp file is a mapping to a raw device stored on a san.  rdmp specifically is a physical mode rdm.  This data, although you may see it as the actual size of the raw device, is only a pointer to the actual storage to a volume on your SAN.

v – volume

pl – plex

sd – subdisk

lun – logic unit number

NOTE:

Disks (dm) must be added to a disk group (dg) under Veritas. A volume contains one or more plexes which in turn contain one or more subdisks.

And again, for the famous c, t, d, s issue: Read more…

Categories: Storage Tags:

Resolved:[Load Manager Shared Memory]. Error is [28]: [No space left on device](for apache, pmserver etc. running on linux, solaris, unix)

April 23rd, 2011 No comments

This error may occur in pmserver, apache, oracle, rsync, up2date and many other services running on linux, solaris, unix, so it’s a widespread and a famous question if you try to search google the keyword:”[Load Manager Shared Memory].  Error is [28]: [No space left on device]“.
Now, let’s take pmserver running on solaris10 for example to demonstrate to you step by step on how to solve the annoying problem.
Firstly, from “[No space left on device]” and “Load Manager Shared Memory”, we firstly guessed that it’s caused by shortage of memory, but after checking, we can see that memory is enough to allocate:

1.check the total memory size:
# /usr/sbin/prtconf |grep -i mem
Memory size: 32640 Megabytes
memory (driver not attached)
virtual-memory (driver not attached)
2.check application project memory size:
# su – sbintprd #as you have guessed, pmserver is running by user sbintprd in the box
$ id -p
uid=71269(sbintprd) gid=70772(sbintprd) projid=3(default)
This means that pmserver is running inside ‘default’ project. Then let’s check the setting of “default” project:
# projects -l default
default
projid : 3
comment: “”
users  : (none)
groups : (none)
attribs: project.max-msg-ids=(privileged,256,deny)
project.max-shm-memory=(privileged,17179869184,deny)
# prctl -n project.max-shm-memory -i project default
project: 3: default
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-memory
privileged      16.0GB      -   deny                                 -
system          16.0EB    max   deny                                 -
16GB available to ‘default’ project. How come the shortage of memory then?
Let’s bump up the max-shm-memory size by 2 GB to see what happens:
#prctl -n project.max-shm-memory -r -v 18gb -i project default
After this, we tried to bounce the pmserver, but the problem is still there:

#tail -f pmserver.log
INFO : LM_36070 [Fri Apr 22 22:19:42 2011] : (25218|1) The server is running on a host with 32 logical processors.
INFO : LM_36039 [Fri Apr 22 22:19:42 2011] : (25218|1) The maximum number of sessions that can run simultaneously is [10].
FATAL ERROR : CMN_1011 [Fri Apr 22 22:19:42 2011] : (25218|1) Error allocating system shared memory of [2000000] bytes for [Load Manager Shared Memory].  Error is [28]: [No space left on device]
FATAL ERROR : SF_34004 [Fri Apr 22 22:19:42 2011] : (25218|1) Server initialization failed.
INFO : SF_34014 [Fri Apr 22 22:19:42 2011] : (25218|1) Server shut down.

OK, then, we should think in other ways.
As we know, linux use shared memory between processes. We can use ipcs to check the information about  active  shared  memory  segments:

# ipcs -m|grep sbintprd
m  671088691   0          –rw——- sbintprd sbintprd
NOTE:pmserver is running by user sbintprd in the box
Then,
ipcs -mA|grep sbintprd|wc -l
92
And each of them use 20000 size:
IPC status from <running system> as of Sat Apr 23 03:29:51 BST 2011
T         ID      KEY        MODE        OWNER    GROUP  CREATOR   CGROUP NATTCH      SEGSZ  CPID  LPID   ATIME    DTIME    CTIME  ISMATTCH         PROJECT
Shared Memory:
m  671088691   0          –rw——- sbintprd sbintprd sbintprd sbintprd      1    2000000  7781 16109  3:28:35  3:28:50  2:01:43        0         default

Now, we can conclude that the sbintprd user has over allocated and is not freeing up the space.
Let’s clear the shared memeory:

#for i in `ipcs -m | grep prd | awk ‘{print $2}’`; do ipcrm -m $i; done
After this step, the pmserver started successfully. From the log we can see:
NFO : LM_36070 [Sat Apr 23 01:51:17 2011]
: (5979|1) The server is running on a host with 32 logical processors.
INFO : LM_36039 [Sat Apr 23 01:51:18 2011] : (5979|1) The maximum number of sessions that
can run simultaneously is [10].
INFO : CMN_1010 [Sat Apr 23 01:51:18 2011] : (5979|1) Allocated system shared memory [id =
469762275] of [2000000] bytes for [Load Manager Shared Memory].
INFO : LM_36095 [Sat Apr 23 01:51:50 2011] : (5979|1) Persistent session cache file
cleanup is scheduled to run on [Sun Apr 24 01:51:50 2011].
INFO : SF_34003 [Sat Apr 23 01:51:50 2011] : (5979|1) Server initialization completed.

Problem resolved!