Saturday, September 28, 2013

How to Move /var/adm/messages and syslog messages to differnt location

Take the backup of /etc/syslog.conf  and be carefully will editing syslog.conf becoz only tab space should be there man syslog.conf

Create a link file while moving to different location.

1)# svcs -a |grep -i log
2)svcs -d svc:/system/system-log:default
STATE          STIME    FMRI
online         Aug_30   svc:/milestone/name-services:default
online         Aug_30   svc:/milestone/sysconfig:default
online         Aug_30   svc:/system/filesystem/local:default
online         Aug_30   svc:/system/filesystem/autofs:default

3)# svcadm disable svc:/system/system-log:default

4)# cd /var/adm/
mv messages messages_old_13sep13
# touch messages
# ls -lrth messages
-rw-r--r--   1 root     root           0 Sep 13 06:02 messages

5)cd /var/log/
# mv syslog syslog_old_13sep13
# touch syslog

Iam moving messages and syslog to /u01/messages_syslog/

6)cd  /u01/messages_syslog/

# touch syslog
# touch messages
# chmod 644 *
# ls -lrth
total 2
-rw-r--r--   1 root     root           0 Sep 13 06:05 syslog
-rw-r--r--   1 root     root           0 Sep 13 06:05 messages
#
#
# chown root:root messages
# chown root:sys syslog
# ls -lrth
total 2
-rw-r--r--   1 root     sys            0 Sep 13 06:05 syslog
-rw-r--r--   1 root     root           0 Sep 13 06:05 messages
#

7)creating link files

#
# ln -s /u01/messages_syslog/syslog /var/log/syslog
 ln -s /u01/messages_syslog/messages /var/adm/messages

#
#
# ls -lrth /var/adm/messages
lrwxrwxrwx   1 root     root          29 Sep 13 06:08 /var/adm/messages -> /u01/messages_syslog/messages
#
#
# ls -lrth /var/log/syslog
lrwxrwxrwx   1 root     root          27 Sep 13 06:07 /var/log/syslog -> /u01/messages_syslog/syslog
#

8)# vi syslog.conf (below lines are modified )
#
#*.err;kern.notice;auth.notice                  /dev/sysmsg
*.err;kern.debug;daemon.notice;mail.crit        /u01/messages_syslog/messages
*.info  /u01/messages_syslog/messages
#auth.notice                    ifdef(`LOGHOST', /var/log/authlog, @loghost)

mail.debug                      ifdef(`LOGHOST', /u01/messages_syslog/syslog, @loghost)

user.err                                        /u01/messages_syslog/messages

9)svcadm enable svc:/system/system-log:default

10) chnage /etc/logadm.conf file for log roatation

==============Below are logs performed on real time================


Sunday, September 8, 2013

.T2000 Battery replacement






T2000 Battery replacement

Steps:  Follow these steps for this activity:

1)       Notify the app team before beginning system shutdown.
2)       Shutdown server to OBP using init 0; once server is down to ok, toggle to the system controller prompt.
3)       Power off server on system controller prompt : at ‘sc’ prompt, ‘poweroff’ (wait for system to state system is down)
4)       Turn servers over to Oracle FE for hardware replacement.
5)       Once FE has completed replacements, please verify the date/time on the system controller:  ‘showdate’.  Run ‘setdate –hto get the syntax to input the GMT date/time.  The UDT time would be PDT +7 hours or EST +4 hours.
NOTE:  This must be performed while system is in shutdown state.  This has to be done before Step 6.  Run showdate to validate the change has been made.
6)       Once date is showing correctly on the battery replacement servers, run the 'poweron' command at the sc prompt.
7)       Boot server up to multiuser level. 
8)       Once you login, run the command uptime.  Make sure it is current.  This has been seen recently:
10:40am  up 4093 day(s), 13:32,  1 user,  load average: 0.58, 0.60, 0.27
Shut the server down a 2nd time using ‘init 0’ if the uptime is incorrect as above.
Run boot –r  for a clean startup. 
9)       Verify OS is stable and is ready for app validation.
10)    Run ‘svcs –xv’ to verify all Solaris 10 services are running. Verify they are currently no errors.
11)    Notify Oracle FE that things are okay and notify app team to restart their app and validate access. .  If the systems look fine, NOTIFY FE to let him/her know their portion is complete.
12)    App team to respond back with acceptance before work is complete.
13)    Send email to all parties stating work has been successfully completed.  Include FE and RCI-02 team.

How to increase a soft partation which is on mirrored filesysetm (considering no available space)


How to increase a soft partation which is on mirrored filesysetm


metastat -p

d10-main mirror

d11-sub mirror

d12-sub mirror

metattach d11 c1t1d0s1 -----1gb

metattach d12 c1t2d0s1 -----1gb all disks in meta shoul be equal size

metastat -p


metattach d22 1gb ----- d22 is the soft partion which we are increasing by 1gb

growfs -M /mountpoint /dev/md/rdsk/d22

df -kh
metastat

How to configure RSC IP and SC IP



How to configure  RSC IP and SC IP:



we to need to add rsc package

pkgadd -d .

after adding pak in /usr/platform/`uname -i`

u will get rsc

cd rsc

rsc-config      rsc-initscript  rscadm


====================================================================================================================


RSC Console Settings
Well, most of us have done sc and alom and ilom settings. Ever heard of setting up an RSC for console with cyclades?

Follow up ...


Introduction:


The purpose of this document is to broadly define the RSC Configuration activities carried out during the server built up and the roadblocks faced herein.






1. RSC Software Download:

In the first phase of RSC configuration the RSC software was been taken from the SUN Download Centre (http://sunsolve.sun.com ) and then the individual packages within the RSC software were installed on the supported platform . The RSC software download for Solaris contains the following packages:


SUNWrsc
SUNWrscj
SUNWrscd



2. RSC Software Installation:


The below mentioned steps were followed to install the RSC software on Solaris 10 :


2.1 Login as superuser ( root )

2.2 Place the compressed file (for example, rsc_packages*.zip) in a temporary directory (for example, /tmp).

2.3 Use unzip (/usr/bin/unzip) to extract the Sun packages from the zip file. From your temporary directory, type the following command at the superuser prompt and press Return




/usr/bin/unzip rsc_packages*.zip

=====================================================rsc console setup=================================================================


root@devbiw # cd /usr/platform/`uname -i`
root@devbiw # cd rsc
root@devbiw # ls
rsc-config      rsc-initscript  rscadm
root@devbiw # ./rscadm shownetwork
IP Address: 10.22.135.131
Gateway address: 10.22.135.129
Netmask: 255.255.255.128
Ethernet address: 00:14:4f:3f:8f:64





root@devbiw # ./rsc-config


Continue with RSC setup (y|n): y

Set RSC date/time now (y|n|?) [y]:

Server Hostname [-a]: X10DB

Edit customer info field (y|n|?) [n]:

Enable RSC Ethernet Interface (y|n|s|?) [n]: y

   RSC IP Mode (config|dhcp|?) [dhcp]: config
   RSC IP Address []: 10.22.135.131
   RSC IP Netmask [255.255.255.0]: 255.255.255.128
   RSC IP Gateway []: 10.22.135.129


Enable RSC Alerts (y|n|s|?) [n]:

Enable RSC Serial Port Interface (y|n|s|?) [n]: y

   Serial port baud rate (9600|19200|38400|57600|115200) [9600]:

   Serial port data bits (7|8) [8]:

   Serial port parity (even|odd|none) [none]:

   Serial port stop bits (1|2) [1]:

Setup RSC User Account (y|n|?) [y]:

   Username []: admin

   User Permissions (c,u,a,r|none|?) [cuar]:




--------------------
Verifying Selections
--------------------


General Setup
-------------
  Set RSC date now  = y
  Server Hostname   = X10DB
  Set Customer Info = n

  Is this correct (y|n): y



Ethernet Setup
--------------
  IP Mode      = config
  IP Address   = 10.22.135.131
  IP Netmask   = 255.255.255.128
  IP Gateway   = 10.22.135.129

  Is this correct (y|n): y



Alert Setup
-----------
- Alerts disabled

  Is this correct (y|n): y



Serial Port Setup
-----------------
  Serial Port Baud      = 9600
  Serial Port Data Bits = 8
  Serial Port Parity    = none
  Serial Port Stop Bits = 1


  Is this correct (y|n): y



User Setup
----------
  User Name        = admin
  User Permissions = cuar

  Is this correct (y|n): y


This script will now update RSC, continue? (y|n): y
Updating flash, this takes a few minutes
........................................
........................................
........................................
........................................
........................................
........................................
........................................
...........................
Download completed successfully

Resetting RSC (takes about 90 seconds): DONE
Setting up server to update RSC date on boot: DONE
Setting up server hostname: DONE
Setting up ethernet interface: DONE
Disabling RSC alert engine: DONE
Disabling modem interface: DONE
Setting up serial port interface: DONE
Adding user to RSC:

rscadm: user already exists



when this script completes,
use the rscadm command to correct the error.

Resetting RSC (takes about 90 seconds):
Are you sure you want to reboot RSC (y/n)?  y

Root & Swap Mirroring



                                                



      Root & Swap Mirroring
Disks:   c1t0d0 & c1t1d0

Steps :( root Mirroring)
1. Create the   /root (30GB) & /Swap (64GB) partitions during the OS installation on c1t0d0.
2. i.e., c1t0d0s0 --- root       c1t0d0s1 --- swap
3. Create partition for State Database (Metadb) on c1t0d0s7 (125MB)
4. Copy the VTOC of c1t0d0 (1st Disk) to c1t1d0 (2nd Disk).
5. i.e., #prtvtoc    /dev/rdsk/ c1t0d0s2 |fmthard  –s  -  /dev/rdsk/c1t1d0s2
6. Create three copies of metadb on c1t0d0s7 & c1t1d0s7
7. i.e., #metadb -f -a -c3 c1t0d0s7 c1t1d0s7 (In c 3 … 3 is the no of db copy)
8. Create the Meta volume for /root
9. i.e., #metainit  -f  d11  1  1  c0t0d0s0  &   # metainit  d12  1  1  c0t1d0s0
10. Create the mirror volume
11. i.e., # metainit  d10 –m   d11
12. Update the /etc/Vfstab & /etc/system file entries by using metaroot command.
13. i.e., #metaroot   d10
14. Reboot the system (init 6)
15. Attach the d12 volume with the mirror.
16. i.e., # metattach d10 d12
17. Add the entry in /etc/system file.
18. i.e., set md: mirrored_root_flag=1
19. Edit the EEPROM Values.
20. i.e., #eeprom local-mac  address?true
21. eeprom AUTO BOOT=?true
22.
23. Boot Block installation on the second disk.
24. i.e., #/usr/platform/`uname – i`
              #cd lib
             #cd ufs
             #installboot    bootblk  /dev/rdsk/c1t1d0s0
25. To check the physical path of the second disk
      #ls –lrt /dev/dsk/c0t1d0s0
26. To add the entry in the EEPROM for root disk & root mirror  label on the second disk.
      #eeprom "nvramrc=devalias rootdisk /pci@9,600000/SUNW,qlc@2/fp@0,0/disk@1,0 \ > devalias rootmirror /pci@9,600000/SUNW,qlc@2/fp@0,0/disk@0,0"

27. To boot from root disk& root mirror for checking purpose.

       OK  boot  -v  rootdisk 
       OK  boot  –v  rootmirror


Steps:  Swap Mirroring
1.  Create the Meta volume for /Swap
2.  i.e., #metainit  -f  d21  1  1  c0t0d0s1      &           # metainit  d22  1  1  c0t1d0s1 
3. Create the mirror volume
4. . i.e., # metainit d20 –m   d21 
5. # metattach d20 d22
6. dumpadm   -d  /dev/md/dsk/d20 (To add the crash dump device)
7. #dumpadm (To list the dump device)
8. #swap   -a  /dev/md/dsk/c1t0d0s1 (To add the Swap space )
9. #swap –l  (To list the swap space allocated)

Kernel Jumbo patching which is under SVM & OBP upgradation



Kernel Jumbo patching which is under SVM & OBP upgradation:




1.     Take the output of the server before starting the activity.

# ./output.sh(  Take  RSC IP Details as it is not in the script)-----take output and copy to rcp kjp2011

2.     Check with RSC IP is able to connect the server.
# telnet<RSC IP>

3.     Check the Fmadm Faulty Error
# fmadm faulty(If it is there inform Sun Team take the necessary actions)

4.       Check the out-put of "dladm show-dev" command, if  "e1000g#" interface is used on the system like following o/p :
bash-3.00# dladm show-dev
e1000g0         link: up        speed: 1000  Mbps       duplex: full
e1000g1         link: up        speed: 1000  Mbps       duplex: full
Then, add the entry " lso_enable=0,0,0,0,0,0,0,0; " (Without inverted comma and space)  in the /kernel/drv/e1000g.conffile.

5.     Check the Available space of Root File system and Any Hard Errors on the Hard Disks (Root Disk & Root Mirror).
# df –kh |grep .

#iostat –En |grep  -i errors

6.     Stop application & Database

7.     Check the umask value , it should be 022.(If it is 077 , change it to 022 as per the KJP Upgradation Procedure)
That is we need to change the Umask value in/etc/.login, /etc/profile,/etc/skel/local.cshrc,/etc/skel/local.login,/etc/skel/local.profile,/etc/default/login


                Then take another session of the server and check Umask again.

8.     Check in /etc/vfstab file whether for swap tmpfs size is "-" and not 512M(It should be -)
swap    -       /tmptmpfs   -       yes     -

9.     Umount FS, Deport DG’s


10.            Check the output of EEPROM for for "boot-device;use-nvramrc?;nvramrc"
#eeprom
boot-device=rootdiskrootmirror
local-mac-address?=true
auto-boot=?=false
use-nvramrc?=true
nvramrc=devaliasrootmirror /pci@9,600000/SUNW,qlc@2/fp@0,0/disk@1,0
devaliasrootdisk /pci@9,600000/SUNW,qlc@2/fp@0,0/disk@0,0


11.            If everything is fine. Take a reboot of server.
#reboot

12.             Once the server rebooted successfully , Detach the Root Mirror & Swap Mirror
#metadettach d10 d12( d10& d12 are examples )
#metadettach  d20 d22 ( d20 & d22 are examples )


13.             Mount  rootmirror in "C#T#D#" format on to "/mnt" :--->>
#  mount /dev/dsk/c#t#d#s0 /mnt(c#t#d#s0 is the root mirror disk)

14.              Edit the "etc/vfstab" and "etc/system" files of  rootmirror :--->>
# cd /mnt/etc

# vi vfstab(convert all meta devices of root mirror to c#t#d# form);

# vi system(Hash the entry "rootdev:/pseudo/md@0:0,10,blk" by preceeding it with a star "*" ).

Note: Before going to edit the above vfstab& system files, check the PWD command. It should be /mnt/etc/vfstab&  /mnt/etc/system

15.            Unmount the /mnt
#umount /mnt

16.             Then go to OK prompt by using init 0 command
#init 0

17.             From OK prompt ,boot the system with Root Mirror
OK  devalias( This command will display  the details of Root Disk & Root Mirror)
OK boot rootmirror –v

18.             After the system booted , check the df –kh command.
The root file system should be in c#t#d# format.

19.             Then again go to OK prompt and boot the server from Root Disk.
OK boot rootdisk –v

20.             After the successful boot from Root Disk , check the current Kernel Patch
 # uname –a(If KJP installed on the server is 142909-17 , then need to install only PATCH "144488-06. Otherwise need to install the Jumpopatch(142909-17 ) and the single patch(144488-06))

21.            Start the KJP installation 

22.            Once it is completed , take reboot of the server.

23.            Then install the single patch and again reboot.

24.            After the completion of all installation , check the server output with the output before taken KJP.

25.            If everything is fine ,  Start the DB & application ,then release the server.


26.            Start the KJP installation
unzip –d /tmp<10_Recommended.zip>
./installcluster - -s10cluster

Once process completes restart server
EMCgrub procedure
Scp –r  emcgrab_SunOS_v4.4.4.tar  <system IP:/scripts>
tar –xvf  emcgrab_SunOS_v4.4.4.tar 
cd  emcgrub
./emcgrub.sh-----------give q,y

Powerpathprcocedure:

Scp –r  EMCPower.SOLARIS.5.3.P01.b009.tar.gz<system Ip:/scripts>
Pkginfo –l EMCpower
PkgrmEMCpower
gunzip EMCPower.SOLARIS.5.3.P01.b009.tar.gz
tar –xvf  EMCPower.SOLARIS.5.3.P01.b009.tar
pkgadd –d   .   <EMCpower>-------------------------------------give y,y



OBP(see machine type,v490,v880)

Scp –r  <example142707-01.zip><system ip:/scripts>
Extract into temp directory
Login into console
Cd /tmp/patch
./flashupdate

Veritas:MP3&RP5
Checkpackage
Pkginfo –l VRTSvxvm
If version is 5.0.1------------v need to install mp3 & rp5
If version is 5.0.3-mp3---------v need to install rp5

Scp   –r  MP3<system ip:/scripts>
cd MP3
ls
MP3RP4
MP3RP5
SxRT-5.0MP3-2008-09-11a.dvd1-sol_sparc.tar
Cd  MP3RP5
ls
sfha-sol_sparc-5.0MP3RP5-patches.tar  sol_sparc
tar
./installmp
./installrp