This Metalink Note ID is pretty good: 465001.1 -----Original Message----- From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Le Wen Sent: Wednesday, 17 June 2009 10:08 p.m. To: General Red Hat Linux discussion list Cc: General Red Hat Linux discussion list; redhat-list-bounces@xxxxxxxxxx Subject: RE: fixed drive name OK, my fault for not describing clearly. Here's what I've done. In RHEL5, I'm using iSCSI, I run # iscsiadm -m node --target iqn.2001-04.com.winner:storage.lun2 --login I get #fdisk -l Disk /dev/sda: 73.4 GB, 73407488000 bytes 255 heads, 63 sectors/track, 8924 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS /dev/sda2 2551 2563 104422+ 83 Linux /dev/sda3 2564 8924 51094732+ 8e Linux LVM Disk /dev/sdb: 31.4 GB, 31457280000 bytes 64 heads, 32 sectors/track, 30000 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 30000 30719984 83 Linux #scsi_id -g -s /block/sdb 1494554000000000000000000020000001700000041008000 However, I need "sdb" to be "sdf", I create a rule in udev #more /etc/udev/rules.d/20-name.rules BUS=="scsi", PROGRAM=="/sbin/scsi_id -d %N -s %p", RESULT=="14945540000000000000 00000020000001700000041008000", NAME="sdf%n" #start_udev I logout iSCSI and login again,guess what, "sdb" disappeared, but still no "sdf" item. #fdisk -l Disk /dev/sda: 73.4 GB, 73407488000 bytes 255 heads, 63 sectors/track, 8924 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS /dev/sda2 2551 2563 104422+ 83 Linux /dev/sda3 2564 8924 51094732+ 8e Linux LVM I checked the /sys/block directory #ls -ld /sys/block/sd* drwxr-xr-x 8 root root 0 Jun 17 17:52 /sys/block/sda drwxr-xr-x 6 root root 0 Jun 17 18:06 /sys/block/sdb still "sdb" is created though it doesn't appear in the result of "fdisk -l" and no "sdf". So what's wrong? Also I have Oracle metalink id. Thanks everyone. Wenle Staff Consultant CSB Advanced Solution "Marti, Rob" <RJM002@xxxxxxxx> Sent by: redhat-list-bounces@xxxxxxxxxx 2009-06-17 17:32 Please respond to General Red Hat Linux discussion list <redhat-list@xxxxxxxxxx> To General Red Hat Linux discussion list <redhat-list@xxxxxxxxxx> cc Subject RE: fixed drive name Saying "faied" is a perfect description of the problem. I can tell exactly what went wrong. Wait - no I can't. I get that it didn't keep sdb (do your disks change that often? What are you really trying to accomplish?) Are there any error messages? Can you paste your udev config and the output of scsi_id /dev/blockdevice ? As was said, udev is the right place to do this, you might just be missing a step. Rob Marti ________________________________________ From: redhat-list-bounces@xxxxxxxxxx [redhat-list-bounces@xxxxxxxxxx] On Behalf Of Le Wen [wenle@xxxxxxxxxx] Sent: Tuesday, June 16, 2009 23:45 To: General Red Hat Linux discussion list Cc: General Red Hat Linux discussion list; redhat-list-bounces@xxxxxxxxxx Subject: RE: fixed drive name Yes, I did the similar procedure in RHEL5 using UDEV, but failed. Wenle Staff Consultant CSB Advanced Solution "Geofrey Rainey" <Geofrey.Rainey@xxxxxxxxxx> Sent by: redhat-list-bounces@xxxxxxxxxx 2009-06-17 12:08 Please respond to General Red Hat Linux discussion list <redhat-list@xxxxxxxxxx> To "General Red Hat Linux discussion list" <redhat-list@xxxxxxxxxx> cc Subject RE: fixed drive name The procedure is similar in RHEL 5, you need to do it using "udev" rules. -----Original Message----- From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Le Wen Sent: Wednesday, 17 June 2009 3:44 p.m. To: General Red Hat Linux discussion list Subject: fixed drive name Hi list, I want to give some hard drive a fixed name, say,sdb,sdc... In RHEL4, I can handle it using such method: 1. edit /etc/scsi_id.conf, change options=-b to options=-g 2. use command: scsi_id /block/sdb to get the scsi uuid of the hard drive, assume it returns 123456 3. create a rule file under /etc/udev/rules.d, which contains a line like BUS="scsi", PROGRAM="/sbin/scsi_id", RESULT="123456", NAME="sdb%n" 4. OK, each time I restart the server, the drive is fixed to sdb and never changes. However, in RHEL5, I can't do it anyway. So any clue? Thanks Wenle Staff Consultant CSB Advanced Solution -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list ========================================================== For more information on the Television New Zealand Group, visit us online at tvnz.co.nz ========================================================== CAUTION: This e-mail and any attachment(s) contain information that is intended to be read only by the named recipient(s). This information is not to be used or stored by any other person and/or organisation. -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list ========================================================== For more information on the Television New Zealand Group, visit us online at tvnz.co.nz ========================================================== CAUTION: This e-mail and any attachment(s) contain information that is intended to be read only by the named recipient(s). This information is not to be used or stored by any other person and/or organisation. -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list