[BREEZY] USB external IDE drives fail to be mounted by GVM/HAL

Bug #19376 reported by Mark Smith
8
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Invalid
Medium
Martin Pitt

Bug Description

Partitions on an external IDE drive, connected via USB, are not detected and
automatically mounted by gnome-volume-manager

Revision history for this message
Mark Smith (ubuntu-marksmith) wrote :

Test case files to follow ....

In the meantime:
hald happily detects the drive as a SCSI device, sees the block device /dev/sda
None of the partitions are detected, consequently gvm cannot pick them up.

With hald in verbose mode:
volume scanning is attempted (probe-volume.c reports this), but no further
information is output.

Suspect:
hald/linux2/probing/probe-volume.c attempts to open device with "fd =
open(device_file, O_RDONLY)" line 177

hal user is not a member of the disk group; /dev/sda is 660 root:disk

Temporary workaround:
sudo adduser hal disk
sudo /etc/init.d/dbus restart

Disk partitions are now detected correctly.

Caveat!
Adding hal to the disk group seems to have the side effect of removing disk
icons from the GNOME desktop on reboot ....

Revision history for this message
Mark Smith (ubuntu-marksmith) wrote :

Created an attachment (id=3158)
hald output

Revision history for this message
Mark Smith (ubuntu-marksmith) wrote :

Created an attachment (id=3159)
gnome-volume-manager log

Revision history for this message
Mark Smith (ubuntu-marksmith) wrote :

Created an attachment (id=3160)
lshal output

Revision history for this message
Mark Smith (ubuntu-marksmith) wrote :

Created an attachment (id=3161)
dmesg output

Revision history for this message
Gabriel Wicke (lists-wikidev) wrote :

I can confirm this with two different external ide drives, including the
workaround. Disk icons don't show up at all while they previously did when i
manually did a pmount /dev/sda1.

Revision history for this message
Gabriel Wicke (lists-wikidev) wrote :

Update: The volume icon actually shows up after a nautilus restart (crash in my
case). It also reappears properly after doing a poweroff-poweron on the ide drive.

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #1)

> hald happily detects the drive as a SCSI device, sees the block device /dev/sda
> None of the partitions are detected, consequently gvm cannot pick them up.

Thanks for the detailled information so far. You already found the root cause of
the problem, the device and its partitions should have the group plugdev, not disk.

Can you please send me the output of the following commands:

ls -l /dev/sda*
sh -x /etc/udev/scripts/removable.sh sda
sh -x /etc/udev/scripts/removable.sh sda1

Thanks!

Revision history for this message
Hendrik Borghorst (djselbeck) wrote :

Here is the Output:

root@breezybadger:~# ls -l /dev/sda*
brw-rw---- 1 root disk 8, 0 Aug 16 17:33 /dev/sda
brw-rw---- 1 root disk 8, 1 Aug 16 17:33 /dev/sda1
root@breezybadger:~# sh -x /etc/udev/scripts/removable.sh sda
sh: /etc/udev/scripts/removable.sh: No such file or directory
root@breezybadger:~# sh -x /etc/udev/scripts/removable.sh sda1
sh: /etc/udev/scripts/removable.sh: No such file or directory

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #9)
> Here is the Output:
>
> root@breezybadger:~# ls -l /dev/sda*
> brw-rw---- 1 root disk 8, 0 Aug 16 17:33 /dev/sda
> brw-rw---- 1 root disk 8, 1 Aug 16 17:33 /dev/sda1
> root@breezybadger:~# sh -x /etc/udev/scripts/removable.sh sda
> sh: /etc/udev/scripts/removable.sh: No such file or directory
> root@breezybadger:~# sh -x /etc/udev/scripts/removable.sh sda1
> sh: /etc/udev/scripts/removable.sh: No such file or directory

Meh, is that a box upgraded from Warty, or still running Warty?

Please try again with
sh -x /etc/udev/removable.sh sda
sh -x /etc/udev/removable.sh sda1

Revision history for this message
Mark Smith (ubuntu-marksmith) wrote :

Okay, usermodded hal to remove it from disk group, so the problem comes back:

#ls -l /dev/sda*
brw-rw---- 1 root disk 8, 0 2005-08-16 20:12 /dev/sda
brw-rw---- 1 root disk 8, 1 2005-08-16 20:12 /dev/sda1
#sh -x /etc/udev/scripts/removable.sh sda
sh: /etc/udev/scripts/removable.sh: No such file or directory
#sh -x /etc/udev/removable.sh sda
sh: /etc/udev/removable.sh: No such file or directory

locate proves there is no removable.sh on the system anywhere

This is a clean install of breezy i386 colony 2, updated to the latest packages.
In particular:

# dpkg -l | egrep "(udev|hal)"
ii hal 0.5.3-0ubuntu3
Hardware Abstraction Layer
ii hal-device-manager 0.5.3-0ubuntu3
Hardware Abstraction Layer user interface
ii libhal-storage1 0.5.3-0ubuntu3
Hardware Abstraction Layer - shared library
ii libhal1 0.5.3-0ubuntu3
Hardware Abstraction Layer - shared library
ii udev 0.060-1ubuntu5 /dev/
management daemon

Revision history for this message
Mark Smith (ubuntu-marksmith) wrote :

/etc/udev/scripts/removable.sh DOES exist on my two other systems, one a clean
Hoary install, one Warty upgraded to Hoary:

# dpkg -l | grep udev
ii udev 0.050-3ubuntu7 /dev/ management daemon

Revision history for this message
Hendrik Borghorst (djselbeck) wrote :

Hi,

my Output is of a fresh Breezy Installation.

Hendrik Borghorst

Revision history for this message
Mark Smith (ubuntu-marksmith) wrote :
Download full text (4.3 KiB)

OK, for completeness (sorry everyone for the spate of emails!)

Copied /etc/udev/scripts/removable.sh from my Hoary system.

Disk mounted, nautilus window appeared. No icon on desktop, however, even
following /etc/init.d/dbus restart

# ls -l /dev/sda*
brw-r----- 1 root plugdev 8, 0 2005-08-16 20:46 /dev/sda
brw-r----- 1 root plugdev 8, 1 2005-08-16 20:46 /dev/sda1

# sh -x /etc/udev/scripts/removable.sh sda
+ DEV=sda
+ BLOCKPATH=/sys/block/sda
+ '[' '!' -d /sys/block/sda ']'
+ REMOVABLE=/sys/block/sda/removable
++ readlink -f /sys/block/sda/device
+
DEVICE=/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0
+ IS_REMOVABLE=0
+ '[' -e /sys/block/sda/removable ']'
++ cat /sys/block/sda/removable
+ IS_REMOVABLE=0
+ '[' 0 = 1 ']'
+ check_bus usb
+ BUSDEVP=/sys/bus/usb/devices
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/usb/devices/1-0:1.0 ']'
+ echo
/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0
++ readlink -f /sys/bus/usb/devices/1-0:1.0
+ grep -q '^/sys/devices/pci0000:00/0000:00:13.0/usb1/1-0:1.0'
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/usb/devices/2-0:1.0 ']'
+ echo
/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0
++ readlink -f /sys/bus/usb/devices/2-0:1.0
+ grep -q '^/sys/devices/pci0000:00/0000:00:13.1/usb2/2-0:1.0'
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/usb/devices/2-2 ']'
+ echo
/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0
++ readlink -f /sys/bus/usb/devices/2-2
+ grep -q '^/sys/devices/pci0000:00/0000:00:13.1/usb2/2-2'
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/usb/devices/2-2:1.0 ']'
+ echo
/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0
++ readlink -f /sys/bus/usb/devices/2-2:1.0
+ grep -q '^/sys/devices/pci0000:00/0000:00:13.1/usb2/2-2/2-2:1.0'
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/usb/devices/3-0:1.0 ']'
+ echo
/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0
++ readlink -f /sys/bus/usb/devices/3-0:1.0
+ grep -q '^/sys/devices/pci0000:00/0000:00:13.2/usb3/3-0:1.0'
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/usb/devices/3-1 ']'
+ echo
/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0
++ readlink -f /sys/bus/usb/devices/3-1
+ grep -q '^/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1'
+ return 0
+ echo 1
1
+ exit 0

# sh /etc/udev/scripts/removable.sh sda1
+ DEV=sda
+ BLOCKPATH=/sys/block/sda
+ '[' '!' -d /sys/block/sda ']'
+ REMOVABLE=/sys/block/sda/removable
++ readlink -f /sys/block/sda/device
+
DEVICE=/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0
+ IS_REMOVABLE=0
+ '[' -e /sys/block/sda/removable ']'
++ cat /sys/block/sda/removable
+ IS_REMOVABLE=0
+ '[' 0 = 1 ']'
+ check_bus usb
+ BUSDEVP=/sys/bus/usb/devices
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/usb/devices/1-0:1.0 ']'
+ echo
/sys/devices/pci0000:00/0000:00:13.2/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0
++ readlink -f /sys/bus/usb/devices/1-0:1.0
+ grep -q '^/sys/devices/pci0000:00/0000:00:13.0/usb1/1-0:1.0'
+ for x in '$BUSDEVP/*'
+ '[' -L /sys/bus/usb/devices/2-0:1.0 ']'
+ echo
/sys/devices/pci0000:00/0000:00:13.2/usb3/...

Read more...

Revision history for this message
Martin Pitt (pitti) wrote :

OK, thanks to some other bugs and your comments I figured out the reason, the
current udev just doesn't ship removable.sh any more, it was accidentially
dropped as it seems.

This bug has been marked as a duplicate of bug 19762.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.