Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Automounting in userspace with ivman
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 27, 28, 29  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
chichibabin
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2004
Posts: 133

PostPosted: Sun Nov 28, 2004 4:57 pm    Post subject: Reply with quote

I'm going to have to apply the supermount patch. Thanks for your help.
Sat
Back to top
View user's profile Send private message
genstef
Retired Dev
Retired Dev


Joined: 13 Jun 2004
Posts: 668
Location: M/Bay/Germany

PostPosted: Sun Nov 28, 2004 5:03 pm    Post subject: Reply with quote

oh, if you want to do something kernel-wise, you can of course try 2.6.10-rc2
The kernel should be better, faster, cooler, less buggy than 2.6.9
Back to top
View user's profile Send private message
peterk0
Apprentice
Apprentice


Joined: 25 Mar 2003
Posts: 188
Location: Prague

PostPosted: Mon Nov 29, 2004 10:21 am    Post subject: Reply with quote

I was wondering if somebody ever successfuly mounted something else then cd, dvd with ivman... I know it officially doesn't support it yet but...

I'm really happy with the functionality so far.
But also need my usb stick mounted... pls LMK
Back to top
View user's profile Send private message
pronvit
n00b
n00b


Joined: 29 Nov 2004
Posts: 2

PostPosted: Mon Nov 29, 2004 12:18 pm    Post subject: Reply with quote

isn't all of this very complex way to do simple things? I have to install 3 additional layers (dbus, hal, ivman) in order to do the same thing as supermount which is (was) just kernel module. as I can see in this thread, ivman doesn't work correctly all the time and why I have to install and have running all the time three additional daemons (what other programs use dbus and hal now?) to get unstable functionality. I mean isn't there some easier way to do this, eg. rewriting supermount but w/o its problems mentioned everywhere?
Back to top
View user's profile Send private message
genstef
Retired Dev
Retired Dev


Joined: 13 Jun 2004
Posts: 668
Location: M/Bay/Germany

PostPosted: Mon Nov 29, 2004 3:38 pm    Post subject: Reply with quote

Supermount is the problem in itself, because it is in the kernel, and we should not put things in the kernel, that can be done in userspace, so its no solution to rewrite it.

And if you think that ivman has problems, then please help us to solve them, thats how open-source works, people see problems and try to solve them and improve the project.
Back to top
View user's profile Send private message
pronvit
n00b
n00b


Joined: 29 Nov 2004
Posts: 2

PostPosted: Mon Nov 29, 2004 4:48 pm    Post subject: Reply with quote

I'm also software developer and I understand that ivman is in development and some problems with them are normal. but from point of end user - supermount doesn't require to install and configure something more than standard system, it does exactly what I want (I don't want autoplay and so on, I even don't want to automount cdrom when it's inserted - I just want to (un)plug and access my USB HDD and change CDs in drive anytime I want w/o executing (u)mount commands and so on) and, also from user's point, supermount does this very well, even if it's very-very bad thing. and now somebody removed it from kernel and says me to install 3 more packages and after this only CDROMs will work.

again, i'm not saying that ivman+... is bad, I just don't see any reason to use it because it doesn't add any more functionality but requires more - maybe I'm missing something?
Back to top
View user's profile Send private message
soya
Guru
Guru


Joined: 29 Jan 2004
Posts: 425

PostPosted: Sat Dec 11, 2004 3:21 pm    Post subject: Reply with quote

yes, i agree, i also think that the fact of having 3 running processes, having to install them and execute at boot time it's a step backwards. Automount when inserted it's ok, but it should have to work also with samba, nfs, usb and it would be ok also if it could umount the media without having to cd out of the directory.
I think that what linux needs is a tool being capable of automount cdroms, dvd, usb, samba shares and also nfs. it should be capable of detect everything when inserted or online (offering you the possibility of accessing to them or not). Also being capable of umount them at any moment (like supermount does). I think it would be a list of minimium requisists, my point is that linux doesn't have to be less than M$ so it should be capable of everything M$ is, and of course in a better way.
_________________
Si el tonto te alaba lamentalo, si el listo te censura piensalo...
Back to top
View user's profile Send private message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Sun Dec 12, 2004 10:37 am    Post subject: Reply with quote

Well, it seems like interest in Ivman has waned a fair bit... but if anyone is interested, I would like to announce that I have added automount support for USB devices to Ivman :D

Anyone who wants Ivman to automatically mount their USB disks, please go here and try it out. It works perfectly for me, but I'd like to get some feedback.

Hopefully this will encourage more people away from that dreaded 'supermount' thing :-)
Back to top
View user's profile Send private message
Dodgeram01
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2003
Posts: 80
Location: Ville Full of HICKS, USA

PostPosted: Mon Dec 13, 2004 2:23 am    Post subject: Reply with quote

Are there any additional configuration settings one must perform for automounting a usb-storage device which is known as /dev/camera after having installed your ebuilds rohan28? When I run ivman manually and turn my camera on, ivman doesn't seem to catch it.
_________________
Dodge.
Grab Life By The Horns.
Back to top
View user's profile Send private message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Mon Dec 13, 2004 3:33 am    Post subject: Reply with quote

There should be no extra options to be applied, but I've only tested it with USB sticks so far. When you plug in your camera, does an entry appear for it in /etc/fstab? If not, then this is an issue with HAL, not with Ivman. If it does appear in /etc/fstab, but doesn't automount, then please send me a copy of the output of 'lshal' and I'll try to code support for it.

By the way, just to be absolutely sure... you can see this camera as a drive in Windows, right? I don't want to waste time trying to do something that can't be done :-)
Back to top
View user's profile Send private message
hoeeg
n00b
n00b


Joined: 04 Jul 2002
Posts: 26
Location: Denmark

PostPosted: Mon Dec 13, 2004 9:19 pm    Post subject: Reply with quote

rohan28 wrote:
Well, it seems like interest in Ivman has waned a fair bit... but if anyone is interested, I would like to announce that I have added automount support for USB devices to Ivman :D

Anyone who wants Ivman to automatically mount their USB disks, please go here and try it out. It works perfectly for me, but I'd like to get some feedback.

Hopefully this will encourage more people away from that dreaded 'supermount' thing :-)


Its only after reading trough this long thread that i realise that maybe installing ivman was a dead-end.
I will give it another chance and try out your patch.
Back to top
View user's profile Send private message
genstef
Retired Dev
Retired Dev


Joined: 13 Jun 2004
Posts: 668
Location: M/Bay/Germany

PostPosted: Mon Dec 13, 2004 10:02 pm    Post subject: Reply with quote

Here is a new ebuild for portage to include it:
http://dev.gentoo.org/~genstef/files/ivman-0.3-r1.ebuild
(you need the ./files from /usr/portage/sys-apps/ivman/files when you place it in your overlay)

Thank you rohan28, it works great, and it is really a big step :)
But I think there is no need for cvs ebuilds here, which are not in portage.
Back to top
View user's profile Send private message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Tue Dec 14, 2004 2:24 am    Post subject: Reply with quote

genstef wrote:
Here is a new ebuild for portage to include it:
http://dev.gentoo.org/~genstef/files/ivman-0.3-r1.ebuild
...


Thank you for that, genstef... I do not have much experience with ebuilds, I'm not really sure of the best way to do things (as is evidenced by the hackiness of the ebuild I wrote :-))

Ikke has graciously given me CVS access to the project, so with any luck I'll get the USB code integrated in the main trunk soon...
Back to top
View user's profile Send private message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Tue Dec 14, 2004 6:24 am    Post subject: Reply with quote

OK, just for everyone's info, USB support is now in the CVS code available from sourceforge - http://sourceforge.net/projects/ivman. Gentoo users will probably be able to simply emerge a new version with USB support soon, without messing with overlays and such :-)
Back to top
View user's profile Send private message
Tanisete
Guru
Guru


Joined: 12 Mar 2004
Posts: 312

PostPosted: Tue Dec 14, 2004 10:18 pm    Post subject: Reply with quote

Hi to all!!

I've emerged ivman with the new usb support... but for me it doesn't work (with an usb hard disk)... this is the log from ivman:

Code:

hal_interface.c:42 (hal_device_added) New Device: /org/freedesktop/Hal/devices/usb_device_59f_351_0_-1_10000E0003C809D7
libhal.c 911 : Error sending msg: No property info.capabilities on device with id /org/freedesktop/Hal/devices/usb_device_59f_351_0_-1_10000E0003C809D7
hal_interface.c:42 (hal_device_added) New Device: /org/freedesktop/Hal/devices/usb_usb_device_59f_351_0_-1_10000E0003C809D7_0
libhal.c 911 : Error sending msg: No property info.capabilities on device with id /org/freedesktop/Hal/devices/usb_usb_device_59f_351_0_-1_10000E0003C809D7_0
hal_interface.c:42 (hal_device_added) New Device: /org/freedesktop/Hal/devices/scsi_host_1
hal_interface.c:42 (hal_device_added) New Device: /org/freedesktop/Hal/devices/scsi_1_0_0_0
hal_interface.c:42 (hal_device_added) New Device: /org/freedesktop/Hal/devices/block_8_0
hal_interface.c:42 (hal_device_added) New Device: /org/freedesktop/Hal/devices/block_6853-5BA9
hal_interface.c:86 (hal_device_added) Added: /dev/sda1
hal_interface.c:42 (hal_device_added) New Device: /org/freedesktop/Hal/devices/block_8_2
hal_interface.c:86 (hal_device_added) Added: /dev/sda2
hal_interface.c:42 (hal_device_added) New Device: /org/freedesktop/Hal/devices/block_8_5
hal_interface.c:86 (hal_device_added) Added: /dev/sda5


What can be happening??

In fact... why hal doesn't look for /dev/usb2? because udev was supposed to solve that... and i have a rule for this usb device that works manually mounting it...

With a usb stick, happens a different thing. The device is tried to be mounted, but it doesn't use udev rules!!

Code:


manager.c:254 (ivm_media_changed) Device appears to be volume on USB disk
manager.c:188 (ivm_cdrom_policy) In cdrom_policy
libhal.c 1205 : Error sending msg: No property volume.disc.has_audio on device with id /org/freedesktop/Hal/devices/block_8_5
libhal.c 1205 : Error sending msg: No property volume.disc.has_data on device with id /org/freedesktop/Hal/devices/block_8_5
manager.c:210 (ivm_cdrom_policy) Device: /dev/sda5
manager.c:223 (ivm_cdrom_policy) It's data on USB
IvmConfigActions.c:214 (get_actions) Nodeset is null
manager.c:150 (ivm_device_mount) Mounting /dev/sda5
mount: no se puede encontrar /dev/sda5 en /etc/fstab o /etc/mtab



Talking about other topic... I've been using ivman and i have to say that for an average user... it works great!!

Thanks a lot for all the help!!
Back to top
View user's profile Send private message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Tue Dec 14, 2004 10:55 pm    Post subject: Reply with quote

Tanisete wrote:
Hi to all!!

I've emerged ivman with the new usb support... but for me it doesn't work (with an usb hard disk)... this is the log from ivman:
...


Could you also post the output of 'lshal' with the device attached, please?

Tanisete wrote:

...
With a usb stick, happens a different thing. The device is tried to be mounted, but it doesn't use udev rules!!
...


OK... you told udev to name it /dev/usb2, right? So when you plug the drive in, does an entry appear for /dev/usb2 in fstab? I'm not sure of all the details of how HAL works, but Ivman just uses the device string passed to it by HAL, so maybe HAL is reporting the wrong string?

I'll try duplicating this on my machine...

By the way, Ivman with USB support is now in official portage, so no more messing with overlays... :-)
Back to top
View user's profile Send private message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Tue Dec 14, 2004 11:38 pm    Post subject: Reply with quote

Using UDEV rules to rename the device seems to work fine for me. The following two rules in /etc/udev/rules.d/50-udev.rules both worked (only one at a time, of course :-)):

Code:

# name USB disk /dev/usb, but only one can be plugged at a time
BUS="usb", KERNEL="sd*", NAME="usb%n"

# name USB disk /dev/usb/sda etc
BUS="usb", KERNEL="sd*", NAME="usb/%k"


When using either of these rules, the entries get put into fstab and Ivman mounts them successfully.

Maybe your UDEV rules are matching the device itself, but not the volumes on it? Are you using UDEV-045 and HAL-0.4.2?
Back to top
View user's profile Send private message
yanos
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2003
Posts: 149
Location: montreal, canada

PostPosted: Wed Dec 15, 2004 5:58 am    Post subject: Reply with quote

Well, for me it works partially: the usb stick mounts fine, but then only root gets to see the files. The entry created in fstab looks like this:
Code:

/dev/sda                /media/usbdisk1         vfat    noauto,user,exec,noatime,sync 0 0

ls -l of /media gives:
Code:

drwxr-xr-x  2 root       root        48 Nov 28 18:59 cdrw
dr-xr-xr-x  4 4294967295 4294967295 136 Mar 28  2001 dvdrom
drwxr-xr-x  2 root       root        48 Nov 28 18:59 floppy
drwxr-xr-x  2 root       root        48 Nov 28 18:59 idedisk
drwxr-xr-x  2 root       root        48 Dec  1 18:44 usbdisk
drwxr--r--  4 root       root       22K Dec 31  1969 usbdisk1

the weird thing is the 'last modified' field in konqueror doesn't show anything. I Don't know why I have both a usbstick and a usbstick1 directory.

On a related note, should I remove my fstab entries for my removable medias (the one that i've put myself, when I wasn't using udev and friends)?
Back to top
View user's profile Send private message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Wed Dec 15, 2004 9:12 am    Post subject: Reply with quote

The permissions on mounted volumes are handled by HAL. Since the Ivman process runs as root (which is the only sensible way to have it running for a multi-user system), any volumes will be mounted as root, and by default not accessible by other users (I guess... it might be different for different systems).

If you copy the file /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi to /usr/share/hal/fdi/95userpolicy/storage-policy.fdi, then add this line within the block of similar lines (near the top):

Code:

<merge key="storage.policy.default.mount_option.umask=0000" type="bool">true</merge>


...then the mount option of 'umask=0000' will be applied to new entries in fstab, giving everyone access to the filesystem. This is a somewhat hacky solution, since not all filesystems even support the 'umask' option; in future it might be a good idea to implement customisable mount options for certain filesystems or even for unique devices (so, for instance, you could configure your particular USB drive to always be mounted with write permissions only for you, while other USB drives would be mounted r/w for everyone... sounds like a good idea to me :-))

The /media/usbdisk directory is probably left over from hald crashing or otherwise failing to remove it (HAL is in full control over the generation of mount points, Ivman has nothing to do with it). Just remove the usbdisk directory, and the next time you plug a USB drive, that's the directory that hopefully will be used.

With regards to fstab entries... for drives which are not always there (like USB drives), you don't want to have an fstab entry. For drives which are always there but don't always have media (like CD drives), have a normal fstab entry (i.e. no supermount or autofs tricks) and make sure 'noauto' is an option (so the drive isn't automatically mounted at boot).

Hope this solves your problems :-)

(by the way, I can't help wondering what the deal is with your /media/dvdrom directory, why is it apparently owned by user with UID -1?)
Back to top
View user's profile Send private message
hoeeg
n00b
n00b


Joined: 04 Jul 2002
Posts: 26
Location: Denmark

PostPosted: Wed Dec 15, 2004 4:55 pm    Post subject: Reply with quote

Hi

I emerged ivman-0.3-r1 but it does'nt mount my usbdisk.
It turns up in fstab when plugged in.
Code:

/dev/sdb1               /media/usbdisk          ext3    exec,user,noauto,managed 0 0
/dev/sdb5               /media/_XTERNALDOS      vfat    exec,user,noauto,managed 0 0


Here is the log.
Code:

Dec 15 17:40:27 charon usb 1-2: new high speed USB device using address 7
Dec 15 17:40:27 charon scsi4 : SCSI emulation for USB Mass Storage devices
Dec 15 17:40:27 charon Vendor: USB 2.0   Model: Storage Device    Rev: 0100
Dec 15 17:40:27 charon Type:   Direct-Access                      ANSI SCSI revision: 02
Dec 15 17:40:27 charon SCSI device sdb: 312581808 512-byte hdwr sectors (160042 MB)
Dec 15 17:40:27 charon sdb: assuming drive cache: write through
Dec 15 17:40:27 charon /dev/scsi/host4/bus0/target0/lun0: p1 p2 < p5 >
Dec 15 17:40:27 charon Attached scsi disk sdb at scsi4, channel 0, id 0, lun 0
Dec 15 17:40:27 charon USB Mass Storage device found at 7
Dec 15 17:40:27 charon scsi.agent[12514]: disk at /devices/pci0000:00/0000:00:10.4/usb1/1-2/1-2:1.0/host4/4:0:0:0
Dec 15 17:40:28 charon ivman: New Device: /org/freedesktop/Hal/devices/usb_device_840_80_1_-1_0000100010000000A53E
Dec 15 17:40:28 charon ivman: New Device: /org/freedesktop/Hal/devices/usb_usb_device_840_80_1_-1_0000100010000000A53E_0
Dec 15 17:40:28 charon ivman: New Device: /org/freedesktop/Hal/devices/scsi_host_4
Dec 15 17:40:28 charon ivman: New Device: /org/freedesktop/Hal/devices/scsi_4_0_0_0
Dec 15 17:40:28 charon ivman: New Device: /org/freedesktop/Hal/devices/block_8_16
Dec 15 17:40:28 charon fstab-sync[12576]: added mount point /media/usbdisk for /dev/sdb1
Dec 15 17:40:29 charon ivman: New Device: /org/freedesktop/Hal/devices/block_c1a18590-6e62-4875-aeb4-09ada08e2917
Dec 15 17:40:29 charon ivman: Added: /dev/sdb1
Dec 15 17:40:29 charon ivman: New Device: /org/freedesktop/Hal/devices/block_8_18
Dec 15 17:40:29 charon ivman: Added: /dev/sdb2
Dec 15 17:40:29 charon fstab-sync[12580]: added mount point /media/_XTERNALDOS for /dev/sdb5
Dec 15 17:40:30 charon ivman: New Device: /org/freedesktop/Hal/devices/block_BA48-6399
Dec 15 17:40:30 charon ivman: Added: /dev/sdb5


From IvmConfigMappings.xml
Code:

    <ivm:Map device="/dev/hda" maps="/media/cdrecorder" />
    <ivm:Map device="/dev/hdb" maps="/media/cdrom" />
    <ivm:Map device="/dev/sdb1" maps="/media/usbdisk" />
    <ivm:Map device="/dev/sdb5" maps="/media/_XTERNALDOS" />


My dvd-recorder on /dev/hda gets mounted just fine.
Back to top
View user's profile Send private message
yanos
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2003
Posts: 149
Location: montreal, canada

PostPosted: Wed Dec 15, 2004 5:59 pm    Post subject: Reply with quote

Quote:

Since the Ivman process runs as root (which is the only sensible way to have it running for a multi-user system), any volumes will be mounted as root, and by default not accessible by other users


This is why it bugs me. Users can access the dvd but not the usbstick. It would have been more logical if all users either had access to everything or anything.

Quote:

If you copy the file /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi to /usr/share/hal/fdi/95userpolicy/storage-policy.fdi...


I don't have such files:

Code:

[root] ~ # ll /usr/share/hal/fdi/
total 8.0K
drwxr-xr-x  2 root root   48 Oct 12 11:09 10generic
drwxr-xr-x  2 root root  264 Oct 12 11:09 20freedesktop
-rw-r--r--  1 root root  603 Oct 12 11:09 fdi.dtd
-rw-r--r--  1 root root 1.6K Oct 12 11:09 fdi.rng


Quote:

by the way, I can't help wondering what the deal is with your /media/dvdrom directory, why is it apparently owned by user with UID -1?


Beats me, it's like that when there is a dvd in the drive. Thanks for the help!
Back to top
View user's profile Send private message
Tanisete
Guru
Guru


Joined: 12 Mar 2004
Posts: 312

PostPosted: Wed Dec 15, 2004 7:56 pm    Post subject: Reply with quote

I'm using hal 0.4.1 and udev-045.

The lshal output that is related to the usb hard disk is this:

Code:

udi = '/org/freedesktop/Hal/devices/block_8_5'
  volume.mount_point = ''  (string)
  volume.policy.desired_mount_point = 'usbdisk'  (string)
  volume.policy.mount_filesystem = 'ext3'  (string)
  volume.policy.should_mount = true  (bool)
  info.udi = '/org/freedesktop/Hal/devices/block_8_5'  (string)
  volume.partition.msdos_part_table_type = 131  (0x83)  (int)
  volume.size = 78682996224  (0x1251df3e00)  (uint64)
  volume.block_size = 512  (0x200)  (int)
  volume.num_blocks = 153677727  (0x928ef9f)  (int)
  volume.partition.number = 5  (0x5)  (int)
  volume.is_partition = true  (bool)
  volume.is_mounted = false  (bool)
  volume.is_disc = false  (bool)
  volume.uuid = ''  (string)
  volume.label = ''  (string)
  volume.fsversion = ''  (string)
  volume.fsusage = 'filesystem'  (string)
  volume.fstype = 'ext3'  (string)
  info.product = 'Volume (ext3)'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.minor = 5  (0x5)  (int)
  block.major = 8  (0x8)  (int)
  info.capabilities = 'block volume'  (string)
  info.category = 'volume'  (string)
  info.parent = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.device = '/dev/sda5'  (string)
  block.is_volume = true  (bool)
  block.have_scanned = false  (bool)
  block.no_partitions = false  (bool)
  linux.sysfs_path_device = '/sys/block/sda/sda5'  (string)
  linux.sysfs_path = '/sys/block/sda/sda5'  (string)
  info.bus = 'block'  (string)

udi = '/org/freedesktop/Hal/devices/block_8_2'
  volume.mount_point = ''  (string)
  info.udi = '/org/freedesktop/Hal/devices/block_8_2'  (string)
  volume.partition.msdos_part_table_type = 15  (0xf)  (int)
  volume.size = 1024  (0x400)  (uint64)
  volume.block_size = 512  (0x200)  (int)
  volume.num_blocks = 2  (0x2)  (int)
  volume.partition.number = 2  (0x2)  (int)
  volume.is_partition = true  (bool)
  volume.is_mounted = false  (bool)
  volume.is_disc = false  (bool)
  volume.uuid = ''  (string)
  volume.label = ''  (string)
  volume.fsversion = ''  (string)
  volume.fsusage = 'partitiontable'  (string)
  volume.fstype = 'msdos_partition_table'  (string)
  info.product = 'Volume (msdos_partition_table)'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.minor = 2  (0x2)  (int)
  block.major = 8  (0x8)  (int)
  info.capabilities = 'block volume'  (string)
  info.category = 'volume'  (string)
  info.parent = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.device = '/dev/sda2'  (string)
  block.is_volume = true  (bool)
  block.have_scanned = false  (bool)
  block.no_partitions = false  (bool)
  linux.sysfs_path_device = '/sys/block/sda/sda2'  (string)
  linux.sysfs_path = '/sys/block/sda/sda2'  (string)
  info.bus = 'block'  (string)

udi = '/org/freedesktop/Hal/devices/block_6853-5BA9'
  volume.mount_point = ''  (string)
  volume.policy.desired_mount_point = 'usbdisk'  (string)
  volume.policy.mount_filesystem = 'vfat'  (string)
  volume.policy.should_mount = true  (bool)
  info.udi = '/org/freedesktop/Hal/devices/block_6853-5BA9'  (string)
  volume.partition.msdos_part_table_type = 12  (0xc)  (int)
  volume.size = 81356212224  (0x12f1354800)  (uint64)
  volume.block_size = 512  (0x200)  (int)
  volume.num_blocks = 158898852  (0x9789aa4)  (int)
  volume.partition.number = 1  (0x1)  (int)
  volume.is_partition = true  (bool)
  volume.is_mounted = false  (bool)
  volume.is_disc = false  (bool)
  volume.uuid = '6853-5BA9'  (string)
  volume.label = ''  (string)
  volume.fsversion = 'FAT32'  (string)
  volume.fsusage = 'filesystem'  (string)
  volume.fstype = 'vfat'  (string)
  info.product = 'Volume (vfat)'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.minor = 1  (0x1)  (int)
  block.major = 8  (0x8)  (int)
  info.capabilities = 'block volume'  (string)
  info.category = 'volume'  (string)
  info.parent = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.device = '/dev/sda1'  (string)
  block.is_volume = true  (bool)
  block.have_scanned = false  (bool)
  block.no_partitions = false  (bool)
  linux.sysfs_path_device = '/sys/block/sda/sda1'  (string)
  linux.sysfs_path = '/sys/block/sda/sda1'  (string)
  info.bus = 'block'  (string)

udi = '/org/freedesktop/Hal/devices/block_8_0'
  volume.is_partition = false  (bool)
  storage.policy.should_mount = true  (bool)
  info.udi = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  storage.requires_eject = false  (bool)
  storage.hotpluggable = true  (bool)
  storage.removable = false  (bool)
  info.product = 'WD1600BB-00FTA0'  (string)
  info.vendor = 'WDC'  (string)
  storage.drive_type = 'disk'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  storage.physical_device = '/org/freedesktop/Hal/devices/usb_usb_device_59f_351_0_-1_10000E0003C809D7_0'  (string)
  storage.vendor = 'WDC'  (string)
  storage.model = 'WD1600BB-00FTA0'  (string)
  storage.automount_enabled_hint = true  (bool)
  storage.no_partitions_hint = false  (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)
  block.device = '/dev/sda'  (string)
  info.parent = '/org/freedesktop/Hal/devices/scsi_0_0_0_0'  (string)
  block.is_volume = false  (bool)
  block.have_scanned = true  (bool)
  block.no_partitions = false  (bool)
  linux.sysfs_path_device = '/sys/block/sda'  (string)
  linux.sysfs_path = '/sys/block/sda'  (string)
  info.bus = 'block'  (string)


The output of lshal for the usbstick is:

Code:

udi = '/org/freedesktop/Hal/devices/block_8_5'
  volume.mount_point = ''  (string)
  volume.policy.mount_option.noatime = true  (bool)
  volume.policy.mount_option.sync = true  (bool)
  volume.policy.desired_mount_point = 'usbdisk'  (string)
  volume.policy.mount_filesystem = 'vfat'  (string)
  volume.policy.should_mount = true  (bool)
  info.udi = '/org/freedesktop/Hal/devices/block_8_5'  (string)
  volume.partition.msdos_part_table_type = 131  (0x83)  (int)
  volume.size = 130777088  (0x7cb8000)  (uint64)
  volume.block_size = 512  (0x200)  (int)
  volume.num_blocks = 255424  (0x3e5c0)  (int)
  volume.partition.number = 5  (0x5)  (int)
  volume.is_partition = true  (bool)
  volume.is_mounted = false  (bool)
  volume.is_disc = false  (bool)
  volume.uuid = ''  (string)
  volume.label = ''  (string)
  volume.fsversion = 'FAT32'  (string)
  volume.fsusage = 'filesystem'  (string)
  volume.fstype = 'vfat'  (string)
  info.product = 'Volume (vfat)'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.minor = 5  (0x5)  (int)
  block.major = 8  (0x8)  (int)
  info.capabilities = 'block volume'  (string)
  info.category = 'volume'  (string)
  info.parent = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.device = '/dev/sda5'  (string)
  block.is_volume = true  (bool)
  block.have_scanned = false  (bool)
  block.no_partitions = false  (bool)
  linux.sysfs_path_device = '/sys/block/sda/sda5'  (string)
  linux.sysfs_path = '/sys/block/sda/sda5'  (string)
  info.bus = 'block'  (string)

udi = '/org/freedesktop/Hal/devices/block_8_2'
  volume.mount_point = ''  (string)
  info.udi = '/org/freedesktop/Hal/devices/block_8_2'  (string)
  volume.partition.msdos_part_table_type = 5  (0x5)  (int)
  volume.size = 1024  (0x400)  (uint64)
  volume.block_size = 512  (0x200)  (int)
  volume.num_blocks = 2  (0x2)  (int)
  volume.partition.number = 2  (0x2)  (int)
  volume.is_partition = true  (bool)
  volume.is_mounted = false  (bool)
  volume.is_disc = false  (bool)
  volume.uuid = ''  (string)
  volume.label = ''  (string)
  volume.fsversion = ''  (string)
  volume.fsusage = 'partitiontable'  (string)
  volume.fstype = 'msdos_partition_table'  (string)
  info.product = 'Volume (msdos_partition_table)'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.minor = 2  (0x2)  (int)
  block.major = 8  (0x8)  (int)
  info.capabilities = 'block volume'  (string)
  info.category = 'volume'  (string)
  info.parent = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.device = '/dev/sda2'  (string)
  block.is_volume = true  (bool)
  block.have_scanned = false  (bool)
  block.no_partitions = false  (bool)
  linux.sysfs_path_device = '/sys/block/sda/sda2'  (string)
  linux.sysfs_path = '/sys/block/sda/sda2'  (string)
  info.bus = 'block'  (string)

udi = '/org/freedesktop/Hal/devices/block_8_1'
  volume.mount_point = ''  (string)
  volume.policy.mount_option.noatime = true  (bool)
  volume.policy.mount_option.sync = true  (bool)
  volume.policy.desired_mount_point = 'usbdisk'  (string)
  volume.policy.mount_filesystem = 'vfat'  (string)
  volume.policy.should_mount = true  (bool)
  info.udi = '/org/freedesktop/Hal/devices/block_8_1'  (string)
  volume.partition.msdos_part_table_type = 11  (0xb)  (int)
  volume.size = 130777088  (0x7cb8000)  (uint64)
  volume.block_size = 512  (0x200)  (int)
  volume.num_blocks = 255424  (0x3e5c0)  (int)
  volume.partition.number = 1  (0x1)  (int)
  volume.is_partition = true  (bool)
  volume.is_mounted = false  (bool)
  volume.is_disc = false  (bool)
  volume.uuid = ''  (string)
  volume.label = ''  (string)
  volume.fsversion = 'FAT32'  (string)
  volume.fsusage = 'filesystem'  (string)
  volume.fstype = 'vfat'  (string)
  info.product = 'Volume (vfat)'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.minor = 1  (0x1)  (int)
  block.major = 8  (0x8)  (int)
  info.capabilities = 'block volume'  (string)
  info.category = 'volume'  (string)
  info.parent = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.device = '/dev/sda1'  (string)
  block.is_volume = true  (bool)
  block.have_scanned = false  (bool)
  block.no_partitions = false  (bool)
  linux.sysfs_path_device = '/sys/block/sda/sda1'  (string)
  linux.sysfs_path = '/sys/block/sda/sda1'  (string)
  info.bus = 'block'  (string)

udi = '/org/freedesktop/Hal/devices/block_8_0'
  volume.is_partition = false  (bool)
  storage.policy.should_mount = true  (bool)
  info.udi = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  storage.requires_eject = false  (bool)
  storage.hotpluggable = true  (bool)
  storage.removable = true  (bool)
  info.product = 'BAR'  (string)
  info.vendor = 'USB'  (string)
  storage.drive_type = 'disk'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  storage.physical_device = '/org/freedesktop/Hal/devices/usb_usb_device_ea0_2168_200_-1_noserial_0'  (string)
  storage.vendor = 'USB'  (string)
  storage.model = 'BAR'  (string)
  storage.automount_enabled_hint = true  (bool)
  storage.no_partitions_hint = false  (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_1_0_0_0'  (string)
  block.device = '/dev/sda'  (string)
  block.is_volume = false  (bool)
  block.have_scanned = true  (bool)
  block.no_partitions = false  (bool)
  linux.sysfs_path_device = '/sys/block/sda'  (string)
  linux.sysfs_path = '/sys/block/sda'  (string)
  info.bus = 'block'  (string)



Also, these are the rules i use for udev:

Code:
BUS="usb", KERNEL="sd*", SYSFS{product}="Flash Disk      ",  NAME="%k", SYMLINK="usbbar%n"

BUS="usb", KERNEL="sd*", SYSFS{product}="LaCie Hard Drive USB",  NAME="%k", SYMLINK="usbhd%n"


Thanks a lot for the patch and all the help rohan!!
Back to top
View user's profile Send private message
Tanisete
Guru
Guru


Joined: 12 Mar 2004
Posts: 312

PostPosted: Wed Dec 15, 2004 8:14 pm    Post subject: Reply with quote

Ok, now my usbbar is working (I have to follow the recomendation of wiritng umask=0000 option in fstab).

But for the hard drive usb disk, the problem remains the same. The ivman output is the same from above. Do you know what can be happening? I use this disk a lot, and it would be great that it could be automounted!

Thanks a lot for the patience!!
Back to top
View user's profile Send private message
rohan28
Tux's lil' helper
Tux's lil' helper


Joined: 12 Dec 2004
Posts: 84
Location: Australia

PostPosted: Wed Dec 15, 2004 11:21 pm    Post subject: Reply with quote

Tanisete and hoeeg - your USB hard disks aren't mounting because Ivman checks for USB volumes by looking at the info.bus property of the parent device (e.g. for /dev/sda2 it looks at /dev/sda). It expects to get 'usb', but apparently USB hard disks don't set info.bus = 'usb'? (USB sticks do.) As of yesterday, in the CVS version of Ivman, the new behaviour is to try to mount absolutely anything for which volume.policy.should_mount = true or for which storage.policy.should_mount = true on the parent device, which works with everything I've seen so far. This is a much better way of doing things... of course, CVS isn't really acceptable, so a proper release will hopefully be made within a week :-)

Tanisete - your UDEV rules don't seem to be working at all! Are you sure there's a SYSFS{product} value? There isn't for any devices on my system. To see valid values which can be used with SYSFS{} in UDEV rules, look at the files in /sys/block/sda/device (substituting sda with whatever the actual device is, of course). 'vendor' and 'model' are good candidates for what you want.

Hoeeg - you don't need those lines in IvmConfigMapping.xml (although they won't break anything). This file is used for situations where you want to use an existing fstab entry which specifies a symlink; e.g. if you had an fstab entry set up for /dev/cdrom, which was a symlink to /dev/hdc, then you'd put
Code:
<ivm:Map device="/dev/hdc" maps="/dev/cdrom" />
to make sure that when Ivman gets passed the device /dev/hdc, it uses the fstab entry for /dev/cdrom. These files will be better documented eventually!

Yanos - try updating to HAL 0.4.2 if it's not too much trouble (it doesn't take too long to compile). Then follow the previous instructions. Alternatively, as a work-around, you can put your own entry into fstab for /dev/sda with the option umask=0000, but then if the device ever gets a name besides /dev/sda it will not work. I agree, the default settings for HAL are somewhat odd :-) In the future, Ivman will support adding extra mount options, with some good defaults being set - the goal is to eventually make it work fine with everything out-of-the-box.
Back to top
View user's profile Send private message
yanos
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2003
Posts: 149
Location: montreal, canada

PostPosted: Thu Dec 16, 2004 1:07 am    Post subject: Reply with quote

ok, I upgrade to 0.4.2 and did the umask thingy. Now, I can see the files on my usb stick as a normal user but I couldn't unmount the device. I change 'storage.policy.default.mount_option.user' to 'storage.policy.default.mount_option.users' and the 'storage.policy.default.mount_option.exec' directive to 'storage.policy.default.mount_option.noexec' (those two options are mutually exclusive, I think) and everything works great now!

Only remaining problem with hal/ivman is that I can't eject audio cd or dvd movie by pressing on the eject button of the drive. I have to 'eject /dev/hdd' or to unmount it as root to eject the media. And where can I tell ivman witch app I want to start when inserting an dvd? Right now it starts mplayer but it doesn't support dvd navigation so I want to change for xine or ogle.

thank you again for all the help!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 27, 28, 29  Next
Page 14 of 29

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum