Friday, June 11, 2010

ADDING DISK INTO VX - SOLARIS

Below is what i call a step by step how to add new harddisk to current available veritas disk group.

1. Check if new disk already add or not on OS level. This can be done by run #format command. If your new harddisk is found on OS level, then you will see it is listed at the top of output. Example can be see as below.

Then, you need to choose the disk for labeling purpose. Example below it showing new path for disk is c4t11d3 and you need to look in “AVAILABLE DISK SELECTIONS” on which number it is sitting. Choose it number and label. If you disk is not there, then run command #devfsadm to redetect new media or reboot if required.

# format
Searching for disks…done

c4t11d3: configured with capacity of 20.00GB <—This is new disk that still not labeled —>

AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1f,4000/scsi@3/sd@0,0
1. c0t1d0
/pci@1f,4000/scsi@3/sd@1,0
2. c4t11d0
/pci@1f,2000/lpfc@1/sd@b,0
3. c4t11d1
/pci@1f,2000/lpfc@1/sd@b,1
4. c4t11d2
/pci@1f,2000/lpfc@1/sd@b,2
5. c4t11d3
/pci@1f,2000/lpfc@1/sd@b,3
Specify disk (enter its number): 5
selecting c4t11d3
[disk formatted]
Disk not labeled. Label it now? y

FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
! - execute , then return
quit
format> q

2. Check in Veritas disk list. If your new hard disk is not listed, then run #vxdctl enable where it will import new disk to veritas list.

# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c0t0d0s2 auto:sliced rootdisk rootdg online
c0t1d0s2 auto:sliced rootmirr rootdg online
c4t11d0s2 auto:cdsdisk onep301 onep3dg online
c4t11d1s2 auto:cdsdisk onep302 onep3dg online
c4t11d2s2 auto:cdsdisk onep303 onep3dg online
c4t11d3s2 auto - - error <— new disk are detected—>

3. Format Disk in veritas format

# vxdisksetup -i c4t11d3

4. Check if new disk is online or not

# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c0t0d0s2 auto:sliced rootdisk rootdg online
c0t1d0s2 auto:sliced rootmirr rootdg online
c4t11d0s2 auto:cdsdisk onep301 onep3dg online
c4t11d1s2 auto:cdsdisk onep302 onep3dg online
c4t11d2s2 auto:cdsdisk onep303 onep3dg online
c4t11d3s2 auto:cdsdisk - - online

5. add disk to disk group and create new disk name

# vxdg -g onep3dg adddisk onep304=c4t11d3

6. Double Check

# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c0t0d0s2 auto:sliced rootdisk rootdg online
c0t1d0s2 auto:sliced rootmirr rootdg online
c4t11d0s2 auto:cdsdisk onep301 onep3dg online
c4t11d1s2 auto:cdsdisk onep302 onep3dg online
c4t11d2s2 auto:cdsdisk onep303 onep3dg online
c4t11d3s2 auto:cdsdisk onep304 onep3dg online

Before you add the new disk to Veritas Disk group, your can check size before and after of current disk group using below command. It will showing you current free sizes of that disk group.

#vxassist -g ‘diskgroup’ maxsize

*************************************************************************************

My friend had make a comment after read this blog.. How to make SAN disk is visible in OS.. Thanks Mr. Kush.

Actually in Solaris, if we are using any SUN HBA or its associate like SUN Emulex or qlogic, then new disk allocated to its zone will be directly available on OS without rebooting is needed. If it is still not see on OS level, running command #devfsadm -Cv will make it available.

In JNI case, you need to edit sd.conf file and put the info about this new LUN. After server rebooted, then disk will be available. But if you had install JNI-FCODE,it will install update_drv into system.. You just need run #update_drv -f sd and it will automatically detect the new SAN disk.

It is like HPUX, without JFS-online, you cannot increase mounted filesystem in run-level 3.

No comments: