# ivman does not mount USB-HD

## springob

I installed:

hal 0.5.7-r3

dbus 0.61-r1

ivman 0.6.11

ivman does not mount my USB haddisk; dmesg gives the following message:

Jun 15 15:50:03 gen2 ivman: Device /dev/sda2 won't be mounted because no mount policy was specified on volume or storage device and storage device does not appear to be removable

USB flash disks are (auto)mounted correctly. 

lshal gives the message for /dev/sda (USB harddisk):

storage.removable = false  (bool)

Maybe this is the problem, but I don't know how to fix it...

Is there any help out there?Last edited by springob on Sun Jun 18, 2006 10:42 am; edited 1 time in total

----------

## Headrush

Try adding the fullpath for the device node for your removeable HD to /etc/pmount.allow.

Example: /etc/pmount.allow

```
/dev/sda
```

----------

## springob

still it does not work! I tried:

  /dev/sda

and

  /dev/sda6

I still get the message:

Jun 16 19:36:12 gen2 ivman: Device /dev/sda6 won't be mounted because no mount policy was specified on volume or storage device and storage device does not appear to be removable

Do You have some more suggestions?Last edited by springob on Sun Jun 18, 2006 10:49 am; edited 1 time in total

----------

## springob

Now I updated ivman to version 0.6.12. But I still have the same error message. Mounting via KwikDisk and corresponding entries in fstab works. So, mounting the USB-HD works but automounting with ivman does not. Does someone have some hints for me?

Regards

----------

## Headrush

 *Quote:*   

> [edit]
> 
> Using fstab entries (ivman 0.6.x or greater)
> 
> Ivman 0.6.x or greater uses pmount to mount your drives, and thus does NOT need any fstab entries. However, fstab entries may still be used if necessary, though you are suggested to avoid them when possible.

 

The issue is although the drive is in a USB enclosure, when polled for info, the drive itself reports that it is not removeable. (HD aren't naturally) So you need a XML device file or whatever it is called by ivman to override the behaviour and report that the drive is removeable.

I don't use ivman myself, but hopefully this will help you in finding a post that will show the correct file to edit to do this.

(It exists, I have read it, just don't know where.  :Sad:  )

----------

## springob

That sounds reasonable! I will try to find the corresponding xml policy statement. Thank You for Your help!

----------

## Headrush

Here is an example I found: /etc/hal/fdi/information/10-ultrabay.fdi

```
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> 

<deviceinfo version="0.2">

  <device>

    <!-- UltraBay Devices -->

    <match key="storage.bus" string="scsi">

      <match key="storage.physical_device" string="/org/freedesktop/Hal/devices/pci_8086_2653_scsi_host_scsi_device_lun0">

        <merge key="storage.hotpluggable" type="bool">true</merge>

      </match>

    </match>

  </device>

</deviceinfo>
```

You can use hal-device or a GTK GUI to find the properties for you device. You should find a removeable property.

----------

## springob

yepp! that's it!

I made a file /etc/hal/fdi/information/10-initio.fdi with the contents:

```
?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">

  <device>

      <!-- Initio Devices -->

          <match key="storage.bus" string="usb">

                <match key="storage.physical_device" string="/org/freedesktop/Hal/devices/usb_device_13fd_540_00101005000000000_if0">

                    <merge key="storage.removable" type="bool">true</merge>

                </match>

          </match>

  </device>

</deviceinfo>

```

Now it works! It still does not make the subdirs I would like to have, but I can live with it.

Many thankx.

Regards

   Lothar

----------

## Iced-Tux

Hi there,

my problem is  similiar. I have an external HDD Maxtor OneTouch III. Ivman doesn't want to mount with the following statement:

```
IvmConfig/IvmConfigCommon.c:227 (ivm_device_is_mountable) Device /dev/sdc1 won't be mounted because no mount policy was specified on volume or storage device and storage device does not appear to be removable

```

This is the debug output the moment I switch my HDD on:

```
hal_interface.c:47 (hal_device_added) New Device: /org/freedesktop/Hal/devices/usb_device_67b_2507_22BA00C1

manager.c:1030 (ivm_media_changed) /org/freedesktop/Hal/devices/usb_device_67b_2507_22BA00C1 wasn't mounted, by us or by others...

hal_interface.c:47 (hal_device_added) New Device: /org/freedesktop/Hal/devices/usb_device_67b_2507_22BA00C1_if0

manager.c:1030 (ivm_media_changed) /org/freedesktop/Hal/devices/usb_device_67b_2507_22BA00C1_if0 wasn't mounted, by us or by others...

hal_interface.c:47 (hal_device_added) New Device: /org/freedesktop/Hal/devices/usb_device_67b_2507_22BA00C1_if0_scsi_host

manager.c:1030 (ivm_media_changed) /org/freedesktop/Hal/devices/usb_device_67b_2507_22BA00C1_if0_scsi_host wasn't mounted, by us or by others...

hal_interface.c:47 (hal_device_added) New Device: /org/freedesktop/Hal/devices/usb_device_67b_2507_22BA00C1_usbraw

manager.c:1030 (ivm_media_changed) /org/freedesktop/Hal/devices/usb_device_67b_2507_22BA00C1_usbraw wasn't mounted, by us or by others...

hal_interface.c:47 (hal_device_added) New Device: /org/freedesktop/Hal/devices/usb_device_67b_2507_22BA00C1_if0_scsi_host_scsi_device_lun0

manager.c:1030 (ivm_media_changed) /org/freedesktop/Hal/devices/usb_device_67b_2507_22BA00C1_if0_scsi_host_scsi_device_lun0 wasn't mounted, by us or by others...

hal_interface.c:47 (hal_device_added) New Device: /org/freedesktop/Hal/devices/usb_device_67b_2507_22BA00C1_if0_scsi_host_scsi_device_lun0_scsi_generic

manager.c:1030 (ivm_media_changed) /org/freedesktop/Hal/devices/usb_device_67b_2507_22BA00C1_if0_scsi_host_scsi_device_lun0_scsi_generic wasn't mounted, by us or by others...

hal_interface.c:47 (hal_device_added) New Device: /org/freedesktop/Hal/devices/storage_serial_Maxtor_OneTouch_III_22BA00C1

IvmConfig/IvmConfigCommon.c:166 (ivm_device_is_mountable) UDI /org/freedesktop/Hal/devices/storage_serial_Maxtor_OneTouch_III_22BA00C1 is device /dev/sdc

IvmConfig/IvmConfigCommon.c:186 (ivm_device_is_mountable) Device /dev/sdc can't be mounted because it is not a volume

manager.c:1030 (ivm_media_changed) /org/freedesktop/Hal/devices/storage_serial_Maxtor_OneTouch_III_22BA00C1 wasn't mounted, by us or by others...

IvmConfig/IvmConfigCommon.c:166 (ivm_device_is_mountable) UDI /org/freedesktop/Hal/devices/storage_serial_Maxtor_OneTouch_III_22BA00C1 is device /dev/sdc

IvmConfig/IvmConfigCommon.c:186 (ivm_device_is_mountable) Device /dev/sdc can't be mounted because it is not a volume

hal_interface.c:47 (hal_device_added) New Device: /org/freedesktop/Hal/devices/volume_uuid_4465_CB27

IvmConfig/IvmConfigCommon.c:166 (ivm_device_is_mountable) UDI /org/freedesktop/Hal/devices/volume_uuid_4465_CB27 is device /dev/sdc1

IvmConfig/IvmConfigCommon.c:227 (ivm_device_is_mountable) Device /dev/sdc1 won't be mounted because no mount policy was specified on volume or storage device and storage device does not appear to be removable

manager.c:1030 (ivm_media_changed) /org/freedesktop/Hal/devices/volume_uuid_4465_CB27 wasn't mounted, by us or by others...

IvmConfig/IvmConfigCommon.c:166 (ivm_device_is_mountable) UDI /org/freedesktop/Hal/devices/volume_uuid_4465_CB27 is device /dev/sdc1

IvmConfig/IvmConfigCommon.c:227 (ivm_device_is_mountable) Device /dev/sdc1 won't be mounted because no mount policy was specified on volume or storage device and storage device does not appear to be removable
```

The question is: which information do I need to create an XML-file like in the post above???

Help is as always appreciated  :Wink: 

iced-tux

----------

## Iced-Tux

*bump*

----------

## iulica

Same problem here. Your solution is not usable, I'm not going to add this for each external USB disc I have. The problem (or bug in fact) is that there are two different things: removable and hotpluggable. Ivman seems to mount ONLY the removable ones and NOT the hotpluggable.

Quote from the HAL specification[1]:

storage.removable (bool) 	 	Yes	Media can be removed from the storage device

storage.hotpluggable (bool) 	 	Yes	The storage device can be removed while the system is running

Example of removable devices[2]:

cdrom

USB card readers

USB cdrom

Example of hotpluggable devices:

USB disks and sticks

USB card readers

USB cdrom

As you can see, some of them can be both hotpluggable and removable, such as USB cardreaders and USB cdroms. As a rule, any device that has MEDIA (be it cdrom or flash cards or anything else) is removable. And any device that can be hot plugged ... is hotpluggable  :Smile: .

There are two problems: 

1. USB sticks are INCORRECTLY marked as removable. They should be only hotpluggable.

2. Ivman doesn't seem to look on the hotpluggable property from hal.

I couldn't find a solution yet. 

[1] http://webcvs.freedesktop.org/hal/hal/doc/spec/hal-spec.html?view=co&pathrev=HEAD#device-properties-storage

[2] http://lists.freedesktop.org/archives/hal/2005-October/003441.html

PS: I found a solution to it, by making all hotpluggable mountable by policy. You need to add a file in /etc/hal/fdi/policy as showed in 

http://gentoo-wiki.com/HOWTO_ivman#USB_disks_don.27t_mount

Now everything is ok.Last edited by iulica on Mon Mar 05, 2007 3:25 pm; edited 1 time in total

----------

## Iced-Tux

So whats to do now?

File a bug for ivman?

----------

## iulica

 *Iced-Tux wrote:*   

> So whats to do now?
> 
> File a bug for ivman?

 

I edited my post with a workaround. I have also fixed the code in ivman to handle correctly hotpluggable devices. I'll file the patch to the upstream and also to the gentoo bugzilla.

----------

## Iced-Tux

 :Smile:  Just works  :Wink: 

Thx for the workaround.

----------

## iulica

The workaround is obsolete now, the latest ivman ebuild has the hotpluggable patch. 

You can check it here: 

https://bugs.gentoo.org/show_bug.cgi?id=169593

If you install the latest ivman ebuild, it should work correctly without the policy file described in the wiki page.

Regards

----------

## doublehp

 *iulica wrote:*   

> I'm not going to add this for each external USB disc I have. The problem (or bug in fact) is that there are two different things: removable and hotpluggable. Ivman seems to mount ONLY the removable ones and NOT the hotpluggable.

 

http://www.gentoo-wiki.com/HOWTO_ivman#USB_disks_don.27t_mount claims to be an up-to-date generic solution ... did not test it yet.

Is hal really required ?

----------

## iulica

 *doublehp wrote:*   

>  *iulica wrote:*   I'm not going to add this for each external USB disc I have. The problem (or bug in fact) is that there are two different things: removable and hotpluggable. Ivman seems to mount ONLY the removable ones and NOT the hotpluggable. 
> 
> http://www.gentoo-wiki.com/HOWTO_ivman#USB_disks_don.27t_mount claims to be an up-to-date generic solution ... did not test it yet.
> 
> Is hal really required ?

 

That wiki part was changed by me before my changes to the ivman ebuild were accepted. So the solution is working but not necessary if you update to the latest ivman ebuild. I quote from there "Until ivman is fixed ...". 

However, it seems that ivman is not maintained anymore since my patch submission to the sourceforge project remained unnoticed.

Hal is the foundation of ivman. So yes, it's needed  :Smile: .

----------

