RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 612064 - [6.0] by-path for scsi tape device is not created
Summary: [6.0] by-path for scsi tape device is not created
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: udev
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Harald Hoyer
QA Contact: Jan Ščotka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-07 08:39 UTC by Tomas Smetana
Modified: 2018-10-27 13:35 UTC (History)
6 users (show)

Fixed In Version: udev-147-2.21.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 21:50:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tomas Smetana 2010-07-07 08:39:51 UTC
Description of problem:
by-path for scsi tape device is not created.

# ls -Rl /dev/tape/
/dev/tape/:
total 0
drwxr-xr-x 2 root root 60 Jun 29 15:10 by-id

/dev/tape/by-id:
total 0
lrwxrwxrwx 1 root root 10 Jun 29 15:10 scsi-1HP_C7438A_HU10637814-nst -> ../../nst0

Version-Release number of selected component (if applicable):
udev-147-2.18.el6

How reproducible:
Always.

Steps to Reproduce:
1. Boot the system that has a scsi tape device.
2. ls /dev/tape/
  
Actual results:
No by-path for scsi tape device is created.

Expected results:
There exist by-path symlinks to the tape devices.

Additional info:

Adding the following rules to 50-udev.rules seems to solve the problem:
KERNEL=="nst[0-9]", SUBSYSTEM=="scsi_tape", ENV{ID_PATH}=="", IMPORT{program}="/lib/udev/path_id %p"
KERNEL=="nst[0-9]", SUBSYSTEM=="scsi_tape", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}"

Comment 2 Moritoshi Oshiro 2010-07-08 00:57:24 UTC
Hi Harald,

(In reply to comment #1)
> Proposed fix:
> 
> http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=847b4f84c671e98f29f22d8e3e0d70a231d71a7b    

From FJ:
---
I think you need one more change to fix the issue completely.  With the original rules (or even with the patch above,) both st*[0-9] and nst*[0-9] will try to make the same file (same file name) and, as a result, the latter will fail.  That's why my proposal fix described in "Additional Field:" adds "-nst" to the end of SYMLINK line, avoiding the file name conflict.

 KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-nst"
---

Comment 7 Jan Ščotka 2010-09-07 13:06:30 UTC
verified on machine with scsi tape:
[root@dhcp-2-205 ~]# ls -Rl /dev/tape/
/dev/tape/:
total 0
drwxr-xr-x. 2 root root 80 Sep  1 11:07 by-id
drwxr-xr-x. 2 root root 80 Sep  1 11:07 by-path

/dev/tape/by-id:
total 0
lrwxrwxrwx. 1 root root  9 Sep  1 11:07 scsi-1HP_C7438A_HU10627M0G -> ../../st0
lrwxrwxrwx. 1 root root 10 Sep  1 11:07 scsi-1HP_C7438A_HU10627M0G-nst -> ../../nst0

/dev/tape/by-path:
total 0
lrwxrwxrwx. 1 root root  9 Sep  1 11:07 pci-0000:07:05.0-scsi-0:0:3:0 -> ../../st0
lrwxrwxrwx. 1 root root 10 Sep  1 11:07 pci-0000:07:05.0-scsi-0:0:3:0-nst -> ../../nst0

what seems like proper output
PASS

Comment 8 releng-rhel@redhat.com 2010-11-10 21:50:31 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.