Configuring LUNs

We mentioned earlier that sometimes LUNs need to be configured (although this is normally only for special cases and should include all the instructions required). The change itself is very simple since the only thing we need to do is edit the kernel configuration file for the SCSI disk driver—/kernel/drv/sd.conf.

An example of this type of requirement would be for some hardware RAID units. Often, a single SCSI ID is allocated to the disk cabinet as a whole—for example, target 4, which means the cabinet itself would be seen as t4. This can then be configured as a number of logical disks (LUNs), which would be seen as t4d0, t4d1, t4d2, and so forth.

If we assume that the device supports up to eight logical disks, we could include the following settings in the relevant configuration file. Don't forget that, as with most kernel changes, we'll need to reboot the machine for the changes to take effect:

helium# cat /kernel/drv/sd.conf
#
# SCSI disk configuration file
#
name="sd" class="scsi" target=0 lun=0;
name="sd" class="scsi" target=1 lun=0;
name="sd" class="scsi" target=2 lun=0;
name="sd" class="scsi" target=3 lun=0;
name="sd" class="scsi" target=4 lun=0;
#
# configure the additional target 4 luns
#
name="sd" class="scsi" target=4 lun=1;
name="sd" class="scsi" target=4 lun=2;
name="sd" class="scsi" target=4 lun=3;
name="sd" class="scsi" target=4 lun=4;
name="sd" class="scsi" target=4 lun=5;
name="sd" class="scsi" target=4 lun=6;
name="sd" class="scsi" target=4 lun=7;
#
# end of additional luns
#
name="sd" class="scsi" target=5 lun=0;
name="sd" class="scsi" target=6 lun=0;
name="sd" class="scsi" target=7 lun=0;
name="sd" class="scsi" target=8 lun=0;
name="sd" class="scsi" target=9 lun=0;
<lines removed for clarity>
helium#

After connecting the devices and rebooting, we'll find that we now have a set of logical devices for target 4 in the /dev directory. We've only shown the dsk subdirectory, but we would find the same in the rdsk subdirectory and also the corresponding physical devices:

helium# cd /dev/dsk
helium# ls *t4d0*
c1t4d0s0    c1t4d0s2    c1t4d0s4    c1t4d0s6
c1t4d0s1    c1t4d0s3    c1t4d0s5    c1t4d0s7

helium# ls *t4d1*
c1t4d1s0    c1t4d1s2    c1t4d1s4    c1t4d1s6
c1t4d1s1    c1t4d1s3    c1t4d1s5    c1t4d1s7

helium# ls *t4d2*
c1t4d2s0    c1t4d2s2    c1t4d2s4    c1t4d2s6
c1t4d2s1    c1t4d2s3    c1t4d2s5    c1t4d2s7
<and so forth>

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset