Re: fixed drive name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le Wen ??:
I think that's the right command. According to "man scsi_id"
In RHEL4, we use
BUS="scsi", PROGRAM="/sbin/scsi_id", RESULT="312345", NAME="disk%n"
that works in RHEL4
while in RHEL5, we use BUS=="scsi", PROGRAM=="/sbin/scsi_id -d %N -s %p", RESULT=="312345", NAME="disk%n" and that doesn't work in RHEL5, definitely I tried BUS="scsi", PROGRAM="/sbin/scsi_id", RESULT="312345", NAME="disk%n"
in RHEL5, no luck.

Wenle
I did it like this on my REHL5.2 with SAN storage connected:
My objective is to give a partition a static name.
1. get the info from the partition, for example sdb3
# udevinfo -a -p /sys/block/sdb/sdb3
2. pick up the size info(all partitions have different size, I use the size to identify the partition), and create /etc/udev/rules.d/20-user.rules:
BUS=="scsi",SYSFS{size}=="398636417",SYSFS{start}=="62",SYMLINK="newname"
3. # /sbin/udevstart
4. use the static name /dev/newname to mount to a folder
5. (option) put a line into /etc/fstab to make it work on reboot


hope it help.

Allen

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux