LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   NAS SCSI disk device naming consistency issue (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/nas-scsi-disk-device-naming-consistency-issue-945306/)

subbudba 05-16-2012 09:33 AM

NAS SCSI disk device naming consistency issue
 
Hi,

I have 4 partitions on NAS (iomega store centre ix2 200) which is mounted on 3 systems and being used to ORACLE 10GR2 RAC. But the devices names are getting changed at the time of reboot, so tried to implemet udev using the following procedure for disk device naming consistency. But this doesn't work for me.

[root@tst9 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 8)
[root@tst9 ~]# uname -a
Linux tst9 2.6.9-89.0.0.0.1.ELhugemem #1 SMP Tue May 19 04:38:38 EDT 2009 i686 i686 i386 GNU/Linux
[root@tst9 ~]#

In /etc/scsi_id.config
#options=-b -- Commented
options=-g -- Removed #

[root@tst9 ~]# cd /etc/udev/rules.d/
[root@tst9 rules.d]# cat 100-names.rules
echo ====Beginning==== >> /tmp/mynames.out
KERNEL="sd*", BUS="scsi", PROGRAM="/sbin/scsi_id -g -s", RESULT="35000144f61462284", NAME="mysda"
KERNEL="sd[a-z]", BUS="scsi", PROGRAM="/sbin/scsi_id -g -s", RESULT="35000144f00877707", NAME="mysdb"
KERNEL="sd*", BUS="scsi", PROGRAM="/sbin/scsi_id -g -s", RESULT="35000144f46088762", NAME="mysdc"
KERNEL="sd[a-z]", BUS="scsi", PROGRAM="/sbin/scsi_id -g -s", RESULT="35000144f42888111", NAME="mysdd"
echo ====Ending===== >> /tmp/mynames.out
[root@tst9 rules.d]#

# start_udev

The above ids are queried using
[root@tst9 rules.d]# scsi_id -g -s /block/sda
35000144f61462284
[root@tst9 rules.d]# udevinfo -V
udevinfo, version 039


But still I dont see naming consistency, and I think files are not even being used from /etc/udev/rules.d/ as the /tmp/mynames.out is not being generated.

Any solution would be really appreciated.


Thanks
Subbu.

MensaWater 05-16-2012 09:48 AM

NAS SCSI?

NAS = Network attached storage - This is typically NFS (UNIX/Linux) or CIFS (Windows) shares.

Are you saying the Iomega is doing iSCSI rather than shares?

Are you using OCFS (or OCFS2) or ASM? If ASM aren't you using raw devices? If so you don't need to worry about actual names of the underlying /dev/sd* devices after you do the assignments. If you're doing filesystems you should be able to do the mounts using UUID rather than names so again it seems the names shouldn't be important.

RHEL4 by the way went end of life at the end of February. You really should think about upgrading to something more recent. RHEL5 has been out for more than 5 years and RHEL6 has been out for more than a year. RHEL4 being really old I wonder how much support it truly had for udev and iSCSI.

subbudba 05-18-2012 12:44 AM

Thanks for the points mentioned.

Yes, Iomega is doing iSCSI.

We are planning for the O/S upgradation soon.

The following rule worked after a lot of research (related to syntax).
[root@tst9 rules.d]# cat 75-names.rules
KERNEL="sd[a-z]", BUS="scsi", SYSFS{size}="56623104", SYSFS{model}="LIFELINE-DISK", SYSFS{vendor}="EMC", SYMLINK="racfs"
[root@tst9 rules.d]# ls -ltr /dev/racfs
lrwxrwxrwx 1 root root 3 May 18 10:34 /dev/racfs -> sdd
[root@tst9 rules.d]#

But still I have a problem. How can I get the slices like /dev/racfs1, 2, 3,.... which point to the actual disk to configure as following.

[root@tst9 rules.d]# cat /etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/sdb5
/dev/raw/raw2 /dev/sdb6
/dev/raw/raw3 /dev/sdb7
/dev/raw/raw4 /dev/sdb8
/dev/raw/raw5 /dev/sdb9
/dev/raw/raw6 /dev/sdb10
[root@tst9 rules.d]#

When I create a new slice using /dev/racfs it creates at the base /dev/sdb or /dev/sdc (which ever it takes) but not /dev/racfs1, /dev/racfs2, .....


Thanks
Subbu.


All times are GMT -5. The time now is 08:26 AM.