setaOffice

Intelligence Desk (and hopefully an agency in the future)

Removing a Logical Volume in AIX

Posted by Emerson Takahashi on January 29, 2010

To remove a logical volume, use rmlv. The -f switch is to remove without user confirmation.

Usage: rmlv [ -B ] [ -f ]  [ -p Physical Volume ]  LogicalVolume …
Removes a logical volume.

root@aix:/ # /usr/sbin/rmlv -f rawdevice19
rmlv: Logical volume rawdevice19 is removed.

Posted in Sysadmin | Tagged: , | Leave a Comment »

Discovering what library is necessary to run an application

Posted by Emerson Takahashi on January 11, 2010

I needed to install rsync in a Solaris 9 so I headed to Sunfreeware and download the package. It had the following description:

Rsync is a replacement for rcp that has many more features – installs in /usr/local. Dependencies: popt, libiconv, libintl, and having libgcc_s.so.1 in /usr/local/lib is required. This can be done by installing libgcc-3.4.6 or gcc-3.4.6 or higher, packages also. There are some new features of version 3 that may require your attention of you have used rsync in the past. See the Details link below for more information.

After you install the package, there is a big probability that it won’t work because it will need the libraries listed in the description. Let’s install and find what my system is missing.

root@solaris9:/tmp/rsync # pkgadd -d rsync-3.0.6-sol9-sparc-local

The following packages are available:
1  SMCrsync     rsync
(sparc) 3.0.6

Select package(s) you wish to process (or ‘all’ to process
all packages). (default: all) [?,??,q]: 1

Processing package instance <SMCrsync> from </tmp/rsync/rsync-3.0.6-sol9-sparc-local>

rsync
(sparc) 3.0.6
The Rsync Group
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
2 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing rsync as <SMCrsync>

## Installing part 1 of 1.
/usr/local/bin/rsync
/usr/local/doc/rsync/COPYING
/usr/local/doc/rsync/INSTALL
/usr/local/doc/rsync/NEWS
/usr/local/doc/rsync/OLDNEWS
/usr/local/doc/rsync/README
/usr/local/doc/rsync/TODO
/usr/local/doc/rsync/csprotocol.txt
/usr/local/doc/rsync/doc/README-SGML
/usr/local/doc/rsync/doc/profile.txt
/usr/local/doc/rsync/doc/rsync.sgml
/usr/local/doc/rsync/rsync3.txt
/usr/local/doc/rsync/rsyncsh.txt
/usr/local/doc/rsync/tech_report.tex
/usr/local/doc/rsync/wildtest.txt
/usr/local/share/man/man1/rsync.1
/usr/local/share/man/man5/rsyncd.conf.5
[ verifying class <none> ]

Installation of <SMCrsync> was successful.

Here I invoke ldd to see what my system is missing. It reported libiconv.so.2, so I need to download the libiconv package as said before.

root@solaris9:/tmp/rsync # ldd /usr/local/bin/rsync
libpopt.so.0 =>  /usr/lib/libpopt.so.0
libsec.so.1 =>   /usr/lib/libsec.so.1
libsocket.so.1 =>        /usr/lib/libsocket.so.1
libnsl.so.1 =>   /usr/lib/libnsl.so.1
libiconv.so.2 =>         (file not found)
libc.so.1 =>     /usr/lib/libc.so.1
libdl.so.1 =>    /usr/lib/libdl.so.1
libmp.so.2 =>    /usr/lib/libmp.so.2
/usr/platform/SUNW,Sun-Fire-V440/lib/libc_psr.so.1

root@solaris9:/tmp/rsync # pkgadd -d libiconv-1.11-sol9-sparc-local

The following packages are available:
1  SMCliconv     libiconv
(sparc) 1.11

Select package(s) you wish to process (or ‘all’ to process
all packages). (default: all) [?,??,q]: 1

Processing package instance <SMCliconv> from </tmp/rsync/libiconv-1.11-sol9-sparc-local>

libiconv
(sparc) 1.11
Bruno Haible
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
5 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing libiconv as <SMCliconv>

## Installing part 1 of 1.
/usr/local/bin/iconv
/usr/local/doc/libiconv/ABOUT-NLS
/usr/local/doc/libiconv/AUTHORS
/usr/local/doc/libiconv/COPYING.LIB
/usr/local/doc/libiconv/ChangeLog
/usr/local/doc/libiconv/DESIGN
/usr/local/doc/libiconv/INSTALL.generic
/usr/local/doc/libiconv/NEWS
/usr/local/doc/libiconv/NOTES
/usr/local/doc/libiconv/PORTS
/usr/local/doc/libiconv/README
/usr/local/doc/libiconv/README.djgpp
/usr/local/doc/libiconv/README.os2
/usr/local/doc/libiconv/README.woe32
/usr/local/doc/libiconv/THANKS
/usr/local/include/iconv.h
/usr/local/include/libcharset.h
/usr/local/include/localcharset.h
/usr/local/lib/libcharset.a
/usr/local/lib/libcharset.la
/usr/local/lib/libcharset.so <symbolic link>
/usr/local/lib/libcharset.so.1 <symbolic link>
/usr/local/lib/libcharset.so.1.0.0
/usr/local/lib/libiconv.la
/usr/local/lib/libiconv.so <symbolic link>
/usr/local/lib/libiconv.so.2 <symbolic link>
/usr/local/lib/libiconv.so.2.4.0
/usr/local/lib/preloadable_libiconv.so
/usr/local/man/man1/iconv.1
/usr/local/man/man3/iconv.3
/usr/local/man/man3/iconv_close.3
/usr/local/man/man3/iconv_open.3
/usr/local/man/man3/iconvctl.3
/usr/local/share/doc/iconv.1.html
/usr/local/share/doc/iconv.3.html
/usr/local/share/doc/iconv_close.3.html
/usr/local/share/doc/iconv_open.3.html
/usr/local/share/doc/iconvctl.3.html
[ verifying class <none> ]

Installation of <SMCliconv> was successful.

Invoking ldd again to see if all dependencies are met. Now I need to install libgcc.

root@solaris9:/tmp/rsync # ldd /usr/local/bin/rsync
libpopt.so.0 =>  /usr/lib/libpopt.so.0
libsec.so.1 =>   /usr/lib/libsec.so.1
libsocket.so.1 =>        /usr/lib/libsocket.so.1
libnsl.so.1 =>   /usr/lib/libnsl.so.1
libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
libc.so.1 =>     /usr/lib/libc.so.1
libdl.so.1 =>    /usr/lib/libdl.so.1
libmp.so.2 =>    /usr/lib/libmp.so.2
libgcc_s.so.1 =>        (file not found)
/usr/platform/SUNW,Sun-Fire-V440/lib/libc_psr.so.1

root@solaris9:/tmp/rsync # pkgadd -d libgcc-3.4.6-sol9-sparc-local

The following packages are available:
1  SMClgcc346     libgcc
(sparc) 3.4.6

Select package(s) you wish to process (or ‘all’ to process
all packages). (default: all) [?,??,q]: 1

Processing package instance <SMClgcc346> from </tmp/rsync/libgcc-3.4.6-sol9-sparc-local>

libgcc
(sparc) 3.4.6
FSF
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
1 package pathname is already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing libgcc as <SMClgcc346>

## Installing part 1 of 1.
/usr/local/lib/libg2c.so <symbolic link>
/usr/local/lib/libg2c.so.0 <symbolic link>
/usr/local/lib/libg2c.so.0.0.0
/usr/local/lib/libgcc_s.so <symbolic link>
/usr/local/lib/libgcc_s.so.1
/usr/local/lib/libstdc++.so.6 <symbolic link>
/usr/local/lib/libstdc++.so.6.0.3
[ verifying class <none> ]

Installation of <SMClgcc346> was successful.

No more messages saying that some file is missing. The application is running as expected.

root@solaris9:/tmp/rsync # ldd /usr/local/bin/rsync
libpopt.so.0 =>  /usr/lib/libpopt.so.0
libsec.so.1 =>   /usr/lib/libsec.so.1
libsocket.so.1 =>        /usr/lib/libsocket.so.1
libnsl.so.1 =>   /usr/lib/libnsl.so.1
libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
libc.so.1 =>     /usr/lib/libc.so.1
libdl.so.1 =>    /usr/lib/libdl.so.1
libmp.so.2 =>    /usr/lib/libmp.so.2
libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
/usr/platform/SUNW,Sun-Fire-V440/lib/libc_psr.so.1

root@solaris9 # rsync
rsync  version 3.0.6  protocol version 30
Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, no IPv6, batchfiles, inplace,
append, ACLs, no xattrs, iconv, no symtimes

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

rsync is a file transfer program capable of efficient remote update
via a fast differencing algorithm.

Posted in Sysadmin | Tagged: , | Leave a Comment »

How to perform a Sun SC Failover

Posted by Emerson Takahashi on January 1, 2010

Check if there is any data synchronization running between the System Controllers. The File Propagation State must be set as active and there must not show any file in Active File or Queued Files.

e20k-sc0:sms-svc> showdatasync
File Propagation State: ACTIVE
Active File:            -
Queued Files:           0

Each system controller must not have any status different from Good to prevent the failover. The failover must be active.

e20k-sc0:sms-svc> showfailover -v
SC Failover Status:     ACTIVE
Status of Shared Memory:
HASRAM (CSB at CS0):     …………………………………Good
HASRAM (CSB at CS1):     …………………………………Good

Status of e20k-sc0:
Role:                    …………………………………MAIN
SMS Daemons:             …………………………………Good
System Clock:            …………………………………Good
Private I2 Network:      …………………………………Good
Private HASRAM Network:  …………………………………Good
Public Network:
Group “C1″:      …………………………………..Up
eri0:              …………………………………..Up
eri3:              …………………………………..Up
Logical IP Addr. – C1:…………………………………..Up
System Memory:           ………………………………….4.9%
Disk Status:
/:                   ………………………………….3.6%
Console Bus Status:
EXB at EX0:          …………………………………Good
EXB at EX1:          …………………………………Good
EXB at EX2:          …………………………………Good
EXB at EX3:          …………………………………Good
EXB at EX4:          …………………………………Good
EXB at EX5:          …………………………………Good
EXB at EX6:          …………………………………Good
EXB at EX8:          …………………………………Good
EXB at EX9:          …………………………………Good
EXB at EX10:         …………………………………Good
EXB at EX11:         …………………………………Good
EXB at EX12:         …………………………………Good
EXB at EX13:         …………………………………Good
EXB at EX14:         …………………………………Good
EXB at EX15:         …………………………………Good
EXB at EX16:         …………………………………Good
EXB at EX17:         …………………………………Good

Status of e20k-sc1:
Role:                    ………………………………..SPARE
SMS Daemons:             …………………………………Good
System Clock:            …………………………………Good
Private I2 Network:      …………………………………Good
Private HASRAM Network:  …………………………………Good
Public Network:
Group “C1″:      …………………………………..Up
eri0:              …………………………………..Up
eri3:              …………………………………..Up
Logical IP Addr. – C1:……………………………..Inactive
System Memory:           ………………………………….4.6%
Disk Status:
/:                   ………………………………….3.5%
Console Bus Status:
EXB at EX0:          …………………………………Good
EXB at EX1:          …………………………………Good
EXB at EX2:          …………………………………Good
EXB at EX3:          …………………………………Good
EXB at EX4:          …………………………………Good
EXB at EX5:          …………………………………Good
EXB at EX6:          …………………………………Good
EXB at EX8:          …………………………………Good
EXB at EX9:          …………………………………Good
EXB at EX10:         …………………………………Good
EXB at EX11:         …………………………………Good
EXB at EX12:         …………………………………Good
EXB at EX13:         …………………………………Good
EXB at EX14:         …………………………………Good
EXB at EX15:         …………………………………Good
EXB at EX16:         …………………………………Good
EXB at EX17:         …………………………………Good

You run setfailover force to perform the failover. If there is a problem on the spare clock input, it can cause a domain stop (it is going to power off all the domains)

e20k-sc0:sms-svc> setfailover force
Forcing failover. Do you want to continue (yes/no)? yes
The spare clock input on some boards might be bad. Forcing a failover now is likely to cause the affected domains to domain stop (Dstop).
Do you want to continue (yes/no)? yes

Checking service status

e20k-sc0:sms-svc> showfailover -r
SPARE

When you manually failover, the automatic failover is disabled

e20k-sc0:sms-svc> showfailover –v | grep “SC Failover Status”
SC Failover Status:     DISABLED

You need to manually activate the automatic failover again to return to the previous status

e20k-sc0:sms-svc> setfailover on
e20k-sc0:sms-svc> showfailover -v | grep “SC Failover Status”
SC Failover Status:     ACTIVATING

e20k-sc1:sms-svc> showfailover -v | grep “SC Failover Status”
SC Failover Status:     ACTIVE

Posted in Sysadmin | Tagged: , , , | Leave a Comment »

REvolution Computing receives funding from North Bridge Ventures and Intel Capital

Posted by Emerson Takahashi on December 19, 2009

REvolution Computing is a company that provides support for the open source R programming language and they received US$9 million from North Bridge Venture and Intel Capital.

Intel Capital is the investment division that was created to see possible new markets and threats to Intel. They invested in Red Hat, MySQL, Marvell Technology Group and recently also funded Joyent, a cloud computing company.

Posted in Enterprises | Tagged: , , , , , , , | Leave a Comment »

sendmail – Warning: RunAsUser for MSP ignored, check group ids

Posted by Emerson Takahashi on December 17, 2009

Every time that I sent an email with an user, the system was displaying the message that could not chdir to the mail directory. I solved following the steps below:

user@linux:~ $ mail blackhole@domain.com
Subject: Test
Sending email to test
.
Cc:
user@linux:~ $ WARNING: RunAsUser for MSP ignored, check group ids (egid=503, want=51)
can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.

The group ID 503 was from the user that was logged in and sending the mail. The problem in this system was that it needed setgid set in the sendmail binary file.

root@linux:~ # ls -l /usr/sbin/sendmail.sendmail
-rwxrwxrwx  1 root smmsp 757168 Apr 15  2008 /usr/sbin/sendmail.sendmail

root@anotherlinuxhost:~ # ls -l /usr/sbin/sendmail.sendmail
-rwxr-sr-x  1 root smmsp 757168 Apr 15  2008 /usr/sbin/sendmail.sendmail

root@linux:~ # chmod 2755 /usr/sbin/sendmail.sendmail
root@linux:~ # ls -l /usr/sbin/sendmail.sendmail
-rwxr-sr-x  1 root smmsp 757168 Apr 15  2008 /usr/sbin/sendmail.sendmail

Restarted sendmail and no error message is shown when sending a message.

root@linux:~ # service sendmail restart
Shutting down sm-client:                                   [  OK  ]
Shutting down sendmail:                                    [  OK  ]
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]

user@linux:~ $ mail blackhole@domain.com
Subject: Test
Sending email to test
.
Cc:
user@linux:~ $

Posted in Sysadmin | Tagged: , | Leave a Comment »

SteelSeries Siberia USB Soundcard on Windows 7

Posted by Emerson Takahashi on December 7, 2009

I bought a SteelSeries 5Hv2 USB on ProGaming Computer. It’s a nice headset and comes with a USB soundcard similar to the SteelSeries Siberia USB soundcard.

According to the website, it had drivers for Windows XP and Windows Vista but no  support for Windows 7. I solved this problem by installing a beta driver available at the SteelSeries blog. Other people reported success right-clicking the driver installer and selecting to execute in Windows Vista combatibility mode.

Now you just need to download the official Windows 7 drivers at the manufacturer’s website.

Posted in Games, Hardware | Tagged: , , , , , | Leave a Comment »

Sun System Management Services – Error: Exclusive session is in use, disconnecting.

Posted by Emerson Takahashi on December 6, 2009

You need to connect to a System Controller (SC) to manage a domain in a Sun Fire E12K, E15K, E20K or E25K. It has the System Management Services (SMS) software that allows you to control the domains.

To view the console, you use /opt/SUNWSMS/bin/console -d <domain letter or domain name> but I was having the error message “Exclusive session is in use, disconnecting”.

sms-svc@sc0:/ $ console -d domain06
Trying to connect…
Connected to Domain Server.

Exclusive session is in use, disconnecting.

I asked to a friend why I was having this problem and he said that I needed to kill the other session.

sms-svc@sc0:/ $ w
9:24am  up 76 day(s),  3:53,  2 users,  load average: 0.91, 2.04, 1.52
User     tty           login@  idle   JCPU   PCPU  what
root     pts/1         9:08am     9                console -d domain06
root     pts/2         9:19am                      w

I found out which PID is running the console, then killed it.

sms-svc@sc0:/ $ ps -ef | grep consol
root  3127     1  0   Sep 19 console  0:00 /usr/lib/saf/ttymon -g -h -p sc0-01-vix console login:  -T sun -d /dev/console
sms-svc 11229 11182  0 09:24:18 pts/2    0:00 grep consol
sms-svc  5492 5398  0 09:09:23 pts/1    0:00 console -d domain06

sms-svc@sc0:/ $ kill 5492

Worked as expected:

sms-svc@sc0:/ $ /opt/SUNWSMS/bin/console -d domain06
Trying to connect…
Connected to Domain Server.
Your console is in exclusive mode now.

Posted in Sysadmin | Tagged: , , | Leave a Comment »

Informix Dynamic Server – Logical log files are almost full – backup is needed

Posted by Emerson Takahashi on November 23, 2009

Yesterday we had a problem with an Informix Dynamic Server that wasn’t going to Online Mode. The problem was that the Logical log was full and it hang the Informix Dynamic Server

root@hp-ux:/ # tail -f /usr/informix/onlinep.log

Sun Nov 22 10:48:32 2009

10:48:32  Event alarms enabled.  ALARMPROG = ‘/usr/informix/etc/log_full.sh’
10:48:33  Booting Language <c> from module <>
10:48:33  Loading Module <CNULL>
10:48:33  Booting Language <builtin> from module <>
10:48:33  Loading Module <BUILTINNULL>
10:48:38  Informix Dynamic Server 2000 Version 9.21.FC5     Software Serial Number
10:48:38  Informix Dynamic Server 2000 Initialized — Shared Memory Initialized.

10:48:38  Physical Recovery Started at Page(4:21673).
10:48:38  Physical Recovery Complete: 0 Pages Examined 0 Pages Restored.

10:48:38  Logical Recovery Started.
10:48:38  10 recovery worker threads will be started.
10:48:41  Logical Recovery Complete.
0 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks

10:48:42  Logical log files are almost full – backup is needed.
10:48:42  Dataskip is now OFF for all dbspaces
10:48:42  Checkpoint Completed:  duration was 0 seconds.
10:48:42  Checkpoint loguniq 5951, logpos 0×18018

10:48:42  Dropping temporary TBLspace 100120, recovering 8 pages.

The problem was solved when someone ran ontape -c and it backed up the log to the tape.

Posted in Sysadmin | Tagged: , , , , | Leave a Comment »

Cray Upgrades “Kraken” Supercomputer with Six-Core AMD Opteron Processors

Posted by Emerson Takahashi on November 21, 2009

The third Supercomputer according to the Top 500 List is getting a CPU upgrade by Cray. The AMD Quad-Core processors are being replaced by Six-Core processors without having to replace any board.

Posted in Hardware | Tagged: , , , | Leave a Comment »

AIX Volume Group can’t properly display the Logical Volume Type

Posted by Emerson Takahashi on October 13, 2009

Listing the logical volumes inside the volume group. AIX can’t determine the LV type.

root@aix:/ # lsvg -l oravg
oravg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
oravg_lg            ??? 1     1     1    closed/syncd  N/A
ora_lv              ??? 1064  1064  2    closed/syncd  N/A

To solve this problem we’ll export then reimport the VG. But first we’ll need to deactivate it.

root@aix:/ # varyoffvg oravg

And we need at least one disk that is part of the volume group because it has the information needed to import.

root@aix:/ # lspv | grep oravg
hdisk251
00c5f1d097cc8a6e                   oravg
hdisk221
00c5f1d0a7bffede                    oravg

Now we run exportvg and the server will no longer know it once had the volume group.

root@aix:/ # exportvg oravg

Let’s list all the volume groups the server is aware that exists.

root@aix:/ # lsvg
rootvg
datavg
cache01vg
cache02vg

Only the rootvg is currently imported and active.

root@aix:/ # lsvg -o
rootvg

Let’s reimport the volume group. We need to declare one of the disks we listed before to reimport the volume group.

root@aix:/ # importvg -y oravg hdisk251
oravg

Next, we activate the volume group

root@aix:/ # varyonvg oravg

Listing the Volume Group. Volume Group TYPE listed.

root@aix:/ # lsvg -l oravg
oravg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
oravg_lg            jfs2log    1     1     1    closed/syncd  N/A
ora_lv              jfs2       1064  1064  2    closed/syncd  /u01

Posted in Sysadmin | Tagged: , , | Leave a Comment »