Sunday, March 28, 2010

creating device aliases.

before getting into how to create device aliases lets have a look at the following commands executed from ok prompt.

ok show-sbus
SBus slot fSUNW,bpp ledma le espdma esp

SBus slot e SUNW,DBRle

SBus slot 0

SBus slot 1
SBus slot 2 cgsix

SBus slot 3

ok show-tapes
a)/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/espf,800000/st
q)NO SELECTION
Enter Selection,q to quit:


ok show-disks
a)/obio/SUNW,fdtwo@o,700000
b)/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd
q)NO SELECTION
Enter Selection,q to quit:


The above "show device_name" command displays the information about the specified device based on the results of POST.

did you observed the ouput of show commands,its so messy and also an headache to remember it at one look ,but it is the full device path recognised by OBP and this must be used to set the parameters from boot prompt.
To easier your task,OBP allows you to give an alternate short names to full path and that name can be used subsequently while setting boot parameters.

So,lets use some of the OBP commands to assign an alias name and make it permanent for next boot.


i)scsi disk alias creation

**run show-disks command which lists all the disk devices including array devices if any connected.below you can see 'a' & 'c' are the external disks.

ok show-disks
a)/sbus@48,0/QLGC,isp@1,10000/sd
b)/sbus@4d,0/SUNW,soc@0,0/SUNW,pin@b0000000,8a1085/SUNW,ssd
c)/sbus@4c,0/QLGC,isp@1,10000/sd
q)NO SELECTION
Enter Selection, q to quit:

**lets select item c to configure as an bootdisk.

Enter selection, q to quit:c

/sbus@4c,0/QLGC,isp@1,10000/sd has been selected
Type ^Y (Control-Y) to insert it in the command line.
e.g. ok nvalias mydev ^Y
for creating devalias mydev for
/sbus@4c,0/QLGC,isp@1,10000/sd

**now create alias with nvalias

ok nvalias bootdisk ^Y

**ctrl+y will copy the selcted item beside the "bootdisk" as below

ok nvalias bootdisk /sbus@4c,0/QLGC,isp@1,10000/sd

{the above command is not yet finished,

since its for scsi disk alias there should be target,lun and slice number isn't it??
for this example it wil be t2d0s1....
target ----> 2
lun ------> 0
slice ------>a.....because slice is a letter from 'a' to 'h' corresponding to disk slices '0'
to '7' ,respectively

the above numbers added as @target_number,lun_number:slice number
@2,0:a

so the device path for the selected item 'c' would be in this fashion
/sbus@4c,0/QLGC,isp@1,10000/sd@2,0:a }

now you can enter the command

ok nvalias bootdisk /sbus@4c,0/QLGC,isp@1,10000/sd@2,0:a

**check the newalias with the devalias command.

ok devalias

bootdisk /sbus@4c,0/QLGC,isp@1,10000/sd@2,0:a

0 comments:

Post a Comment