Hi, This is a sample of custom UDEV(7) rule for Thumper(X4500)''s 48 disks. Traditionally, the disk device name on the linux is assigned to sda, sdb,... But, this udev rule is helpful to access as solaris map on Thumper. This means you can access Thumper''s disks using c0t0d0s0, c1t0d0s0 device name on the linux.. You just copy 99-dsk.rules to /etc/udev/rules.d and minus-1.sh to /etc/udev/scripts then run udevstart. After that, the device links are created under /dev/dsk directory and it should be accessible. This is also helpful to easy create the Linux RAID. e.g) create the MD across the 6 different contollers mdadm -C /dev/md11 --run -l 5 -n 6 -c 256 /dev/dsk/c{0,1,4,5,6,7}t1d0 So, this rule file is one of sample to access with "solaris like device name" on linux, but of course, you can name any names with custom as well :) Thanks -Ihara -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: minus-1.sh Url: http://lists.lustre.org/pipermail/linux_hpc_swstack/attachments/20080602/d972e082/attachment-0002.ksh -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 99-dsk.rules Url: http://lists.lustre.org/pipermail/linux_hpc_swstack/attachments/20080602/d972e082/attachment-0003.ksh
Hi Ihara, On Mon, Jun 02, 2008 at 05:34:21PM +0900, Shuichi Ihara wrote:> This is a sample of custom UDEV(7) rule for Thumper(X4500)''s 48 disks.I''ve seen this before and it''s useful - are you planning on packaging it so that it''s installed on OSS nodes as part of our stack? This seems like something we could easily automate...> [...] > So, this rule file is one of sample to access with "solaris like > device name" on linux, but of course, you can name any names with > custom as well :)The Solaris names seem as good as any and people at Sun will be familiar with them. Another alternative is devfs style naming. Cheers, Jody> Thanks > -Ihara >> #!/bin/sh > a=`expr $1 - 1` > echo $a> # > # /etc/udev/rules.d/99-dsk.rules > # > > BUS="scsi", ID="0:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t0d0" > BUS="scsi", ID="1:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t1d0" > BUS="scsi", ID="2:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t2d0" > BUS="scsi", ID="3:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t3d0" > BUS="scsi", ID="4:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t4d0" > BUS="scsi", ID="5:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t5d0" > BUS="scsi", ID="6:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t6d0" > BUS="scsi", ID="7:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t7d0" > > BUS="scsi", ID="8:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t0d0" > BUS="scsi", ID="9:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t1d0" > BUS="scsi", ID="10:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t2d0" > BUS="scsi", ID="11:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t3d0" > BUS="scsi", ID="12:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t4d0" > BUS="scsi", ID="13:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t5d0" > BUS="scsi", ID="14:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t6d0" > BUS="scsi", ID="15:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t7d0" > > BUS="scsi", ID="16:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t0d0" > BUS="scsi", ID="17:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t1d0" > BUS="scsi", ID="18:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t2d0" > BUS="scsi", ID="19:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t3d0" > BUS="scsi", ID="20:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t4d0" > BUS="scsi", ID="21:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t5d0" > BUS="scsi", ID="22:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t6d0" > BUS="scsi", ID="23:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t7d0" > > BUS="scsi", ID="24:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t0d0" > BUS="scsi", ID="25:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t1d0" > BUS="scsi", ID="26:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t2d0" > BUS="scsi", ID="27:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t3d0" > BUS="scsi", ID="28:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t4d0" > BUS="scsi", ID="29:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t5d0" > BUS="scsi", ID="30:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t6d0" > BUS="scsi", ID="31:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t7d0" > > BUS="scsi", ID="32:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t0d0" > BUS="scsi", ID="33:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t1d0" > BUS="scsi", ID="34:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t2d0" > BUS="scsi", ID="35:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t3d0" > BUS="scsi", ID="36:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t4d0" > BUS="scsi", ID="37:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t5d0" > BUS="scsi", ID="38:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t6d0" > BUS="scsi", ID="39:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t7d0" > > BUS="scsi", ID="40:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t0d0" > BUS="scsi", ID="41:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t1d0" > BUS="scsi", ID="42:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t2d0" > BUS="scsi", ID="43:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t3d0" > BUS="scsi", ID="44:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t4d0" > BUS="scsi", ID="45:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t5d0" > BUS="scsi", ID="46:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t6d0" > BUS="scsi", ID="47:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t7d0" > > BUS="scsi", ID="0:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t0d0s%c" > BUS="scsi", ID="1:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t1d0s%c" > BUS="scsi", ID="2:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t2d0s%c" > BUS="scsi", ID="3:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t3d0s%c" > BUS="scsi", ID="4:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t4d0s%c" > BUS="scsi", ID="5:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t5d0s%c" > BUS="scsi", ID="6:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t6d0s%c" > BUS="scsi", ID="7:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t7d0s%c" > > BUS="scsi", ID="8:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t0d0s%c" > BUS="scsi", ID="9:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t1d0s%c" > BUS="scsi", ID="10:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t2d0s%c" > BUS="scsi", ID="11:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t3d0s%c" > BUS="scsi", ID="12:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t4d0s%c" > BUS="scsi", ID="13:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t5d0s%c" > BUS="scsi", ID="14:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t6d0s%c" > BUS="scsi", ID="15:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t7d0s%c" > > BUS="scsi", ID="16:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t0d0s%c" > BUS="scsi", ID="17:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t1d0s%c" > BUS="scsi", ID="18:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t2d0s%c" > BUS="scsi", ID="19:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t3d0s%c" > BUS="scsi", ID="20:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t4d0s%c" > BUS="scsi", ID="21:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t5d0s%c" > BUS="scsi", ID="22:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t6d0s%c" > BUS="scsi", ID="23:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t7d0s%c" > > BUS="scsi", ID="24:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t0d0s%c" > BUS="scsi", ID="25:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t1d0s%c" > BUS="scsi", ID="26:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t2d0s%c" > BUS="scsi", ID="27:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t3d0s%c" > BUS="scsi", ID="28:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t4d0s%c" > BUS="scsi", ID="29:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t5d0s%c" > BUS="scsi", ID="30:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t6d0s%c" > BUS="scsi", ID="31:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t7d0s%c" > > BUS="scsi", ID="32:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t0d0s%c" > BUS="scsi", ID="33:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t1d0s%c" > BUS="scsi", ID="34:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t2d0s%c" > BUS="scsi", ID="35:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t3d0s%c" > BUS="scsi", ID="36:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t4d0s%c" > BUS="scsi", ID="37:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t5d0s%c" > BUS="scsi", ID="38:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t6d0s%c" > BUS="scsi", ID="39:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t7d0s%c" > > BUS="scsi", ID="40:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t0d0s%c" > BUS="scsi", ID="41:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t1d0s%c" > BUS="scsi", ID="42:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t2d0s%c" > BUS="scsi", ID="43:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t3d0s%c" > BUS="scsi", ID="44:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t4d0s%c" > BUS="scsi", ID="45:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t5d0s%c" > BUS="scsi", ID="46:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t6d0s%c" > BUS="scsi", ID="47:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t7d0s%c"> _______________________________________________ > Linux_hpc_swstack mailing list > Linux_hpc_swstack at lists.lustre.org > http://lists.lustre.org/mailman/listinfo/linux_hpc_swstack-- Jody McIntyre - Linux Kernel Engineer, Sun HPC
On Wed, 2008-06-04 at 12:27 -0400, Jody McIntyre wrote:> Hi Ihara,Hi All,> On Mon, Jun 02, 2008 at 05:34:21PM +0900, Shuichi Ihara wrote: > > > This is a sample of custom UDEV(7) rule for Thumper(X4500)''s 48 disks.Tuning into this one message too late, as my comments address the udev rules...> > BUS="scsi", ID="0:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t0d0" > > BUS="scsi", ID="1:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t1d0" > > BUS="scsi", ID="2:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t2d0" > > BUS="scsi", ID="3:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t3d0" > > BUS="scsi", ID="4:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t4d0" > > BUS="scsi", ID="5:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t5d0" > > BUS="scsi", ID="6:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t6d0" > > BUS="scsi", ID="7:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t7d0"... I''m not intimately familiar with udev rule writing, but do you really have to list one line per SCSI device? Can you not write a script that you can put on a single udev line that will create the dsk/c?t?d? pattern such as: BUS="scsi", KERNEL="sd*[a-z]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="..." and get a reference back from the script for the SYMLINK? I think the variables such as BUS, ID, etc. are available to the PROGRAM. b. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.lustre.org/pipermail/linux_hpc_swstack/attachments/20080604/20e1760d/attachment.bin
Jody, Jody McIntyre wrote:> Hi Ihara, > > On Mon, Jun 02, 2008 at 05:34:21PM +0900, Shuichi Ihara wrote: > >> This is a sample of custom UDEV(7) rule for Thumper(X4500)''s 48 disks. > > I''ve seen this before and it''s useful - are you planning on packaging it > so that it''s installed on OSS nodes as part of our stack? This seems > like something we could easily automate...OK, I can do it. Tanks, -Ihara> >> [...] >> So, this rule file is one of sample to access with "solaris like >> device name" on linux, but of course, you can name any names with >> custom as well :) > > The Solaris names seem as good as any and people at Sun will be familiar > with them. Another alternative is devfs style naming. > > Cheers, > Jody > >> Thanks >> -Ihara >> > >> #!/bin/sh >> a=`expr $1 - 1` >> echo $a > >> # >> # /etc/udev/rules.d/99-dsk.rules >> # >> >> BUS="scsi", ID="0:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t0d0" >> BUS="scsi", ID="1:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t1d0" >> BUS="scsi", ID="2:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t2d0" >> BUS="scsi", ID="3:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t3d0" >> BUS="scsi", ID="4:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t4d0" >> BUS="scsi", ID="5:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t5d0" >> BUS="scsi", ID="6:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t6d0" >> BUS="scsi", ID="7:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t7d0" >> >> BUS="scsi", ID="8:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t0d0" >> BUS="scsi", ID="9:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t1d0" >> BUS="scsi", ID="10:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t2d0" >> BUS="scsi", ID="11:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t3d0" >> BUS="scsi", ID="12:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t4d0" >> BUS="scsi", ID="13:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t5d0" >> BUS="scsi", ID="14:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t6d0" >> BUS="scsi", ID="15:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c1t7d0" >> >> BUS="scsi", ID="16:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t0d0" >> BUS="scsi", ID="17:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t1d0" >> BUS="scsi", ID="18:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t2d0" >> BUS="scsi", ID="19:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t3d0" >> BUS="scsi", ID="20:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t4d0" >> BUS="scsi", ID="21:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t5d0" >> BUS="scsi", ID="22:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t6d0" >> BUS="scsi", ID="23:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c4t7d0" >> >> BUS="scsi", ID="24:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t0d0" >> BUS="scsi", ID="25:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t1d0" >> BUS="scsi", ID="26:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t2d0" >> BUS="scsi", ID="27:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t3d0" >> BUS="scsi", ID="28:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t4d0" >> BUS="scsi", ID="29:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t5d0" >> BUS="scsi", ID="30:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t6d0" >> BUS="scsi", ID="31:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c5t7d0" >> >> BUS="scsi", ID="32:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t0d0" >> BUS="scsi", ID="33:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t1d0" >> BUS="scsi", ID="34:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t2d0" >> BUS="scsi", ID="35:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t3d0" >> BUS="scsi", ID="36:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t4d0" >> BUS="scsi", ID="37:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t5d0" >> BUS="scsi", ID="38:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t6d0" >> BUS="scsi", ID="39:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c6t7d0" >> >> BUS="scsi", ID="40:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t0d0" >> BUS="scsi", ID="41:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t1d0" >> BUS="scsi", ID="42:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t2d0" >> BUS="scsi", ID="43:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t3d0" >> BUS="scsi", ID="44:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t4d0" >> BUS="scsi", ID="45:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t5d0" >> BUS="scsi", ID="46:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t6d0" >> BUS="scsi", ID="47:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c7t7d0" >> >> BUS="scsi", ID="0:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t0d0s%c" >> BUS="scsi", ID="1:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t1d0s%c" >> BUS="scsi", ID="2:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t2d0s%c" >> BUS="scsi", ID="3:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t3d0s%c" >> BUS="scsi", ID="4:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t4d0s%c" >> BUS="scsi", ID="5:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t5d0s%c" >> BUS="scsi", ID="6:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t6d0s%c" >> BUS="scsi", ID="7:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c0t7d0s%c" >> >> BUS="scsi", ID="8:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t0d0s%c" >> BUS="scsi", ID="9:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t1d0s%c" >> BUS="scsi", ID="10:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t2d0s%c" >> BUS="scsi", ID="11:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t3d0s%c" >> BUS="scsi", ID="12:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t4d0s%c" >> BUS="scsi", ID="13:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t5d0s%c" >> BUS="scsi", ID="14:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t6d0s%c" >> BUS="scsi", ID="15:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c1t7d0s%c" >> >> BUS="scsi", ID="16:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t0d0s%c" >> BUS="scsi", ID="17:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t1d0s%c" >> BUS="scsi", ID="18:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t2d0s%c" >> BUS="scsi", ID="19:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t3d0s%c" >> BUS="scsi", ID="20:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t4d0s%c" >> BUS="scsi", ID="21:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t5d0s%c" >> BUS="scsi", ID="22:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t6d0s%c" >> BUS="scsi", ID="23:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c4t7d0s%c" >> >> BUS="scsi", ID="24:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t0d0s%c" >> BUS="scsi", ID="25:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t1d0s%c" >> BUS="scsi", ID="26:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t2d0s%c" >> BUS="scsi", ID="27:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t3d0s%c" >> BUS="scsi", ID="28:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t4d0s%c" >> BUS="scsi", ID="29:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t5d0s%c" >> BUS="scsi", ID="30:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t6d0s%c" >> BUS="scsi", ID="31:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c5t7d0s%c" >> >> BUS="scsi", ID="32:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t0d0s%c" >> BUS="scsi", ID="33:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t1d0s%c" >> BUS="scsi", ID="34:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t2d0s%c" >> BUS="scsi", ID="35:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t3d0s%c" >> BUS="scsi", ID="36:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t4d0s%c" >> BUS="scsi", ID="37:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t5d0s%c" >> BUS="scsi", ID="38:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t6d0s%c" >> BUS="scsi", ID="39:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c6t7d0s%c" >> >> BUS="scsi", ID="40:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t0d0s%c" >> BUS="scsi", ID="41:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t1d0s%c" >> BUS="scsi", ID="42:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t2d0s%c" >> BUS="scsi", ID="43:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t3d0s%c" >> BUS="scsi", ID="44:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t4d0s%c" >> BUS="scsi", ID="45:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t5d0s%c" >> BUS="scsi", ID="46:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t6d0s%c" >> BUS="scsi", ID="47:0:0:0", KERNEL="sd*[a-z][0-9]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="dsk/c7t7d0s%c" > >> _______________________________________________ >> Linux_hpc_swstack mailing list >> Linux_hpc_swstack at lists.lustre.org >> http://lists.lustre.org/mailman/listinfo/linux_hpc_swstack > >
Brian, Yes, I understood that you mentioned below. Each "ID" are referring to directory of /sys/bus/scsi/devices/X:0:0:0. Probably, we might be possible to reduce the lines well. But, this was easy way to make 1:1 mapping same as solaris like device and this rule is used many sites as the production today. So, I think, we''d good to start from this rule to get in out stack, but we will need to improve this rule to be simple and flexible in the future. Thanks -Ihara Brian J. Murrell wrote:> On Wed, 2008-06-04 at 12:27 -0400, Jody McIntyre wrote: >> Hi Ihara, > > Hi All, > >> On Mon, Jun 02, 2008 at 05:34:21PM +0900, Shuichi Ihara wrote: >> >>> This is a sample of custom UDEV(7) rule for Thumper(X4500)''s 48 disks. > > Tuning into this one message too late, as my comments address the udev > rules... > >>> BUS="scsi", ID="0:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t0d0" >>> BUS="scsi", ID="1:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t1d0" >>> BUS="scsi", ID="2:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t2d0" >>> BUS="scsi", ID="3:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t3d0" >>> BUS="scsi", ID="4:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t4d0" >>> BUS="scsi", ID="5:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t5d0" >>> BUS="scsi", ID="6:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t6d0" >>> BUS="scsi", ID="7:0:0:0", KERNEL="sd*[a-z]", SYMLINK="dsk/c0t7d0" > ... > > I''m not intimately familiar with udev rule writing, but do you really > have to list one line per SCSI device? Can you not write a script that > you can put on a single udev line that will create the dsk/c?t?d? > pattern such as: > > BUS="scsi", KERNEL="sd*[a-z]*", PROGRAM="/etc/udev/scripts/minus-1.sh %n", SYMLINK="..." > > and get a reference back from the script for the SYMLINK? I think the > variables such as BUS, ID, etc. are available to the PROGRAM. > > b. >