Bug 722821 - USB drive does not start during reboot
Summary: USB drive does not start during reboot
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: realtime-kernel
Version: 1.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: Next Version
: ---
Assignee: Red Hat Real Time Maintenance
QA Contact: David Sommerseth
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-18 06:33 UTC by gopal krishna tiwari
Modified: 2018-11-28 21:42 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-19 20:38:06 UTC
Target Upstream Version:


Attachments (Terms of Use)
sos-report (1.70 MB, application/x-gzip)
2011-07-18 06:56 UTC, gopal krishna tiwari
no flags Details
log_messages (50.00 KB, application/x-tar)
2011-07-18 07:07 UTC, gopal krishna tiwari
no flags Details

Description gopal krishna tiwari 2011-07-18 06:33:48 UTC
Description of problem:

Customer connect a WD 1.5TB USB drive on the MRG Realtime 1.2 system, it can not be mounted automatically during reboot, When recycle (power it down and then power it on) it to be able to mount it. After the system is up, the fdisk -l does not display any USB drive partition, and the dmesg does not have any messages for USB partition. The lsusb does list the USB drive. Customer want to automatically mount the USB drive during system reboot, but can not do it right now.

Version-Release number of selected component (if applicable):

Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Linux pcn-rte 2.6.24.7-139.el5rt 
udev-095-14.19.el5-i386

How reproducible:
Every time.

Steps to Reproduce:
1.Connect the USB Storage Device
2.reboot System
3.check mount 
  
Actual results:
Device node Not created.

Expected results:
Device Node should be created and later should be mounted

Additional info:

We have tried this Work around on Our System it Works on Updated Kernel kernel-rt-2.6.24.7-169.el5rt.x86_64 But It does not Work on the Customers Place.
  
   1) Clear all the previous entries and add following line's to /etc/rc.local 
   
         modprobe usb-storage
    
         udevsettle

         mount -a
  
   2) Add following entries to /etc/fstab     
      
          /dev/(your_Device_Node) /media auto defaults,user 0 0.

Comment 8 Harald Hoyer 2011-07-19 12:04:21 UTC
boot with normal kernel and execute:

$ ( cd $(readlink -f /sys/block/<DRIVENAME>  ); while [ $(pwd) != "/sys" ]; do pwd; [ -e modalias ] && modprobe -vn --show-depends $(cat modalias); [ -d driver ] && ls -l driver; cd ..;done; )

example output:

/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/host7/target7:0:0/7:0:0:0/block/sdh
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/host7/target7:0:0/7:0:0:0/block
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/host7/target7:0:0/7:0:0:0
FATAL: Module scsi:t_0x00 not found.
lrwxrwxrwx 1 root root 0 19. Jul 13:59 driver -> ../../../../../../../../../../../bus/scsi/drivers/sd
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/host7/target7:0:0
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/host7
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0
insmod /lib/modules/2.6.38.8-35.fc15.x86_64/kernel/drivers/usb/storage/uas.ko 
insmod /lib/modules/2.6.38.8-35.fc15.x86_64/kernel/drivers/usb/storage/usb-storage.ko 
lrwxrwxrwx 1 root root 0 19. Jul 13:59 driver -> ../../../../../../../../bus/usb/drivers/usb-storage
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.1/1-1.1.1
lrwxrwxrwx 1 root root 0 19. Jul 13:59 driver -> ../../../../../../../bus/usb/drivers/usb
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.1
lrwxrwxrwx 1 root root 0 19. Jul 13:59 driver -> ../../../../../../bus/usb/drivers/usb
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1
lrwxrwxrwx 1 root root 0 19. Jul 13:59 driver -> ../../../../../bus/usb/drivers/usb
/sys/devices/pci0000:00/0000:00:1d.7/usb1
lrwxrwxrwx 1 root root 0 19. Jul 13:59 driver -> ../../../../bus/usb/drivers/usb
/sys/devices/pci0000:00/0000:00:1d.7
FATAL: Module pci:v00008086d000027CCsv00001028sd000001DEbc0Csc03i20 not found.
lrwxrwxrwx 1 root root 0 19. Jul 13:55 driver -> ../../../bus/pci/drivers/ehci_hcd
/sys/devices/pci0000:00
/sys/devices


now you know the needed modules and drivers.

Comment 9 Siddharth 2011-07-21 06:06:46 UTC
Hi,

We tried your suggestion and I saw the following result.

RT Kernel - 2.6.24.7-139.el5rt

[root@dhcp209-170 ~]# sh test_device.sh   --> script containing command 
/sys/block/sdc
/sys/block

Regular Kernel - 2.6.18-238.el5

[root@dhcp209-170 ~]# sh test_device.sh   --> script containing command 
/sys/block/sdc
/sys/block

Both kernel giving same output.It does not shows the driver or modules loaded.

Comment 10 Harald Hoyer 2011-07-21 07:53:49 UTC
huh? does your "readlink" function properly?

$ readlink -f /sys/block/sdc
/sys/devices/pci0000:00/0000:00:1f.1/host4/target4:0:1/4:0:1:0/block/sdc

Comment 11 Siddharth 2011-07-21 08:38:44 UTC
I checked with readlink and here's the o/p

    $ readlink -f /sys/block/sdc
    /sys/block/sdc

What does it mean? I think readlink function not working properly.

Comment 12 Harald Hoyer 2011-07-21 08:54:45 UTC
(In reply to comment #11)
> I checked with readlink and here's the o/p
> 
>     $ readlink -f /sys/block/sdc
>     /sys/block/sdc
> 
> What does it mean? I think readlink function not working properly.

what is the output of:

# ls -l /sys/block

Comment 13 Harald Hoyer 2011-07-21 08:59:15 UTC
works fine on my RHEL-6 virtual machine:

# readlink -f /sys/block/sda
/sys/devices/pci0000:00/0000:00:01.1/host0/target0:0:0/0:0:0:0/block/sda

Comment 14 Harald Hoyer 2011-07-21 08:59:56 UTC
# rpm -qf $(command -v readlink)
coreutils-8.4-1.el6.i686

Comment 15 Harald Hoyer 2011-07-21 09:00:32 UTC
ah, doh! sorry... just saw this is RHEL-5.3 :-/

Comment 16 Harald Hoyer 2011-07-21 09:04:57 UTC
try this:

# DRIVENAME=sda
# ( cd $(readlink -f /sys/block/$DRIVENAME/device  ); while [ $(pwd) != "/sys" ]; do pwd; [ -e modalias ] && modprobe -vn --show-depends $(cat modalias); [ -d driver ] && ls -l driver; cd ..;done; )


example:
#  ( cd $(readlink -f /sys/block/hda/device  ); while [ $(pwd) != "/sys" ]; do pwd; [ -e modalias ] && modprobe -vn --show-depends $(cat modalias); [ -d driver ] && ls -l driver; cd ..;done; )
/sys/devices/pci0000:00/0000:00:01.1/ide0/0.0
FATAL: Module ide:m_disk not found.
lrwxrwxrwx 1 root root 0 Jul 21 11:01 driver -> ../../../../../bus/ide/drivers/ide-disk
/sys/devices/pci0000:00/0000:00:01.1/ide0
/sys/devices/pci0000:00/0000:00:01.1
insmod /lib/modules/2.6.18-92.1.10.el5/kernel/drivers/scsi/scsi_mod.ko 
insmod /lib/modules/2.6.18-92.1.10.el5/kernel/drivers/ata/libata.ko 
insmod /lib/modules/2.6.18-92.1.10.el5/kernel/drivers/ata/ata_piix.ko 
lrwxrwxrwx 1 root root 0 Jul 21 11:01 driver -> ../../../bus/pci/drivers/PIIX_IDE
/sys/devices/pci0000:00
/sys/devices

Comment 17 Siddharth 2011-07-21 09:34:55 UTC
I tried your command and here's the output.

[root@dhcp209-170 /]#  cd $(readlink -f /sys/block/sdc/device  ); while [ $(pwd) != "/sys" ]; do pwd; [ -e modalias ] && modprobe -vn --show-depends $(cat modalias); [ -d; driver ] && ls -l driver; cd ..;done;


/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/host8/target8:0:0/8:0:0:0
insmod /lib/modules/2.6.24.7-139.el5rt/kernel/drivers/scsi/scsi_mod.ko 
insmod /lib/modules/2.6.24.7-139.el5rt/kernel/drivers/scsi/sd_mod.ko 
-bash: [: missing `]'
-bash: driver: command not found
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/host8/target8:0:0
-bash: [: missing `]'
-bash: driver: command not found
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/host8
-bash: [: missing `]'
-bash: driver: command not found
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0
FATAL: Module usb:v03F0p3307d8192dc00dsc00dp00ic08isc06ip50 not found.
-bash: [: missing `]'
-bash: driver: command not found
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4
-bash: [: missing `]'
-bash: driver: command not found
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1
-bash: [: missing `]'
-bash: driver: command not found
/sys/devices/pci0000:00/0000:00:1d.0/usb2
-bash: [: missing `]'
-bash: driver: command not found
/sys/devices/pci0000:00/0000:00:1d.0
insmod /lib/modules/2.6.24.7-139.el5rt/kernel/drivers/usb/host/ehci-hcd.ko 
-bash: [: missing `]'
-bash: driver: command not found
/sys/devices/pci0000:00
-bash: [: missing `]'
-bash: driver: command not found
/sys/devices
-bash: [: missing `]'
-bash: driver: command not found

Comment 18 Harald Hoyer 2011-07-21 09:47:07 UTC
[ -d; driver ] .... remove the ";" ... copy and paste error

Comment 19 Siddharth 2011-07-21 10:09:04 UTC
Apologies for mistake.. 

[root@dhcp209-170 sys]# cd $(readlink -f /sys/block/sdc/device  ); while [ $(pwd) != "/sys" ]; do pwd; [ -e modalias ] && modprobe -vn --show-depends $(cat modalias); [ -d driver ] && ls -l driver; cd ..;done;


/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/host8/target8:0:0/8:0:0:0
insmod /lib/modules/2.6.24.7-139.el5rt/kernel/drivers/scsi/scsi_mod.ko 
insmod /lib/modules/2.6.24.7-139.el5rt/kernel/drivers/scsi/sd_mod.ko 
lrwxrwxrwx 1 root root 0 Jul 21 14:01 driver -> ../../../../../../../../../../bus/scsi/drivers/sd
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/host8/target8:0:0
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/host8
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0
FATAL: Module usb:v03F0p3307d8192dc00dsc00dp00ic08isc06ip50 not found.
lrwxrwxrwx 1 root root 0 Jul 21 14:01 driver -> ../../../../../../../bus/usb/drivers/usb-storage
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4
lrwxrwxrwx 1 root root 0 Jul 21 14:01 driver -> ../../../../../../bus/usb/drivers/usb
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1
lrwxrwxrwx 1 root root 0 Jul 21 11:28 driver -> ../../../../../bus/usb/drivers/usb
/sys/devices/pci0000:00/0000:00:1d.0/usb2
lrwxrwxrwx 1 root root 0 Jul 21 11:28 driver -> ../../../../bus/usb/drivers/usb
/sys/devices/pci0000:00/0000:00:1d.0
insmod /lib/modules/2.6.24.7-139.el5rt/kernel/drivers/usb/host/ehci-hcd.ko 
lrwxrwxrwx 1 root root 0 Jul 21 11:28 driver -> ../../../bus/pci/drivers/ehci_hcd
/sys/devices/pci0000:00
/sys/devices


Now it shows the correct output.

Comment 20 Harald Hoyer 2011-07-21 14:45:00 UTC
so, as you can see, you need modules:
* scsi_mod.ko 
* sd_mod.ko 
* ehci-hcd.ko 

and drivers compiled in the kernel:
* usb
* usb-storage

Comment 21 Siddharth 2011-07-22 05:11:43 UTC
(In reply to comment #20)
> so, as you can see, you need modules:
> * scsi_mod.ko 
> * sd_mod.ko 
> * ehci-hcd.ko 

 These modules are loaded.  

> and drivers compiled in the kernel:
> * usb
> * usb-storage
 
 These modules need to be modprobe. 
 I think these are not compiled in kernel.

Comment 22 Siddharth 2011-07-27 06:10:14 UTC
O/P of command from customer ..

[root@pcn-rte usbissue]# cd $(readlink -f /sys/block/sda/device  ); while [ $(pwd) != "/sys" ]; do pwd; [ -e modalias ] && modprobe -vn --show-
depends $(cat modalias); [ -d driver ] && ls -l driver; cd ..;done;


/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7:1.0/host2/target2:0:0/2:0:0:0
insmod /lib/modules/2.6.24.7-169.el5rt/kernel/drivers/scsi/scsi_mod.ko 
insmod /lib/modules/2.6.24.7-169.el5rt/kernel/drivers/scsi/sd_mod.ko 
lrwxrwxrwx 1 root root 0 Jul 26 20:42 driver -> ../../../../../../../../../bus/scsi/drivers/sd
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7:1.0/host2/target2:0:0
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7:1.0/host2
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7:1.0
FATAL: Module usb:v1058p1110d2003dc00dsc00dp00ic08isc06ip50 not found.
lrwxrwxrwx 1 root root 0 Jul 26 20:42 driver -> ../../../../../../bus/usb/drivers/usb-storage
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7
lrwxrwxrwx 1 root root 0 Jul 26 20:42 driver -> ../../../../../bus/usb/drivers/usb
/sys/devices/pci0000:00/0000:00:1d.7/usb1
lrwxrwxrwx 1 root root 0 Jul 26 20:42 driver -> ../../../../bus/usb/drivers/usb
/sys/devices/pci0000:00/0000:00:1d.7
insmod /lib/modules/2.6.24.7-169.el5rt/kernel/drivers/usb/host/ehci-hcd.ko 
lrwxrwxrwx 1 root root 0 Jul 26 20:42 driver -> ../../../bus/pci/drivers/ehci_hcd
/sys/devices/pci0000:00
/sys/devices

USB module not found. 
Kernel might be failed to load USB module .

Comment 23 Harald Hoyer 2011-07-27 10:41:13 UTC
(In reply to comment #22)
> O/P of command from customer ..
> 
> [root@pcn-rte usbissue]# cd $(readlink -f /sys/block/sda/device  ); while [
> $(pwd) != "/sys" ]; do pwd; [ -e modalias ] && modprobe -vn --show-
> depends $(cat modalias); [ -d driver ] && ls -l driver; cd ..;done;
> 
> 
> /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7:1.0/host2/target2:0:0/2:0:0:0
> insmod /lib/modules/2.6.24.7-169.el5rt/kernel/drivers/scsi/scsi_mod.ko 
> insmod /lib/modules/2.6.24.7-169.el5rt/kernel/drivers/scsi/sd_mod.ko 
> lrwxrwxrwx 1 root root 0 Jul 26 20:42 driver ->
> ../../../../../../../../../bus/scsi/drivers/sd
> /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7:1.0/host2/target2:0:0
> /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7:1.0/host2
> /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7/1-7:1.0
> FATAL: Module usb:v1058p1110d2003dc00dsc00dp00ic08isc06ip50 not found.
> lrwxrwxrwx 1 root root 0 Jul 26 20:42 driver ->
> ../../../../../../bus/usb/drivers/usb-storage
> /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7
> lrwxrwxrwx 1 root root 0 Jul 26 20:42 driver ->
> ../../../../../bus/usb/drivers/usb
> /sys/devices/pci0000:00/0000:00:1d.7/usb1
> lrwxrwxrwx 1 root root 0 Jul 26 20:42 driver -> ../../../../bus/usb/drivers/usb
> /sys/devices/pci0000:00/0000:00:1d.7
> insmod /lib/modules/2.6.24.7-169.el5rt/kernel/drivers/usb/host/ehci-hcd.ko 
> lrwxrwxrwx 1 root root 0 Jul 26 20:42 driver ->
> ../../../bus/pci/drivers/ehci_hcd
> /sys/devices/pci0000:00
> /sys/devices
> 
> USB module not found. 
> Kernel might be failed to load USB module .

I see no problem here. In fact /dev/sda is present.. what is the problem?

Comment 25 Siddharth 2011-07-27 10:52:33 UTC
Yeah.. /dev/sda is node is created but it fails to mount.

Comment 26 Harald Hoyer 2011-07-27 10:55:57 UTC
so, it's not a udev problem, but a _real_ kernel problem.
Linux pcn-rte 2.6.24.7-139.el5rt 

Not sure, what the "real time kernel" component is.

Comment 31 Beth Uptagrafft 2014-08-19 20:38:06 UTC
MRG-1 on Red Hat Enterprise Linux 5 reached it's end of life on March 31, 2014. Because this issue is against the MRG-1 release, we are closing it WONTFIX. If you believe this is still an issue on our most recent MRG-2.5 3.10 kernel, please file a new issue for tracking.


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