Archive for category solaris

Auto Power On : Restore on AC power loss X6240

To restore on AC power loss on a X6240

1) Enter BIOS SETUP UTILITY

2) Chipset -> SouthBridge/MCP55 Configuration

3) Restore on AC Power Loss -> Power ON

Ready !!

, , , , ,

No Comments

crontab -e Editor enviroment

~]#cat .bash_profile
export TERM=xterm
export PATH=$PATH:/opt/csw/sbin/:/opt/SUNWhpc/HPC8.1/sun/bin
source ~/.bashrc
EDITOR=vim
export EDITOR

No Comments

/dev/rmt0 Device busy

/dev/rmt0 Device busy

If you are an Administrator and especially a backup administrator there is a very high chance that you get stuck with this error message with your backup.

If you do a

# mt -f /dev/rmt0n status

(infact any option with the mt or related command)

and end up with the error

/dev/rmt0n: Device Busy

then the most probable problem could be your Tape drive is still being used by the backup program or some related process.

The first thing to check would which process has locked your Tape drive. This can be done using the fuser utility.

# fuser -u /dev/rmt/0n

This will output the process ID that is actually holding the /dev/rmt0n device. The fuser can also be used against files.

Now, use

# ps -ef | grep

This will show the process. Now, kill the process using

# kill

If this fails, then use

# kill -9

if still fails, use

#pkill -9

That should do. You can check the status by using

# mt -f /dev/rmt0n status

Posted by Kumaran at 00:34

Labels: Solaris backup rmt device busy mt status fuser

No Comments

Hot-standby

Hi All,

I am fairly new to Solaris. I am running Solaris10 on a SunFire V240. I’d like to team mutliple NIC’s into a single interface with a single IP address. I’d like the to operate in a hot-standby mode

(I have seen this done in Windows and Linux (via bond config)

I have read documentation “How to Configure a Standby Interface for an IPMP Group” but I do not understand why I need to configure “test addresses”. This means I end up with 3 IP addresses, 2 test addresses on each NIC and then the actual interface IP address.

In the Windows and Linux setups, I have only 1 IP.

Has anybody done this with solaris 10 before?

Many thanks for any help you can provide. I apologise for the double-post. Can somebody remove my first post in “General Solaris 10 Discussion”

Jag

Edited by: jagajutt on Jul 15, 2008 6:46 AM

From your info, I think you are confusing “IPMP” and “trunking” (a.k.a. link aggregation).

When you say “‘d like to team mutliple NIC’s into a single interface with a single IP address” that is link aggregation. When you say “I’d like the to operate in a hot-standby mode”, that sounds like IPMP.

BTW, to do link aggregation, you need a GLDv3 interface. If you are using the bge’s on the 240, they qualify. You can configure link aggregations from multiple interfaces and then put them into IPMP groups, does that sound like what you need?

IMPORTANT: you need to start with UNPLUMBED INTERFACES. You need to ensure the switchports you are using are also configured for link aggregations.

for purposes of example, assume you want to create 2 link aggrs, each containing 2 bge interfaces. First, create the link aggregations and plumb them up.

reference: docs.sun.com Home > Solaris 10 System Administrator Collection > System Administration Guide: IP Services > TCP/IP Administration > 6. Administering Network Interfaces (Tasks)

dladm create-aggr -d bge0 -d bge1 1
ifconfig aggr1 plumb 192.168.84.14 up

dladm create-aggr -d bge2 -d bge3 2
ifconfig aggr2 plumb 192.168.84.15 up

dladm show-aggr (to list them)

create the files needed to make these persistent across reboots:

# vi /etc/hostname.aggr1
192.168.84.14

#vi /etc/hostname.aggr2
192.168.84.15

ifconfig will show these as “aggr1″ and “aggr2″ with the ip addresses you assigned. You can stop here if you just want link aggrs.

To put then in an active-active IPMP config:

ifconfig aggr1 group yourgroupname up

ifconfig aggr2 group yourgroupsname up

to make that persistent, add the “group yourgroupname” to the hostname.aggr1 and hostname.aggr2 files. To make one of the aggrs standby, include the “standby” keyword in the ifconfig command and the hostname.aggrX files.

I think that is all you need!

, , ,

No Comments

IPMP – IP Network Multipathing

IPMP – IP Network Multipathing

Link-based failure detection works via network interface kernel driver.
(bge, qfe, ce, eri, hme…)

Uniq MAC address/nic…
On SPARC machine (set true, if there is false):
[root@v240 /] eeprom “local-mac-address?”
local-mac-address?=true

[root@v240 /] ifconfig bge0
bge0: flags=1000843 mtu 1500 index 2
inet 172.16.50.64 netmask ffffff00 broadcast 172.16.50.255
ether 0:3:ba:54:bc:7d

[root@v240 /] dladm show-dev
bge0 link: up speed: 100 Mbps duplex: full
bge1 link: unknown speed: 0 Mbps duplex: unknown
ce0 link: unknown speed: 100 Mbps duplex: half
ce1 link: unknown speed: 100 Mbps duplex: full
ce2 link: unknown speed: 0 Mbps duplex: unknown
ce3 link: unknown speed: 100 Mbps duplex: full
bge2 link: unknown speed: 0 Mbps duplex: unknown
bge3 link: unknown speed: 0 Mbps duplex: unknown

[root@v240 /] cat /etc/hosts |grep v240
172.16.50.64 v240
172.16.50.63 v240-ce3

[root@v240 /] cat /etc/inet/netmasks
10.0.0.0 255.255.255.0
172.16.50.0 255.255.255.0
192.168.2.0 255.255.255.0

[root@v240 /] getent hosts v240-ce3
172.16.50.63 v240-ce3

[root@v240 /] ifconfig bge0 group link-mp
[root@v240 /] ifconfig bge0
bge0: flags=1000843 mtu 1500 index 2
inet 172.16.50.64 netmask ffffff00 broadcast 172.16.50.255
groupname link-mp
ether 0:3:ba:54:bc:7d

[root@v240 /] ifconfig ce3 plumb
[root@v240 /] ifconfig ce3 v240-ce3 netmask + broadcast +
Setting netmask of ce3 to 255.255.255.0
[root@v240 /] pgrep -lf mpathd
27172 /usr/lib/inet/in.mpathd
[root@v240 ~] if_mpadm -d bge0
Jul 1 20:03:35 v240 in.mpathd[27172]: Successfully failed over from NIC bge0 to NIC ce3
[root@v240 ~] if_mpadm -r bge0
Jul 1 20:04:12 v240 in.mpathd[27172]: Successfully failed back to NIC bge0

Truncated from ifconfig -a output:
ce3: flags=1000842 mtu 1500 index 5
inet 172.16.50.63 netmask ffffff00 broadcast 172.16.50.255
groupname link-mp
ether 0:3:ba:21:f6:8a
ce3:1: flags=1000843 mtu 1500 index 5
inet 172.16.50.64 netmask ffffff00 broadcast 172.16.50.255

For multipath initialization at boot time:
echo “v240 netmask + broadcast + group link-mp up” > /etc/hostname.bge0
echo “v240-ce3 netmask + broadcast + group link-mp up” > /etc/hostname.ce3

From /var/adm/messages:
Jul 1 19:42:13 v240 in.mpathd[27172]: [ID 975029 daemon.error] No test address configured on interface ce3; disabling probe-based failure detection on it
Jul 1 19:42:13 v240 in.mpathd[27172]: [ID 975029 daemon.error] No test address configured on interface bge0; disabling probe-based failure detection on it
Solution: setting up probe-based test ip-addresses
echo “v240 netmask + broadcast + group link-mp up addif v240-test deprecated netmask + broadcast + -failover up” > /etc/hostname.bge0

No Comments

solaris 10 vlan configuracion

http://docs.sun.com/app/docs/doc/820-2981/fpjve?l=es&a=view

No Comments

Procedures for creating TAR files and writing them to tape

# Change directories (cd) to the desired directory from which tarring will be done.
cd /home/… (whatever)

# To tar all the files in the current directory (.) and sub-directories
# to the tape using medium density (m) and no rewind (n)
tar -cvf /dev/rmt/0mn .

# To tar all the files in the current directory (.) and sub-directories
# to the tape using medium density (m) and, yes, rewind
tar -cvf /dev/rmt/0m .

# To do the same and write the list of the tarred files out to a file
# called TAR_LIST
tar -cvf /dev/rmt/0m . > TAR_LIST

# To view the table of contents from the first tar on the tape
# and then rewind the tape
tar -tvf /dev/rmt/0

# To view the table of contents from the tar at the current location
# on the tape and then NOT rewind the tape (subsequent calls to
# tar -tvf will access the subsequent tars on the tape)
tar -tvf /dev/rmt/0n
tar -tvf /dev/rmt/0n

# To extract a file (e.g., “my_file”) from the tar into the current
# directory (All existing files of the same name are over-written)
tar -xvf /dev/rmt/0 ./my_file

# To extract all the files under a directory (e.g., “sumatra”) from the tar
# into the current directory (All existing files of the same name are
# over-written). Give the full path to the directory on the tape
tar -xvf /dev/rmt/0 ./jones/proj/sumatra

# To rewind the tape
mt -f /dev/rmt/0 rew

# To advance past the current tar (0=first, 1=second, etc)
mt -f /dev/rmt/0n fsf 1

# Don’t use the following (i.e., without the ‘n’) or else the
# tape will advance forward then rewind
mt -f /dev/rmt/0 fsf 1

# Absolute space to “count” file number. This is equivalent
# to a rewind followed by a fsf “count”. Using 2 will position
# the pointer to the start of the third tar on the tape.
mt -f /dev/rmt/0 asf 2

# To backspace to the beginning of the tar in front of, uh, where
# the tape is currently sitting (using ‘…/0n bsf 1′ leaves the
# tape at its current location)
mt -f /dev/rmt/0n bsf 2

# To go to the end of the last tar on the tape and stay there
mt -f /dev/rmt/0n eom

# To see the tape status (and current file number)
# (Careful: if you use /0 and not /0n the tape will rewind
# following the status report)
mt -f /dev/rmt/0n status

# Using the above command the following is the report given at the
# start of the tape, i.e., file no = 0
# Exabyte EXB-8500 8mm Helical Scan tape drive:
# sense key(0×0)= No Additional Sense residual= 0 retries= 0
# file no= 0 block no= 0

# To determine the number of tars on the tape (number of tars
# is the value at ‘file no = ‘)
mt -f /dev/rmt/0 eom
mt -f /dev/rmt/0 status

# To erase all the tars on the tape
mt -f /dev/rmt/0 erase

# To retension the tape
mt -f /dev/rmt/0 retension

# For more goodies
man tar
man mt

No Comments

zfs and mysql

http://dev.mysql.com/tech-resources/articles/mysql-zfs.html

No Comments

perl solaris mysql driver

Yup, but for *nix I would recommend to use “real” perl and not the activeperl edition.

With “real” perl you can simply just run these commands to get the up2date DBI and DBD::mysql modules compiled and installed in your system:

perl -MCPAN -e ‘install DBI’
perl -MCPAN -e ‘install DBD::mysql’

No Comments

enterprise monitor

./mysqlmonitor-2.0.5.7153-solaris-sparc-installer.bin
Language Selection

Please select the installation language
[1] English
[2] Japanese
Please choose an option [1] :
—————————————————————————-
Welcome to the setup wizard for the MySQL Enterprise Monitor

—————————————————————————-
Please specify the directory where the MySQL Enterprise Monitor will be installed

Installation directory [/opt/mysql/enterprise/monitor]:

—————————————————————————-
Tomcat Server Options

Please specify the following parameters for the bundled Tomcat Server

Tomcat Server Port [18080]:

Tomcat Shutdown Port [18005]:

Tomcat SSL Port [18443]:

Is SSL support required? [y/N]: y

—————————————————————————-
Repository Configuration

Please specify the following parameters for the bundled MySQL server

Repository Username [service_manager]:

Password :
[ssybl1:/export/home/carlosap/mysqlEnterprise]#./mysqlmonitor-2.0.5.7153-solaris-sparc-installer.bin
Language Selection

Please select the installation language
[1] English
[2] Japanese
Please choose an option [1] : 1
—————————————————————————-
Welcome to the setup wizard for the MySQL Enterprise Monitor

—————————————————————————-
Please specify the directory where the MySQL Enterprise Monitor will be installed

Installation directory [/opt/mysql/enterprise/monitor]:

—————————————————————————-
Tomcat Server Options

Please specify the following parameters for the bundled Tomcat Server

Tomcat Server Port [18080]:

Tomcat Shutdown Port [18005]:

Tomcat SSL Port [18443]:

Is SSL support required? [y/N]: y

—————————————————————————-
Repository Configuration

Please specify the following parameters for the bundled MySQL server

Repository Username [service_manager]: carlosap

Password :
Re-enter :
Bundled MySQL Database Port [13306]:

—————————————————————————-
Configuration Report

Note:

The settings you specified will be saved here:
/opt/mysql/enterprise/monitor/configuration_report.txt

IMPORTANT: This configuration report includes passwords stored in plain text; it
is intended to help you install and configure your agents. We strongly advise
you to secure or delete this text file immediately after installation
Press [Enter] to continue :

—————————————————————————-
Setup is now ready to install MySQL Enterprise Monitor on your computer.

Do you want to continue? [Y/n]: y

—————————————————————————-
Please wait while Setup installs MySQL Enterprise Monitor on your computer.

Installing
0% ______________ 50% ______________ 100%
#########################################

—————————————————————————-
Completed installing files

Setup has completed installing the MySQL Enterprise Monitor files on your
computer

Uninstalling the MySQL Enterprise Monitor files can be done by invoking:
/opt/mysql/enterprise/monitor/uninstall

To complete the installation, launch the MySQL Enterprise Dashboard and complete
the initial setup and product activation information. Refer to the readme file
for additional information and a list of known issues.

Press [Enter] to continue :

—————————————————————————-
Setup has finished installing MySQL Enterprise Monitor on your computer.

View Readme File [Y/n]: n

Info: To configure the MySQL Enterprise Monitor please visit the following page:

http://localhost:18080

Press [Enter] to continue :

No Comments