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


Joined: 26 Jul 2003
Posts: 845

PostPosted: Thu Mar 03, 2005 11:52 am    Post subject: Reply with quote

rohan28 wrote

Quote:
If your system isn't even booting, you've probably set Ivman not to daemonize. Look at /etc/ivman/IvmConfigBase.xml , fork should be true.


You are right there, fork was set false by me and debug true. I'll change it and give it another try,
now that I know that I can rescue my system anyway if anything goes wrong again.
But certainly not after one of these busy workdays.:lol:

Another question concerning lshal: it gives you lots of info about your system. Is there anything I
should put into i.e. IvmConfigProperties.xml as a substitute of $hal.block.device$ or is that a
catchall for the devices attached to the system?
I know it's a silly question but I'm a long time n00b although my gentoo-system is fine and clean
what with 2.6.10 kernel, HID mouse a. keyboard, udev, xorg and all the gizmos that I plug and unplug.

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


Joined: 23 Dec 2004
Posts: 790
Location: under a car or on top of a keyboard

PostPosted: Thu Mar 03, 2005 12:02 pm    Post subject: Reply with quote

transsib wrote:
I know it's a silly question but I'm a long time n00b although my gentoo-system is fine and clean
what with 2.6.10 kernel, HID mouse a. keyboard, udev, xorg and all the gizmos that I plug and unplug.

transsib

Jeez, I wish I had a keyboard. :D
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 845

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

Gee, thebigslide's got no keyboard.8O
Let`s move to Off The Wall to chat about
this. :wink: .

Or You've got a server running and x to 100
puters attached to it.:lol:

You know, I just wanted to apologize for being so
dumb; for not knowing how to properly configure
Ivman config files. (HID-mouse and HID-keyboard)

Other than that I'm a wee bit proud of my gentoo-system. :oops:
Wouldn't want any other distro.

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


Joined: 19 May 2003
Posts: 2

PostPosted: Thu Mar 03, 2005 9:03 pm    Post subject: Reply with quote

How can I tell ivman to use captive-ntfs to mount a usb attached harddrive?
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 845

PostPosted: Sun Mar 06, 2005 10:37 am    Post subject: Reply with quote

Now I've deleted everything ivman in /etc/ and HOME and reemerged ivman.

Fork is true now and I've worked on the config-files but ivman is sitting there
happily doing nothing:

Code:
$ ivman
Ikke's Volume Manager, http://ivman.sf.net
 $


Xml is clean, hal is working, dbusd, hald and ivman are staring on boot, system
starts and I can mount manually; no problems with k3b or any other application.
But ivman gives me nothing I don't already know. :?

It's a pity; I've had it working and if not for the foolish mistake of setting fork to
false I wouldn't sit here now trying to get it working again.

I forgot to mention this:

Code:
$ ivman
Ikke's Volume Manager, http://ivman.sf.net
daemonize.c:32 (daemonize) Daemonizing...
daemonize.c:68 (daemonize) Cannot get a lock on /home/liki/.ivman/.lock


But the .lock file is definitely in the folder where ivman looks for it.

Sorry for my n00bie probs but maybe you know what might be missing.

transsib
Back to top
View user's profile Send private message
Pubare
Tux's lil' helper
Tux's lil' helper


Joined: 24 Nov 2003
Posts: 81
Location: Lafayette, LA

PostPosted: Sun Mar 06, 2005 1:18 pm    Post subject: Reply with quote

transsib, what exactly _are_ you doing? No offense meant, I'm just having a hard time following you... Is that daemonize output from a command line attempt to start ivman? As a regular user, I assume? Is the .lock file there _before_ you try to start it? If so, try deleting it then attempting to start ivman again.

But the ivman service running on boot (default runlevel, right?) as root isn't actually mounting data CDs or anything else? The drive is set up as "/dev/hdX" in fstab with no entries in IvmConfigMappings? Does "lshal --monitor" show any change in devices when you insert a data CD? I'm not even gonna ask you to put ivman in debug mode after your last experience... ;)

And you really shouldn't need to apologize for "noob" questions (if these are), we are all noobs _at least_ once. Heck, I'd rather be a noob often than an expert always... means I'm trying to learn new things.
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 845

PostPosted: Sun Mar 06, 2005 2:01 pm    Post subject: Reply with quote

I am not sure what I'm doing anymore :oops: .
But this is one funny sunday :lol: .

The .lock file was there before I tried to start ivman; deleted it but outcome is the same.

Ivman runs in default. I've got two drives : /dev/hdc (dvd writer) and /dev/hdd (cd writer).
They are mapped in IvmConfigMappings.xml according to my fstab and lshal --monitor reacts to a DataCD
into /dev/hdc:

Code:
*** lshal: property_modified, udi=/org/freedesktop/Hal/devices/block_DX2_2, key=volume.is_mounted
           is_removed=false, is_added=false
*** new value: true  (bool)

*** lshal: property_modified, udi=/org/freedesktop/Hal/devices/block_DX2_2, key=volume.mount_point
           is_removed=false, is_added=false
*** new value: '/mnt/dvdrw'  (string)

*** lshal: device_condition, udi=/org/freedesktop/Hal/devices/block_DX2_2
           condition_name=VolumeMount

                                             


into /dev/hdd:

Code:

*** lshal: property_modified, udi=/org/freedesktop/Hal/devices/block_CDROM, key=volume.is_mounted
           is_removed=false, is_added=false
*** new value: true  (bool)

*** lshal: property_modified, udi=/org/freedesktop/Hal/devices/block_CDROM, key=volume.mount_point
           is_removed=false, is_added=false
*** new value: '/mnt/cdrw'  (string)

*** lshal: device_condition, udi=/org/freedesktop/Hal/devices/block_CDROM
           condition_name=VolumeMount



And I've put ivman out of debug mode now although this didn't ever cause any problems.
Only ivman is still doing nothing, like above, it states its presence.:P

And pubare: no offence taken.:lol:

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


Joined: 02 Sep 2004
Posts: 2912
Location: Parma (Italy)

PostPosted: Fri Mar 18, 2005 6:03 pm    Post subject: Reply with quote

I've got another problem with this great software. I've managed in making ivman show devices' icons (through idesk) when they're plugged in. Now i want ivman to show a k3b icon if i put in a blank cd. This is my IvmConfigProperties.xml

Code:
<ivm:Match name="hal.block.device" value="/dev/hdd">
          <ivm:Property name="hal.volume.disc.has_data">
          <ivm:Action value="false" exec="add-idesk k3b.lnk" />
            <ivm:Action value="true" exec="rem-idesk k3b.lnk" />
        </ivm:Property>
    </ivm:Match>


and here is a section (working) for data cd

Code:
<ivm:Match name="hal.block.device" value="/dev/hdd">
        <ivm:Property name="hal.volume.is_mounted">
            <ivm:Action value="true" exec="add-idesk cd-rom2.lnk" />
            <ivm:Action value="false" exec="rem-idesk cd-rom2.lnk" />
        </ivm:Property>
    </ivm:Match>


where am i wrong?

Thanks
_________________
Linux Registered User n. 373835

Titus Lucretius Carus, De Rerum Natura - Tantum religio potuit suadere malorum
Back to top
View user's profile Send private message
DrWoland
l33t
l33t


Joined: 13 Nov 2004
Posts: 603

PostPosted: Fri Mar 18, 2005 7:34 pm    Post subject: Reply with quote

Onip wrote:
I've got another problem with this great software. I've managed in making ivman show devices' icons (through idesk) when they're plugged in. Now i want ivman to show a k3b icon if i put in a blank cd. This is my IvmConfigProperties.xml

Code:
<ivm:Match name="hal.block.device" value="/dev/hdd">
          <ivm:Property name="hal.volume.disc.has_data">
          <ivm:Action value="false" exec="add-idesk k3b.lnk" />
            <ivm:Action value="true" exec="rem-idesk k3b.lnk" />
        </ivm:Property>
    </ivm:Match>


and here is a section (working) for data cd

Code:
<ivm:Match name="hal.block.device" value="/dev/hdd">
        <ivm:Property name="hal.volume.is_mounted">
            <ivm:Action value="true" exec="add-idesk cd-rom2.lnk" />
            <ivm:Action value="false" exec="rem-idesk cd-rom2.lnk" />
        </ivm:Property>
    </ivm:Match>


where am i wrong?

Thanks


I really have no idea, but name="hal.block.device" value="/dev/hdd" suggests the disk has data on it. I'm fairly certain there's a different flag that checks for a blank CD, search the thread. It was mentioned in the beginning before ivman was smart enough not to mount blank CDs on its own, should be within the first 5 pages.
_________________
I'm not a Guru, I just ask a lot of questions.
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Sun Mar 20, 2005 6:35 am    Post subject: Reply with quote

I have hal working with dbus and ivman under kde 3.4

When I plug in a usb stick / cdrom it is auto detected and mounted, that's all sweet

However when I right click on the device under media:/ to safely remove, it says only root has permission to remove (for cdrom it's unmount/ejecting which fails).

I don't have /etc/conf.d/ivman, so I can't edit it as this howto suggests.

AFAIK ivman and hal bypass fstab, but I've tried adding the entry to fstab with "user, uid=1000" under options anyway, but it still won't let me unmount ;)

The other issue I have is that if I manually unmount the device, remove it and plug it in again I get a new scsi device.
Can this be set so that it re-detects sda (unless sda is still plugged in naturally)

any ideas?

Other than that it's working a treat! :D
_________________
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
firephoto
Veteran
Veteran


Joined: 29 Oct 2003
Posts: 1599
Location: +48° 5' 23.40", -119° 48' 30.00"

PostPosted: Sun Mar 20, 2005 8:23 am    Post subject: Reply with quote

I don't remember offhand but I think you need to set the permission of the mount point.
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Sun Mar 20, 2005 10:29 am    Post subject: Reply with quote

firephoto wrote:
I don't remember offhand but I think you need to set the permission of the mount point.


ok, i"ll try that, but with USB thumb drives it creates a new mount point on the fly, based on the fat32 partition title..

update: that didn't work, once the cd is automounted it changes the ownership of the mountpoint back to root root.. there must be a config settingt somewhere to say who it shoudl be mounted as (ie "nobody users")

which is suggested in teh howto on page 1, however I don't have that config file to edit..
_________________
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
j.w.m.
n00b
n00b


Joined: 20 Mar 2005
Posts: 2

PostPosted: Sun Mar 20, 2005 6:17 pm    Post subject: Reply with quote

taskara, i managed to get user unmounting working on my system. you have to change the mountpoint defaults in HAL to include the option "users" instead of "user". first do the following:

Code:

> cd /usr/share/hal/95userpolicy
> cp ../90defaultpolicy/storage-policy.fdi ./


now edit storage-policy.fdi and change:
storage.policy.default.mount_option.user => storage.policy.default.mount_option.users

mount points should now appear in your fstab with the "users" option, which allows umounting by any user.

* * *

i do have another problem though that i was not able to solve myself:

when you press "safely remove" in KDE, the device unmount without problems. however, when you press "Mount" afterwards, the device mounts for about a second or so and then unmounts itself again. you have to plug and unplug the usb stick to mount it again. is this a bug?
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Sun Mar 20, 2005 11:02 pm    Post subject: Reply with quote

thank you j.w.m. it is working perfectly

I knew it had to be a config somewhere I just had no idea where :D

I tested the problem you were having, but I did not have the same issue.

Here are the versions I am using:

sys-fs/udev-054
sys-apps/hal-0.4.5-r2
sys-apps/ivman-0.5_pre2

Perhaps you can update to these versions and try again? Thanks for your help!!!! :D

***

ALSO if someone else is using these versions and does this little trick of j.w.m.'s you need to do the following:

Code:
sudo su -
cd /usr/share/hal/fdi/95userpolicy/
cp ../90defaultpolicy/storage-policy.fdi ./

now you can edit storage-policy.fdi and change user to users as per his suggestion.

The only difference is the directory above.

***

Now I only have one more issue, and that is that when I remove a usb device and plug it or another one in, I get a new scsi device instead of sda again.
This is not really an issue now that auto mounting / unmounting is working properly, but it would be good.

It would be a pain if you wanted to backup data to an external usb hard drive through a simple script or something..

I think it must be a udev issue?

***

one more thing - under kde media:/ the harddrives are showing up as "40gb media" can these be re-named to their mountpoints? like /home for example..
seems strange that they aren't..

edit: nm, I don't think this is a hal problem..
_________________
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
j.w.m.
n00b
n00b


Joined: 20 Mar 2005
Posts: 2

PostPosted: Mon Mar 21, 2005 10:18 am    Post subject: Reply with quote

well, taskara, i don't think it's a matter of updating. i have:

udev 054-1
dbus 0.23.2-3
hal 0.4.7-1
ivman 0.5_pre2-1

i looked a bit more at the problem. it turns out that when you press "Safely Remove" in KDE, the device /dev/sda1 is actually removed from /dev. the disk /dev/sda is still there, but the partition is gone. after a while the usbdisk also dissappears from media:/ in KDE.

* * *

i also have the same problem as you. each time i unplug and reattach my usb disk the device shifts (sda1->sdb1->sdc1->...). this only happens with ivman running. when running hal without ivman the usb disk stays at sda when reattached.
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Mon Mar 21, 2005 11:07 am    Post subject: Reply with quote

you are right.. if anything you need to downgrade ;)

I'm also using:
sys-apps/dbus-0.23-r3

thanks for your help anyways, it got me up and running properly :)
_________________
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: Wed Mar 23, 2005 5:00 am    Post subject: Reply with quote

Hi all!

Thanks to all the forum users for making my conversion to Gentoo pretty good!

Anyway, anyone can help me with my problem? I can't seem to get my USB Flashdrive working as a Non-Root user. As root, it works like it should. I did try editing user to users in the ivman config file and setting it to 0777 too. Did I miss out anything? Thanks!
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: Wed Mar 23, 2005 5:02 am    Post subject: Reply with quote

Code:

usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)
usb-storage:  00 00 00 00 00 00
usb-storage: Bulk Command S 0x43425355 T 0x1dd L 0 F 0 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x1dd R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)
usb-storage:  00 00 00 00 00 00
usb-storage: Bulk Command S 0x43425355 T 0x1de L 0 F 0 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x1de R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.


When I plug in my USB Sandisk Micro Cruzer, this is what I got from the log.
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: Wed Mar 23, 2005 2:46 pm    Post subject: Reply with quote

Also the following from debug:

Code:

12008: 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
mount: /dev/sdb1 already mounted or /media/usbdisk2 busy
mount: according to mtab, /dev/sdb1 is mounted on /Mount/USB/Cruzer_Micro


I'm on KDE3.4 Final :)
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Wed Mar 23, 2005 9:43 pm    Post subject: Reply with quote

if you turn OFF ivman and dbus and hal, and plug in your device, can you access it through /dev/sda?
_________________
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: Thu Mar 24, 2005 3:09 am    Post subject: Reply with quote

I did not try that but as I forgot to take out my USB Flash drive while rebooting, I realize that if it remains in the USB Port after I do a reboot, the non-root user will be able to mount it. But, if it is done after I've log into KDE3.4, I no longer am able to do it. Is it possible that its the problem of KDE3.4's automount?
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 3:45 am    Post subject: Reply with quote

ok I'm still trying to fully understand that msg, but in the mean time if you log into kde 3.4 as root, does mounting and unmounting work perfectly?
_________________
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: Thu Mar 24, 2005 5:50 am    Post subject: Reply with quote

Yeap, in KDE 3.4, as root, it works like a charm. Interestingly after I had the USB mounted in root and after I had logged out and login as non-root, it worked only once. I was able to mount it and access the file. After unmounting it, I couldn't remount it. Could it be what I suspect? Something to do with KDE3.4's automount?
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 6:49 am    Post subject: Reply with quote

sounds like permissions problem to me

if it was kde automount then I suspect root would have the problem too

are you sure you editted the correct file as above?

note you do NOT actually edit any config files, you COPY one to a new directory and then edit it.
_________________
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: Thu Mar 24, 2005 9:44 am    Post subject: Reply with quote

Taskara, firstly , thanks for assisting me in helping me solve my hardware device woes.

I followed rohan28 at https://forums.gentoo.org/viewtopic-t-185508-postdays-0-postorder-asc-start-350.html and did the following:

1.Create a 95userpolicy directory
2.Copy /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi to /usr/share/hal/fdi/95userpolicy/storage-policy.fdi, and add the following line near the other mount options:

Code:
<merge key="storage.policy.default.mount_option.users" type="bool">true</merge>


3./etc/init.d/hald restart
4./etc/init.d/ivman restart

Also to note, I do not have any USB Flashdrive entry in FSTAB

I tried my Canon A40 as Non-Root and it has the same problems as the Flash Drive.
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 ... 22, 23, 24 ... 27, 28, 29  Next
Page 23 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