unix sysadmin archives
Donation will make us pay more time on the project:

Tuesday, 28 June 2011

How to create ASM links in Solaris hosts

Here is a quick guide in creating ASM links in Solaris boxes.
First thing to do is to check that ASM instance is running. If it is running have the name of disks/LUNs ready.
Do not forget to turn on the MPXIO on Solaris 10 servers by running the following command.

#stmsboot –e

Note that this will reboot the system if the MPXIO is off.

Make sure the disks are not part of any SVM meta devices, VXFS disk group or not in used by any ZPOOL.
Use appropriate commands to verify.

Now, find the physical device path for each disk.
#ls –l /dev/rdsk/|grep <disk name>
For example:
# ls -l /dev/rdsk/ | grep c4t600A0B8000562790000005D04998C446d0
lrwxrwxrwx   1 root     root          64 Feb 16 02:10 c4t600A0B8000562790000005D04998C446d0s0 ->

lrwxrwxrwx   1 root     root          64 Feb 16 02:10 c4t600A0B8000562790000005D04998C446d0s1 ->


The idea is to figure out which partition points to what physical device path.

Make sure none of the links under /dev/ora_rdsk are pointing to the disks that you are going to use.
Look for both physical and logical name of the disk.

# ls -l /dev/ora_rdsk/ | grep c4t600A0B8000562790000005D04998C446d0

# ls -l /dev/ora_rdsk/ | grep ssd@g600a0b8000562790000005d04998c446

Now partition the disk in such a way that the slot 0 gets started from the sector 256 to the end. 
Here is the trick, create a temp zpool using the disks.

#zpool create tmp <disk name>

Then destroy the pool.

#zpool destroy tmp

This works better than the format command.

This will create 9 slices for your disk. The first slice (slice 0) is the one that must be used for ASM links.

Create the symbolic links to the physical devise names for the slice 0 of the disks under /dev/ora_rdsk for the requested ASM links.

#ln –s  ../../devices/scsi_vhci/ssd@g600a0b8000562790000005d04998c446:a,raw  /dev/ora_rdsk/VOLUME_NAME

Change the ownership of the physical device to oracle:dba, the default owner is root:sys.

# ls -lhL /dev/rdsk/c4t600A0B8000562790000005D04998C446d0s0
crw-r-----   1 root     sys      118, 64 Feb 16 02:10 /dev/rdsk/c4t600A0B8000562790000005D04998C446d0s0
# chown oracle:dba /dev/rdsk/c4t600A0B8000562790000005D04998C446d0s0 
#chown  oracle:dba  /devices/scsi_vhci/ssd@g600a0b8000562790000005d04998c446:a,raw

# ls -lhL /dev/rdsk/c4t600A0B8000562790000005D04998C446d0s0
crw-r-----   1 oracle   dba      118, 64 Feb 16 03:00 /dev/rdsk/c4t600A0B8000562790000005D0

You may now ask your DBA to verify.

No comments:

Post a Comment