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
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: udev   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Harald Hoyer
QA Contact: Jan Ščotka
Depends On:
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:
Story Points: ---
Clone Of:
Last Closed: 2010-11-10 21:50:31 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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/
total 0
drwxr-xr-x 2 root root 60 Jun 29 15:10 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):

How reproducible:

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/
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

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

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

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.