Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Openfiler - udev

Status
Not open for further replies.

flubbard

Technical User
Jun 11, 2003
148
US
I am new to working with udev. I have set up an openfiler server with a raid array (md0) which is established as an iscsi target and esata drive for backup. For backup, I would like to connect to the iscsi target using open-iscsi initiator and then dd from the iscsi to the esata drive. I am concerned that the mapping won't always be the same in udev (i.e. iscsi currently sde and esata is sdd)

I tried to write the following udev rule:
Code:
SUBSYSTEM=="block", BUS=="scsi", SYSFS{vendor}=="OPNFILER", NAME="iscsi/share_drive"
SUBSYSTEM=="block", BUS=="scsi", SYSFS{model}=="WDCWD10EAVS-00D", NAME="backup"
so that the iscsi always comes in on /dev/iscsi/share_drive and the eSATA drive is /dev/backup. It appears that since I am defining the rule based on the BUS=="scsi" attributes instead of the block device, I do not get a clean block device in /dev/iscsi. Is there anyway to select the block device using these attributes. Right now if I look at the /dev/backup, it appears to show information for the parent bus instead of the drive.

Also, I would note that openfiler is based on rLinux and does not seem to have persistent devices (at least there is no /dev/disk folder).

Any help would be appreciated.

- flub
 
I figured it out. Because both the drive and partitions matched the rule, the partitions were being mapped instead of the drive. I fixed it my using the following rule instead:
Code:
KERNEL==”sd[a-z], SUBSYSTEM=="block", BUS=="scsi", SYSFS{vendor}=="OPNFILER", NAME="iscsi/share_drive"
KERNEL==”sd[a-z], SUBSYSTEM=="block", BUS=="scsi", SYSFS{model}=="WDC WD10EAVS-00D", NAME="backup"
which only grabs the root sd* device (and not one of the partitions.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top