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 ... 23, 24, 25 ... 27, 28, 29  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Mad_Dude
n00b
n00b


Joined: 18 Oct 2004
Posts: 68
Location: Singapore / Ang Mo Kio

PostPosted: Thu Mar 24, 2005 9:48 am    Post subject: Reply with quote

I also change 0007 to 0777 in IVMCONFIGACTIONS

Code:

    <ivm:Match name="hal.volume.fstype" value="vfat">
        <ivm:Option name="mountoption" value="umask=0777" />


I've also added the user to the USB group.

Just to add, I've also partition the USB drive and set it to an active partition and bios emulated it as SCSI.
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Thu Mar 24, 2005 12:44 pm    Post subject: Reply with quote

well I dunno the file you copied and editted is correct.. can you change the other options you did?

and yes, you have no entry under fstab - it is created on the fly.

not sure I can help much :?
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
Mad_Dude
n00b
n00b


Joined: 18 Oct 2004
Posts: 68
Location: Singapore / Ang Mo Kio

PostPosted: Fri Mar 25, 2005 2:09 am    Post subject: Reply with quote

I edited the file under /usr/share/hal/fdi/95userpolicy/storage-policy.fdi. Think I'll try editing the one under 90userpolicy? What does hal work by having a 90/95 userpolicy?
Back to top
View user's profile Send private message
Mad_Dude
n00b
n00b


Joined: 18 Oct 2004
Posts: 68
Location: Singapore / Ang Mo Kio

PostPosted: Fri Mar 25, 2005 3:55 pm    Post subject: Reply with quote

Will get back to you as soon as I get my ram working :) after I emerge world :)
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 459
Location: Little Rock, Arkansas, USA

PostPosted: Mon Mar 28, 2005 6:05 am    Post subject: Reply with quote

All right, I'm trying to get this working...the "right" way. :)

Lots of troubles, though. I'm trying to get ivman to automount my usb stick.
I just emerged dbus, hal, and ivman, using only default settings on everything.
I've deleted my udev rules and fstab entry for my usb stick..
When I plug in the stick, sda1 shows up in /dev.
fstab-sync adds an entry to my fstab file.
I also get a new folder in /media called "usbdisk".
I even get a little icon pop up in my kde system tray.
The disk won't mount, though. No errors, the disk just isn't mounted. I can mount it manually, but that defeats the whole point.
Any ideas?
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 848

PostPosted: Mon Mar 28, 2005 12:04 pm    Post subject: Reply with quote

Still no go with ivman. I know that everybody else is far ahead, discussing
usb-sticks and things whereas I´m still at the very beginning.

Seems I´m too silly for ivman. I know there´s s.th. basic that I´ve overlooked
but I don´t know what and the confusion is rising.:cry:

Like before lshal --monitor gives me the right answers when I insert DATA-CDs
into my drives. But ivman still doesn´t do anything.

Code:
$ ivman
Ikke's Volume Manager, http://ivman.sf.net
15585: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file dbus-message.c line 1723.
This is normally a bug in some application using the D-BUS library.
libhal.c 1856 : Couldn't allocate D-BUS message
15585: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file dbus-message.c line 1723.
This is normally a bug in some application using the D-BUS library.
libhal.c 1856 : Couldn't allocate D-BUS message


That´s all ivman does even if I insert a CD into any of my drives.

My fstab for the drives:

Code:
/dev/hdc                /mnt/dvdrw   auto      user,noauto,rw      0 0
/dev/hdd                /mnt/cdrw   auto      user,noauto,rw      0 0


My /etc/ivman/IvmConfigMappings.xml and I suppose it´s wrong:

Code:
 <ivm:Map device="/dev/hdc" maps="/dev/cdroms/cdrom" />
    <ivm:Map device="/dev/hdd" maps="/dev/cdroms/cdrom1" />
</ivm:MappingsConfig>   


The same is in ~/.ivman/IvmConfigMappings. I can mount both drives without
any problems both from the console and if I click on the icons on the desktop.

More info:
Code:
# udevinfo -q path -n /dev/hdc
/block/hdc


Code:
# udevinfo -q path -n /dev/hdd
/block/hdd


Code:
# ls -AF /dev/cd*
/dev/cdrom@  /dev/cdrom1@  /dev/cdrw@  /dev/cdrw1@  /dev/cdu535


Code:
# ls -l /dev/cdrom
lrwxrwxrwx  1 root root 3 Mar 27 11:28 /dev/cdrom -> hdc


Code:
 udevinfo -q path -n /dev/cdrom
/block/hdc


Code:
# udevinfo -q path -n /dev/cdrom1
/block/hdd


I know all this is bit confusing but I AM confused meanwhile. I´ve had it working once
if not for that mistake to put fork to false. I´ve corrected that long ago but I haven´t got
ivman to work since then. Ivman even had kwrited pop up a little window that said eth-0 is up
which it haven´t seen it do since.

Please, anyone, hit me on the head because I´m sitting on it.:(

transsib
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Mon Mar 28, 2005 11:57 pm    Post subject: Reply with quote

count_zero, did u compile kde with hal flag?

transsib, I just emerged the ebuilds and changed nothing. It all just worked. Perhaps you can try moving your custom configs, and updating your versions to the latest stable ones and try with the defaults. Also I think you should take your removable devices OUT of your standard fstab. But I'm no expert.

-c
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 459
Location: Little Rock, Arkansas, USA

PostPosted: Tue Mar 29, 2005 12:56 am    Post subject: Reply with quote

@taskara:
I compiled kde-base/kdebase-kioslaves-3.4.0 with support for HAL. Are there any other kde packages which used the "HAL" useflag?

Also, I've managed to get one of my flash drives to work, sort of...I just added "mount /media/USB_2_0" to my local IvmConfigActions.xml for that device, though I know it's not supposed to work like this. It then mounts, and I get an icon in my systray from which I can unmount and remount is as I like. Pretty slick! I tried to do the same with my other drive that I'm trying to configure for ivman, but no luck yet. "lshal" gives me the device (and important info like the serial number) to use with IvmConfigActions.xml, but ivman simply doesn't recognize my entry and doesn't execute my command. It seems really fickle, but maybe I'm just not configuring it correctly.
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Tue Mar 29, 2005 1:26 am    Post subject: Reply with quote

count_zero wrote:
@taskara:
I compiled kde-base/kdebase-kioslaves-3.4.0 with support for HAL. Are there any other kde packages which used the "HAL" useflag?

Also, I've managed to get one of my flash drives to work, sort of...I just added "mount /media/USB_2_0" to my local IvmConfigActions.xml for that device, though I know it's not supposed to work like this. It then mounts, and I get an icon in my systray from which I can unmount and remount is as I like. Pretty slick! I tried to do the same with my other drive that I'm trying to configure for ivman, but no luck yet. "lshal" gives me the device (and important info like the serial number) to use with IvmConfigActions.xml, but ivman simply doesn't recognize my entry and doesn't execute my command. It seems really fickle, but maybe I'm just not configuring it correctly.


perhaps you can try adding hal to your make.conf USE flag section, and run
Code:
emerge -av --newuse world
to see if there are any other packages that need hal.
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 459
Location: Little Rock, Arkansas, USA

PostPosted: Tue Mar 29, 2005 2:34 am    Post subject: Reply with quote

taskara wrote:
count_zero wrote:
@taskara:
I compiled kde-base/kdebase-kioslaves-3.4.0 with support for HAL. Are there any other kde packages which used the "HAL" useflag?

Also, I've managed to get one of my flash drives to work, sort of...I just added "mount /media/USB_2_0" to my local IvmConfigActions.xml for that device, though I know it's not supposed to work like this. It then mounts, and I get an icon in my systray from which I can unmount and remount is as I like. Pretty slick! I tried to do the same with my other drive that I'm trying to configure for ivman, but no luck yet. "lshal" gives me the device (and important info like the serial number) to use with IvmConfigActions.xml, but ivman simply doesn't recognize my entry and doesn't execute my command. It seems really fickle, but maybe I'm just not configuring it correctly.


perhaps you can try adding hal to your make.conf USE flag section, and run
Code:
emerge -av --newuse world
to see if there are any other packages that need hal.


Nope, kdebase-kioslaves looks like the only one. Besides, the kde component works perfectly--I get an icon, I can mount and unmount. It's just the ivman automounting that's screwed up.
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Tue Mar 29, 2005 2:42 am    Post subject: Reply with quote

hmm.. stop ivman? and let kde mount when you access the device?
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 459
Location: Little Rock, Arkansas, USA

PostPosted: Tue Mar 29, 2005 3:13 am    Post subject: Reply with quote

Well, sure, I could do that. But then I can't get ivman to execute my script to download my digital camera pictures and open flphoto to that directory when I plug in my camera, can I? :D At least not until KDE implements their own configurable volume manager.

I just re-emerged ivman with debug support. I get this error from the terminal that is running the user instance of ivman:
Code:
mount: can't find /media/UDISK_2_0 in /etc/fstab or /etc/mtab
object not accessible

This is interesting, because "cat /etc/fstab | grep sda" gives this:
Code:
/dev/sda1               /media/UDISK_2_0        vfat    users,exec,noauto,iocharset=utf8,noatime,sync,managed 0 0


Oh, and where do I access the "debug" output? This error message seems kind of generic...
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 848

PostPosted: Tue Mar 29, 2005 11:19 am    Post subject: Reply with quote

taskara wrote:

Quote:
transsib, I just emerged the ebuilds and changed nothing. It all just worked. Perhaps you can try moving your custom configs, and updating your versions to the latest stable ones and try with the defaults. Also I think you should take your removable devices OUT of your standard fstab. But I'm no expert.


I already have the latest stable and I´ve done that a couple of times meanwhile. No luck though.
Removing the drives out of fstab just makes them disappear.
Looks like I have to give in and take it the way it is or remove ivman altogether. :(

Thanks for trying to help though.
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Tue Mar 29, 2005 12:54 pm    Post subject: Reply with quote

kde looks at your fstab and creates the devices, but these are not the ones you should be using with ivman.

you should have nothing in your fstab, and when you plug in a cd / usb stick THEN the fstab entry is autogenerated and kde sees it.

you can then open the device and kde will mount it, or if you are using ivman it will auto mount for you.

that's all I know, if that doesn't help I dunno why.. the default ebuilds just worked perfectly for me (and I think everyone else here).

-c
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 848

PostPosted: Tue Mar 29, 2005 3:40 pm    Post subject: Reply with quote

Please, don´t get me wrong. I haven´t said it´s ivmans fault. It certainly
isn´t. Ivman is a wonderful software which is why I wanted to have it.
Please correct me if I´m wrong but there are some conflicting pieces of
information running around on this thread concerning /etc/fstab, like you
have your entries there ( ie. your drives ) and edit IvmConfigMappings.xml
to let ivman know about the symlinks.

I won´t give up but I´ll let it be for a while ´cause it looks like I can´t handle
ivman.

transsib
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Tue Mar 29, 2005 11:04 pm    Post subject: Reply with quote

sorry I wasn't having a go at you at all!

afaik, ivman is an automounter - so you could test your setup without ivman - everything should work as planned, EXCEPT the automounting. This might help you pinpoint the issue.

It is dbus and hald that create your devices on the fly (afaik).

Yes removing your removable devices OUT of fstab will make them dissappear, that's ok! Because when you insert a cd, or plug in a usb stick it will be detected, and then the device will be created under kde. Then ivman will automount it if you have it turned on, but if not then you can just open the device and it will be mounted for you then and there.

Perhaps I'm misunderstanding your problem, but if you STOP the ivman daemon, and take your entries out of fstab what happens under kde when you insert a cd / usb stick? is the device detected under media:/ ?
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 848

PostPosted: Thu Mar 31, 2005 12:37 pm    Post subject: Reply with quote

No worries, taskara and thanks for helping. :wink:
I´ll come to that later.

transsib
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 848

PostPosted: Fri Apr 01, 2005 6:02 pm    Post subject: Reply with quote

It looks like it is working like it should. I´ve now had time to put it to a test.:D

taskara wrote:

Quote:
Yes removing your removable devices OUT of fstab will make them dissappear, that's ok! Because when you insert a cd, or plug in a usb stick it will be detected, and then the device will be created under kde. Then ivman will automount it if you have it turned on, but if not then you can just open the device and it will be mounted for you then and there.


I have had udev on the system for a long time now. I have installed it when I first heard about devfs to be deprecated.
It seems that I just mistrusted the removal of my optical drives from /etc/fstab, since it is such an important file. May be I´m afraid
of loosing control of the mounting process when I give all the control to hald and ivman but this seems to bring udev to perfection.

Except for some minor glitches ivman seems to work even for me now.:wink:

Sorry for being a nuisance and thank you for helping.

One more question: which IvmConfig*.xml files do I have to edit, those in /etc/ivman or the ~/.ivman/*.xml files?
( another silly one! )

transsib
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Sat Apr 02, 2005 12:36 am    Post subject: Reply with quote

I'd say the universal ones (/etc), not your personal ones. But you'll have to see. I've never editted any files. good luck!
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
pjj
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 165
Location: The Netherlands

PostPosted: Sat Apr 02, 2005 12:20 pm    Post subject: Reply with quote

I have a canon powershot A75 (works with gphoto) but I can only get it to work as root someone knows what to do? (It says cannot claim device)..
_________________
Pjj's Weblog
Back to top
View user's profile Send private message
Mad_Dude
n00b
n00b


Joined: 18 Oct 2004
Posts: 68
Location: Singapore / Ang Mo Kio

PostPosted: Mon Apr 04, 2005 7:51 am    Post subject: Reply with quote

Mad_Dude wrote:
Will get back to you as soon as I get my ram working :) after I emerge world :)


Hmm... I just got back from barcelona, anyway, I was able to mount my usb flash drive under the console without any problems as a normal user, but wasn't able to do it via KDE. What gives?
Back to top
View user's profile Send private message
jadtn
n00b
n00b


Joined: 09 Apr 2005
Posts: 2

PostPosted: Sat Apr 09, 2005 8:35 am    Post subject: Segmentation Fault Anyone? Reply with quote

Hi all,
I'm have a segmentation fault problem when mounting a device. Could anyone please help? Here's the debug output:

Code:
hal_interface.c:43 (hal_device_added) New Device: /org/freedesktop/Hal/devices/block_8_0
IvmConfigActions.c:46 (ivm_device_is_mountable) /org/freedesktop/Hal/devices/block_8_0 is /dev/sda
IvmConfigActions.c:58 (ivm_device_is_mountable) /dev/sda can't be mounted because it is not a volume
hal_interface.c:43 (hal_device_added) New Device: /org/freedesktop/Hal/devices/block_4218-34AA
IvmConfigActions.c:46 (ivm_device_is_mountable) /org/freedesktop/Hal/devices/block_4218-34AA is /dev/sda1
IvmConfigActions.c:117 (ivm_device_is_mountable) /dev/sda1 is mountable and will be mounted if Ivman rules specify to do so
IvmConfigActions.c:46 (ivm_device_is_mountable) /org/freedesktop/Hal/devices/block_4218-34AA is /dev/sda1
IvmConfigActions.c:117 (ivm_device_is_mountable) /dev/sda1 is mountable and will be mounted if Ivman rules specify to do so
hal_interface.c:43 (hal_device_added) New Device: /org/freedesktop/Hal/devices/block_8_2
IvmConfigActions.c:46 (ivm_device_is_mountable) /org/freedesktop/Hal/devices/block_8_2 is /dev/sda2
IvmConfigActions.c:117 (ivm_device_is_mountable) /dev/sda2 is mountable and will be mounted if Ivman rules specify to do so
IvmConfigActions.c:46 (ivm_device_is_mountable) /org/freedesktop/Hal/devices/block_8_2 is /dev/sda2
IvmConfigActions.c:117 (ivm_device_is_mountable) /dev/sda2 is mountable and will be mounted if Ivman rules specify to do so
hal_interface.c:43 (hal_device_added) New Device: /org/freedesktop/Hal/devices/block_8b4df051-c5fe-4f74-b5a7-246ec68e3800
IvmConfigActions.c:46 (ivm_device_is_mountable) /org/freedesktop/Hal/devices/block_8b4df051-c5fe-4f74-b5a7-246ec68e3800 is /dev/sda3
IvmConfigActions.c:117 (ivm_device_is_mountable) /dev/sda3 is mountable and will be mounted if Ivman rules specify to do so
manager.c:454 (ivm_media_changed) Attempting to mount /dev/sda3
manager.c:339 (ivm_run_command) Running: /bin/mount /dev/sda3
manager.c:339 (ivm_run_command) Running: echo /dev/sda3 mounted at `date` >> /tmp/mounts
Segmentation fault


Here're the relevant lines in IvmConfigActions.xml:

Code:
    <ivm:Match name="hal.volume.uuid" value="8b4df051-c5fe-4f74-b5a7-246ec68e3800">
       <ivm:Option name="exec" value="echo $hal.block.device$ mounted at `date` >> /tmp/mounts" />
       <ivm:Option name="mount" value="true" />
       <ivm:Option name="execun" value="echo $hal.block.device$ unmounted at `date` didnt work >> /tmp/mounts" />
    </ivm:Match>


Thanks for any help...

Jad.
Back to top
View user's profile Send private message
my_ace
n00b
n00b


Joined: 18 Apr 2005
Posts: 4

PostPosted: Wed Apr 20, 2005 8:56 am    Post subject: Reply with quote

yea, me too, whenewer I try run a command...
Anyway thanks, great program :D

uname -a
Code:
Linux ace 2.6.11-gentoo-r6 #1 SMP Mon Apr 11 21:38:36 CEST 2005 x86_64 AMD Athlon(tm) 64 Processor 2800+ AuthenticAMD GNU/Linux

manager.c:339 (ivm_run_command) Running: /bin/mount /dev/hdc
manager.c:339 (ivm_run_command) Running: echo /dev/hdc mounted at `date` >> /tmp/mounts
... (SIGSEGV)



I set CFLAGS to -O1 an have no crashes since then...
Back to top
View user's profile Send private message
palatin
Tux's lil' helper
Tux's lil' helper


Joined: 20 Oct 2004
Posts: 113
Location: Paris

PostPosted: Fri Apr 29, 2005 9:13 pm    Post subject: Reply with quote

I own a creative audigy 2 NX usb soundcard, which I often switch between a windows box and a gentoo box. When I plug it on the gentoo box, I have to restart alsa (/etc/init.d/alsasound restart) in order for the modules to be mounted properly. Strangly enough, If I don't stop alsa before unpluging the soundcard, strange things happen such as the death of the xfce4 panel (I suspect the mixer plugin to be the culprit) and much more of a hassle, the keyboard doesn't work anymore, 8O I have to ssh into my box in order to stop alsa.
That's why using ivman to automatically start and stop alsa would be nifty. (Re)starting alsa is easy, with the following rule :
Code:
<ivm:Match name="hal.usb_device.product" value="SoundBlaster Audigy 2 NX">
    <ivm:Option name="exec" value="/etc/init.d/alsasound restart" />
</ivm:Match>

And it works :) , but stopping alsa when unplugging the soundcard, by adding :
Code:
<ivm:Option name="execun" value="/etc/init.d/alsasound stop" />

just under the exec option doesn't work, and, in fact, it leads to a segmentation fault, even when I plug it, meaning that this last rule is buggy.
Unfortunately the documentation lacks consistency, because the manpage says that execun apply when removing a device wether IvmConfigActions.xml states that execun apply when unmounting the device. I fear the latter to be the good answer, I wish it were the former. :?

Does anyone know the reel meaning of execun ? Is there a workaround for my problem ?

[EDIT] I compiled it with -01 CFLAG, same result
_________________
fumo~
Back to top
View user's profile Send private message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Mon May 02, 2005 7:02 pm    Post subject: Reply with quote

1. I have no /etc/conf.d/ivman, so I don't know where to tell ivman as what user to mount the stuff (it's pretty annoying that it's all mounted as root)
2. How about unmounting? Since I installed ivman I can eject CDs although they are mounted, but they don't get unmounted either. I just get a lot of this stuff:
Code:
May  2 20:47:53 kumquad VFS: busy inodes on changed media.
May  2 20:47:55 kumquad VFS: busy inodes on changed media.
May  2 20:47:57 kumquad VFS: busy inodes on changed media.
May  2 20:47:59 kumquad VFS: busy inodes on changed media.
May  2 20:48:01 kumquad VFS: busy inodes on changed media.
May  2 20:48:03 kumquad VFS: busy inodes on changed media.
May  2 20:48:05 kumquad VFS: busy inodes on changed media.

_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
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 ... 23, 24, 25 ... 27, 28, 29  Next
Page 24 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