Bug 612064 - [6.0] by-path for scsi tape device is not created
[6.0] by-path for scsi tape device is not created
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: udev (Show other bugs)
6.0
All Linux
medium Severity medium
: rc
: ---
Assigned To: Harald Hoyer
Jan Ščotka
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-07 04:39 EDT by Tomas Smetana
Modified: 2011-02-17 10:29 EST (History)
6 users (show)

See Also:
Fixed In Version: udev-147-2.21.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 16:50:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Smetana 2010-07-07 04:39:51 EDT
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-07 20:57:24 EDT
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 09:06:30 EDT
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 16:50:31 EST
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.