KDE Volume Manager not receiving mount points from HAL - it can't cope!

Luke Kenneth Casson Leighton lkcl at lkcl.net
Mon Sep 20 18:34:03 PDT 2004


On Tue, Sep 21, 2004 at 01:54:16AM +0100, Luke Kenneth Casson Leighton wrote:

> > > This hal device object is a child of the hal
> > > device object representing the drive itself. It works just like when
> > > using partitioned media, e.g. /dev/sdb and /dev/sdb1 on a memory card.
> > > One of the points of hal is to abstract the difference between
> > > partitioned and non-partitioned media; e.g. provide an abstraction with
> > > drives and volumes instead.
> > > 
> > > So, when you mount the volume using mount(1), e.g. 'mount /dev/sda' from
> > > the commandline or from a program like KVM (since an entry
> > > relating /dev/sda and /media/floppy1 is already in /etc/fstab file this
> > > is possible), 
> 
>  okay, i think i might have tracked down what the problem is.
> 
>  notice in the above that :
> > 	  storage.removable = false  (bool)
> 
>  ah... it's a usb floppy.              "/proc/scsi/usb-storage/%d"
>  from block_class.c says it's one of those
>  "Protocol: Uniform Floppy Interface (UFI)" things.
> 
>  so has_removable_media will get set to TRUE.
> 
>  ... only to have it set to FALSE because there's no entry
>  /sys/block/sdb/removable in order to be read.
> 
>  ah... um... what gives?

 okay, got it.

 by forcing the setting of storage.removable, the device comes up
 as "USB-FDU", under file:/media/floppy3 - no floppy:/ involved
 whatsoever, this might be because of my hacking in KVM...
 
 KDE on startup automatically forces the mounting of the damn thing
 (which i'm not happy about, let's try removing the floppy to make that
  fail, see what happenss...)

 okay, startup with usb floppy unplugged, with no media:

 * KVM determines that it's a floppy, and plugs in floppy:/

 * HAL behaves correctly.

 i put the floppy into the drive:

 * HAL goes off and does some whizzy stuff!  whoo hoo!

 * KVM throws up some funny little window thing saying something
   about the device having to be unmounted before removal (which
   no sane user is ever going to do, but that's another story).
 
 * df shows that it's not actually mounted... ten seconds later it
   is...

 * konqueror works: clicking on USB-FDU is all hunky-dory.

 * but clicking on Floppy brings up a device error.

 unplugging the floppy:

 * the device disappears (both Floppy and USB-FDU)

 * df shows it's unmounted.


 the only bit that's weird - and probably my own fault - is that
 uhm... KVM shows an entry for "floppy" _and_ an entry for "USB-FDU".

 is _this_ what you were referring to about "volumes"?

 namely that even a floppy can contain volumes and should not be
 treated differently from other storage devices (which at present
 it looks like it is: in KVM there is no link from the
 usb floppy device block_8_0 to the volume).



Dumping 39 device(s) from the Global Device List:
-------------------------------------------------
udi = '/org/freedesktop/Hal/devices/block_4145-AD66'
  info.udi = '/org/freedesktop/Hal/devices/block_4145-AD66'  (string)
  volume.block_size = 512  (0x200)  (int)
  volume.num_blocks = 2880  (0xb40)  (int)
  volume.is_disc = false  (bool)
  volume.is_mounted = true  (bool)
  volume.mount_point = '/media/floppy3'  (string)
  volume.label = ''  (string)
  volume.uuid = '4145-AD66'  (string)
  volume.fsversion = 'FAT12'  (string)
  volume.fsusage = 'filesystem'  (string)
  volume.fstype = 'vfat'  (string)
  info.product = 'Volume (vfat)'  (string)
  info.parent = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  info.category = 'volume'  (string)
  info.capabilities = 'block volume'  (string)
  info.bus = 'block'  (string)
  block.no_partitions = true  (bool)
  block.have_scanned = false  (bool)
  block.is_volume = true  (bool)
  block.device = '/dev/sda'  (string)
  block.major = 8  (0x8)  (int)
  block.minor = 0  (0x0)  (int)
  block.storage_device = '/org/freedesktop/Hal/devices/block_8_0'  (string)

udi = '/org/freedesktop/Hal/devices/block_8_0'
  info.udi = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  storage.hotpluggable = true  (bool)
  storage.removable = true  (bool)
  info.product = 'USB-FDU'  (string)
  info.vendor = 'Y-E DATA'  (string)
  storage.drive_type = 'floppy'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  storage.physical_device = '/org/freedesktop/Hal/devices/usb_usb_device_57b_0_501_-1_noserial_0'  (string)
  storage.vendor = 'Y-E DATA'  (string)
  storage.model = 'USB-FDU'  (string)
  storage.automount_enabled_hint = true  (bool)
  storage.no_partitions_hint = true  (bool)
  storage.media_check_enabled = true  (bool)
  storage.bus = 'usb'  (string)
  block.minor = 0  (0x0)  (int)
  block.major = 8  (0x8)  (int)
  info.capabilities = 'block storage'  (string)
  info.category = 'storage'  (string)
  info.parent = '/org/freedesktop/Hal/devices/scsi_16_0_0_0'  (string)
  block.device = '/dev/sda'  (string)
  block.is_volume = false  (bool)
  block.have_scanned = true  (bool)
  block.no_partitions = true  (bool)
  linux.sysfs_path_device = '/sys/block/sda'  (string)
  linux.sysfs_path = '/sys/block/sda'  (string)
  info.bus = 'block'  (string)

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list