# KDE USB mass storage problem - "Could not mount device"

## dave_deu

I cannot get normal user access to my digital camera, which appears to Linux as USB mass storage. When I open the KDE mediamanager (i.e. the side tab in Konqueror) to display all the storage devices on my system and then click on "SANVOL" which is the correct icon for my camera, an error message pops up saying: 

```
Could not mount device.

The reported error was:

mount: can't find /dev/sdc1 in /etc/fstab or /etc/mtab.
```

So as a normal user I can't access the USB mass storage. However, if I open up a BASH shell as root, I have full access to the storage, located in /media/SANVOL.

My system is fully up to date with all the latest packages. I am using KDE 3.4.3 with all the HAL and udev USE flags.

Anyone know what's wrong?

Thanks.

----------

## erik258

since you can do it as root ok one idea is it's a permissions problem and the correct error messege didn't make it to you.

Check whether you're mounting as user or root and whether /media/SANVOL has the right permissions as you want them.  

You might want to add it to your fdisk if you haven't done so but at any rate i'd check those permissions, post if need help.

----------

## stivani

Have you add the user to the plugdev group? Maybe this wil resolve your problem.

```
gpasswd -a <user> plugdev
```

----------

## dave_deu

Thanks a lot!!!

It now works perfectly. I added myself to the "plugdev" group and rebooted to get it working. Must be some new group  because I've never encountered it before.

----------

## dave_deu

Actually while  I'm here, does anyone know of an easy way to make the data transfer to my USB drive synchronous? (I think that's the right word)

What I would like is for the data to be written to the USB mass storage _when_ I copy it, and _not_ when I "Safely remove hardware". i.e. copy the data now, not later.

Any ideas? Thanks once more.

----------

## erik258

does that happen on unmount?

I have never had problems with synchronicity.

----------

## dave_deu

That's right. The data is only transferred when I dismount the USB mass storage.

On the up side, this may give me much faster data transfers than I used to get with synchronous. 

See this blog posting to see what I mean:

http://www.skepticats.com/linlog/ - "What's with sync mouting?"

So does anyone know:

a) How to do synchronous transfer over USB

b)Why synchronous transfer is _much_ slower than asynchronous?

Thanks.

----------

## coolsnowmen

from "man mount"

did you try mounting it with the sync option

example:

```
mount -t vfat /dev/sda1 /mnt/usbstick -o sync
```

----------

## dave_deu

```
did you try mounting it with the sync option 
```

No, but I have done in the past.

The fact is I don't want to fiddle with low level system files as I am using Konqueror to do all my device mass storage mounting/unmounting. Ideally there would be a choice in Control Center to have sync or async.

----------

## coolsnowmen

I'll look this weekend (installing kde 3.5.2 now for the automounting support)

In answer to your questing, async is "faster" simply because you arnt waiting for it.  It all get buffered, and linux 'aparently' is notorious for cacheing things and taking its damn sweet time to write to disk.  I have read of problems because after a crash anything that was just "in cache" never made it to the HD.

If it REALLY bothers you, you could always use ivman, but then you wont get as nice of an interface unless you design it (as far as I can see).  But you want the ease of kde's automount with the configurability of ivman...it might not be that 'advanced' yet....

I've also seen people steal knoppix's scrips, if you had those you could add the option to just like remount r/w, you should remount with the sync

----------

## coolsnowmen

OK scratch that, it turns out kde will still respect the fstab above all else. so you could still make a line like this: (notice the 'user' option also)

```
/dev/sdb /mnt/usbstick vfat sync,user 0 0
```

and mount returns

```
/dev/sdb on /mnt/usbstick type vfat (rw,noexec,nosuid,nodev,sync,user=jonm)
```

if your devices are more variable than that, then perhaps udev rules?

PS, I've found !no! documentation of kdemediamanager....grrr

----------

## coolsnowmen

EVEN MORE...........

Im running kde 3.5.2

there is a program called kwikdisk, which looks like it will let you set custom mount commands

----------

## mackerel

Thanks coolsnowmen

I have been trying to find out why I could not write to my usb drives, sync option does the trick

----------

## dave_deu

The comments are interesting. I will stick to the default async option for the time being, until the sync option becomes as fast as async for file transfer....

----------

## coolsnowmen

They will never be as fast.

Sync transfer means wait until the operation is finished.

Async means do it at your own leasure.  

These are COMPLETELY different.

Sync is safer because it happens NOW, but depending on how you do it you might after to wait for it.

Async "appears faster" but in reality its VERY unsafe if a system crashes, and ever less safe for removable devices.

----------

