# ivman hell

## zambizzi

OK, I've searched through a half-dozen threads now and can't find a solution.  I used to use automount but followed the instructions when installing KDE 3.4.x this time around for using ivman and hald, etc. etc.

I can plop in a regular data cd-rom disk into my dvd-rom drive....it mounts and I can copy the stuff out of /media/cdrom just fine.

I cannot, however, unmount or eject the disk at all...it's just *stuck*.  :Confused: 

firing "eject" as root gets me this:

```

eject: device name is `cdrom'

eject: expanded name is `/dev/cdrom'

eject: `/dev/cdrom' is a link to `/dev/hda'

eject: `/dev/hda' is mounted at `/media/cdrom'

eject: unmounting device `/dev/hda' from `/media/cdrom'

umount: /media/cdrom: device is busy

umount: /media/cdrom: device is busy

eject: unmount of `/media/cdrom' failed

```

I've got the following installed

udev 058

ivman 0.5_pre2

hald 0.4.7-r2

ivman and hald are running @ default on boot....not sure what else I'd need to tell?  I'm using kernel 2.6.12-gentoo-r6, KDE 3.4.1....

here's my fstab:

```

/dev/sda5               /boot           ext2            defaults,noatime        1 2

/dev/sda6               none            swap            sw                      0 0

/dev/sda7               /               ext3            noatime                 0 1

/dev/cdroms/cdrom0      /mnt/cdrom      auto            noauto,ro,users         0 0

none                    /proc           proc            defaults                0 0

none                    /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

#ntfs partition, cdrom

/dev/sda1               /mnt/windows    ntfs            users,owner,umask=000   0 0

/dev/hda                /media/cdrom            auto    user,exec,noauto,managed 0 0

```

Any ideas?

Thanks!

----------

## TWO515TY

I'm not sure if this is the cause of the problem, but I believe the guide on the gentoo website says you need dbus as well. Do

```
emerge dbus

rc-update add dbus default
```

reboot, and see if that fixes your problem.

----------

## zambizzi

 *TWO515TY wrote:*   

> I'm not sure if this is the cause of the problem, but I believe the guide on the gentoo website says you need dbus as well. Do
> 
> ```
> emerge dbus
> 
> ...

 

Sorry, there's one thing I forgot to mention; I've got dbus installed and running on boot @ default...my version is 0.23-r3

Anything else I could try?

----------

## longshot

I was having the same behaviour with ivman-0.5_pre3+gnome-2.10. Could only eject/umount cd as root, even with user in fstab.  I'm using gnome-volume-manager now and it allows me to eject the cdrom. 

But more generally it looks like project gentopia is really going to pull this stuff together ...

----------

## zambizzi

...for now anyways.

Last night I was able to eject and everything appeared to work fine...today it's back to "sticking" and can't eject w/o rebooting the machine altogether.

Oh well...thankfully I don't need the drive much...but not a very elegant solution for somethin as simple as mounting/unmounting drives.

How do distros like SuSE, Fedora, etc. make it seem so easy?  What combination of apps, kernel mods, etc. is making those distros so smooth w/ hardware like that?

Just curious...it seems like no-brainer in this day and age.

----------

## ChojinDSL

There is a setting in either a dbus hal or ivman config file which needs to be changed.

If you check your fstab, you should see that dbus and ivman make their own entry. One of the options is set as "user" but not "users" which it should be. This results in the cd being only ejectable and unmountable by root.

I remember I fixed this by finding a thread in the forum which mentioned that there was a certain file that needs to be edited. Basically telling dbus or ivman to set the option as "users" and not as "user". But I dont remember anymore which file it was, or where that post was. Im currently searching the forums for it.

----------

## ChojinDSL

Ok, I found out what needs to be changed to allow a user to unmount autmatically mounted devices.

Here's a quote from the IVman howto:

 *Quote:*   

> 
> 
> Mounting mass storage devices to be unmountable by normal users
> 
> When you plug in your USB key, ivman mounts it automatically, but you can't unmount it unless you are root. This is a work around to solve it, although it tells HAL to mount all mass storage devices with the "users" option, which may be something you don't want.
> ...

 

Taken from http://gentoo-wiki.com/HOWTO_ivman

----------

## pinger

Hello,

I've created the whatever.fdi file as explained in the wiki, but Ivman-0.6.6 does not seem to care at all. Volumes are mounted, but only root can umount. In mtab I get the following flags for my cdrom drive. As you can see, no trace of "users" anywhere:

```

/dev/hdc /media/NULL iso9660 ro,noexec,nosuid,nodev,uid=103,gid=440 0 0

```

----------

## borkdox

same problem here.

----------

## bdz

The original problem of the first post of this thread has nothing to do with the setting of user mount option in hal because zambizzi was running eject as root:

 *zambizzi wrote:*   

> 
> 
> firing "eject" as root gets me this:
> 
> ```
> ...

 

Here the problem is that an application is still using the drive.

I also have this problem from times to times.

When it happens I have to close all the konqueror windows to be able to eject the CD (yes all the konqueror windows, even if they do not display a folder on the CD)

----------

## mthayer

I also have this problem:

umount: /media/cdrecorder: device is busy

umount: /media/cdrecorder: device is busy

Please check that the disk is entered correctly.

# fuser /dev/hdc

/dev/hdc:             8210

# ps ax | grep 8210

 8210 ?        Ss     0:00 /usr/bin/ivman

19957 pts/2    R+     0:00 grep 8210

Nice, isn't it?

----------

## mthayer

Thinking of it,

# fuser -m /media/cdrecorder

is what should say which processes are using that file system.  That command does not list any processes at all.  Perhaps I am using it wrong, but

# fuser -m /media

gives me a nice list of PIDs which are presumably using the root fs.  Still won't unmount, neither with the mouse nor with the command line.

----------

