Monday, February 14, 2011

iostat

Solaris 
1)IOSTAT:
The values to look from the iostat output  are:
  • Reads/writes  per second (r/s , w/s)
  • Percentage busy (%b)
  • Service time (svc_t)
If a disk shows consistently high reads/writes along with , the percentage busy (%b) of the disks is greater than 5 percent, and the average service time  (svc_t) is greater than 30 milliseconds, then  one of the following action needs to be taken
1.)Tune the application to use disk i/o more efficiently  by modifying the disk queries and using available cache facilities of application servers .
2.) Spread the file system of the disk on to two or more disk  using disk striping feature of volume manager /disksuite  etc.
3.) Increase the system parameter values for  inode cache  , ufs_ninode ,  which is  Number of inodes to be held in memory. Inodes are cached globally (for UFS), not on a per-file system basis 
4.) Move the file system to another faster disk /controller  or replace existing disk/controller to a faster  one.

Performance Monitoring

iostat , vmstat and netstat are three most commonly used tools for performance monitoring . These comes built in with the operating system and are easy to use .iostat stands for input output statistics and reports statistics for i/o devices such as disk drives . vmstat gives the statistics for virtual Memory and netstat gives the network statstics


Iostat

Vmstat

Netstat

Making a bootable ZFS Root Mirror

Making a bootable ZFS Root Mirror
1.     Installed ZFS OS to Disk A (c0t0d0s0)
2.     Format Disk B (c0t1d0s0) properly.
3.     Overwrite the Disk format properly:
Testserver# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard –s - /dev/rdsk/c0t1d0s2
4.     Attach Disk B to the ZFS Root Pool:        
          Testserver#zpool attach –f rpool c0t0d0s0 c0t1d0s0
5.     Install installboot on Disk B
# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
6.     Test the worst Case: Disk A fails, you can still boot into Disk B
-        Remove Disk A
-        Replace it with an emtpy Disk C
-        Start the System: Choose to boot from Disk B in the Bios
-        Repeat Steps 2. till 5. for Disk C (swap c0t0d0s0 and c0t1d0s0)
-        Start the System like before (from Disk C)

Patch Add Steps

Patch add steps

1) Need to take the backup filesystem through ufsdump or , 
need to remove one of the root mirror from the server .

2) Need to check the current patch version on the server .

# uname -a ( For kernel patch )

# showrev -p ( For other patches )

3) Check the latest patch in http://sunsolve.sun.com 

4) Gothrough the Read me file 

5) Boot the server in to the single user mode 

#shutdown -g0 -y -i1 ( or #init 0 & ok boot -s )

6) Install the patch 

#Patchadd < Ptach >

7) Down the machine in to the OBP using #init 0

8) Do the reconfiguration boot 

#boot -r 

9) Check the patch is updated pr not

Solaris 11 Login Screen