Search This Blog

Showing posts with label solaris system administration. Show all posts
Showing posts with label solaris system administration. Show all posts

Sunday, 22 November 2009

Configuring solaris system as syslog server

By this proceedure, you can monitor all system logs froma a single host.

For configuring syslog server in Unix, nothing to do in sever side. Do the following changes in client side

1. Make a backup of /etc/syslog.conf file

2. Add the hostname of server in /etc/host (server should be pingable using hostname either DNS)

3. Add this line /etc/syslog.conf of client

4.

*.err;kern.debug;daemon.notice;mail.crit @remoteunixhostname

Note down, don’t use any space in /etc/syslog.conf file, use only tabs instead.

5. Restart sylog service in client

svcadm restart svc:/system/system-log:default -> this is for solari 10

/etc/init.d/syslog stop; /etc/init.d/syslog start -> this is for other solaris OS

6. Make sure UDP port 514 is opened from client to server (client -514 ->server)

Once its ok, you will be all to see all logs generated in clients will be logged either in /var/adm/messages of server and /var/adm/messages of client. If you have multiple client add the same entry in all client. Messages can be identified from server side, by host name of the client in each line of messages.

Sunday, 11 October 2009

How to remove metaset in Solaris

This is the proceedure for removing a metaset in Solaris. Here my disk set name is test-set and owned by two nodes node1 and node2. Do all this command from /tmp directory.

1. Create new vfstab by removing the entry related to test-set
#cp /etc/vfstab /etc/vfstab.prereclaim
#cat /etc/vfstab.prereclaim|grep -v "/dev/md/test-set/" >/etc/vfatb

2.unmount all the filesystems from test-set forcefully
#for i in `cat /etc/vfstab.prereclaim |grep "/dev/md/smsc-ms/" |awk {'print $3'}`; do umount -f $i; done
The above 2 two steps are requied on all the nodes. For doing below steps, this node should have the ownership to the meta-set. you can get the ownership using metaset -s test-set -t command

3. Get all the logical drive in test-set
#metastat -s test-set -p|grep test-set|awk {'print $1 '}|cut -d \/ -f 2>metadevices

4. Removing the logincal drive one by one
#for i in `cat metadevices`; do metaclear -s smsc-ms -f $i; done

5. Getting all the physical disk name included in the test-set
#metaset |awk {'print $1'}|grep -v "^$"|grep dev>diskname

6. Removing the physcial disks from the test-set
#for i in `cat diskname`; do metaset -s smsc-ms -d -f $i; done

7. Now we can remove mediator and host from this metaset
metaset -s test-set -d -m node1 node2
metaset -s test-set -d -f -h node1
metaset -s test-set -d -f -h node2