How would you like hotplugged USB drive mounting to work?
Folks: This is driving me bonkers. I tried editing my /etc/hotplug/hotplug.subfs.functions file to the way shown in Sjoerd's reply to my "Why does USB drive mount automagically?" thread. As anticipated, the result of this is that USB storage devices are no longer automounted, but then can only be mounted by root. This could be partially dealt with by adding a line in /etc/fstab, but this is not a good solution because the device name isn't guaranteed when using these USB hotplugged devices. Thus, I am curious to get some sort of feedback from you folks about how this *should* work. Here is what happens with the default 9.1 installed system: 1. User plugs in USB storage device. 2. KDE Konqueror window automatically pops up with display of device contents. A mount point in /media has been automatically generated. 3. When user is done, he tried to unmount by going to Konqueror's "devices" right clicking on the device, and selecting "unmount" to which the system complains that he is not root. 4. User unplugs device not knowing if the file buffer is flushed or not. 5. Window disappears. Mount point dir disappears. We hope all went well. The only real problem here is that Suse didn't allow the user to unmount the device. Here is my proposal for a well thought-out setup with some options for different user preferences instead of "Bill G. knows best how you shall compute" : OPTION 1 (fully automatic, but user unmountable): 1. User plugs in USB storage device. System automatically mounts device on automatically created mount point dir. 2. KDE Konqueror window automatically pops up pointed to the mount path with a display of device contents. 3. When user is done, he unmounts by going to Konqueror's "devices" right clicking on the device, and selecting "unmount". Alternatively the power user can umount it at the command prompt. 4. Window disappears. Mount point dir disappears. This setup is also KDE transparent. It should be an option in KDE that causes the Konq. window to appear or not. But the automounting and user manual unmounting will satisfy the non-KDE user as well. OPTION 2 (fully manual mounting, automatic mount point creation and /etc/fstab entry creation): 1. User plugs in USB storage device. System automatically creates mount point dir in /media, and adds a line to /etc/fstab to allow user to mount manually. 2. User can go to Konqueror's "devices," right click on the device, and select "mount". Contents of device may now be browsed and used as a normal part of the filesystem under /media/thingy_name 3. When user is done, he unmounts by going to Konqueror's "devices" right clicking on the device, and selecting "unmount". Alternatively the power user can umount it at the command prompt. 4. Mount point disappears. Other options anyone? My final points: 1. Suse didn't design handling of hotplugged storage devices very well. It is very close to being a good system, but the failure to allow users to unmount is an unfortunate oversight. 2. There are also inconsistencies in the whole user interface to these devices. In the 9.1 User Guide section on digital cameras it says a KDE icon shoud appear on the desktop when you plug in a USB camera. But a USB storage device pops a Konq. window ? Which way Suse? Please make up your mind and quit changing it with each version, or worse having different devices handled different ways. 3. Offer the ability to configure this stuff in Yast. We should at least be able to choose between options 1 and 2 described above. More fine grained configuration options would be even better. 4. There is no documentation on hotplug, Suseplugger, etc. Fortunately there is at least a manpage for submount. There should be a large chapter in the books about this stuff, explaining in detail how to make the system behave in exactly the way the user wants. THAT is what can make this thing better than the "competition". Input would be appreciated. Good day! -- ____________________________________ Christopher R. Carlen Principal Laser/Optical Technologist Sandia National Laboratories CA USA crcarle@sandia.gov
On Mon, May 24, 2004 at 02:17:17PM -0700, Chris Carlen wrote:
Folks:
This is driving me bonkers. I tried editing my /etc/hotplug/hotplug.subfs.functions file to the way shown in Sjoerd's reply to my "Why does USB drive mount automagically?" thread.
As anticipated, the result of this is that USB storage devices are no longer automounted, but then can only be mounted by root. This could be partially dealt with by adding a line in /etc/fstab, but this is not a good solution because the device name isn't guaranteed when using these USB hotplugged devices.
Thus, I am curious to get some sort of feedback from you folks about how this *should* work.
Here is what happens with the default 9.1 installed system:
1. User plugs in USB storage device. 2. KDE Konqueror window automatically pops up with display of device contents. A mount point in /media has been automatically generated. 3. When user is done, he tried to unmount by going to Konqueror's "devices" right clicking on the device, and selecting "unmount" to which the system complains that he is not root. 4. User unplugs device not knowing if the file buffer is flushed or not. 5. Window disappears. Mount point dir disappears.
We hope all went well. The only real problem here is that Suse didn't allow the user to unmount the device. Here is my proposal for a well thought-out setup with some options for different user preferences instead of "Bill G. knows best how you shall compute" :
The option for umounting is "Close Konqueror Window, Wait 5 seconds". Ciao, Marcus
On Monday 24 May 2004 17:21, Marcus Meissner wrote:
The option for umounting is "Close Konqueror Window, Wait 5 seconds".
Still the user will not be completely sure if it unmounted properly or not. Or what if it happens to take 7 seconds this time and the user unplugs it after waiting 5 seconds? Maybe have a message like Windows "It is now safe to unplug this device." Really the best is to let the user unmount, in my opinion. Bryan ******************************************************** Powered by SuSE Linux 8.2 Professional KDE 3.1.1 KMail 1.5.1 This is a Microsoft-free computer Bryan S. Tyson bryantyson@earthlink.net ********************************************************
On Monday 24 May 2004 23.17, Chris Carlen wrote:
4. User unplugs device not knowing if the file buffer is flushed or not.
I think you'll find that the writable media that are mounted by subfs are mounted with the option 'sync', meaning there is no buffering taking place. Everything is flushed when you write it. Otherwise I agree it would be dangerous to use
On Monday May 24 2004 5:28 pm, Anders Johansson wrote:
On Monday 24 May 2004 23.17, Chris Carlen wrote:
4. User unplugs device not knowing if the file buffer is flushed or not.
I think you'll find that the writable media that are mounted by subfs are mounted with the option 'sync', meaning there is no buffering taking place. Everything is flushed when you write it. Otherwise I agree it would be dangerous to use
You are correct, Anders. And, yes it is safe to use. Fred -- "The only secure Microsoft software is what's still shrink-wrapped in their warehouse..." (Forno)
Anders Johansson wrote:
On Monday 24 May 2004 23.17, Chris Carlen wrote:
4. User unplugs device not knowing if the file buffer is flushed or not.
I think you'll find that the writable media that are mounted by subfs are mounted with the option 'sync', meaning there is no buffering taking place. Everything is flushed when you write it. Otherwise I agree it would be dangerous to use
Yes, I see it is mounted with "sync" That is at least a plus. Still risky for large files, when an off moment of the "drive" LED might tell the user its Ok to pull the plug, but the system is just busy and plans to write more in a few more seconds. Maybe such a discontinuity can't happen though with sync. It seems reasonable that if one waits a few seconds after no activity, then it's safe. Would be nice to see a chapter on removables in the book, and some Yast options though. Thanks for the input. Good day! -- ____________________________________ Christopher R. Carlen Principal Laser/Optical Technologist Sandia National Laboratories CA USA crcarle@sandia.gov
Good call! I've also been trying to think of a way to do this also. Your 2 methods are good, but I'd like one more feature. Another level of inderection. The suse generated names that are less than user friendly. They seem to be unique. I assume that the name stays the same irrelevant to which port you connect to. ie. the name is unique to the device. So here my suggestion: Keep a relationship between the unique ids and mount points in a seperate file. This will allow the user to rename the mount point to something that is usefull to hime/her, like freecom for my freecom fw disk. In order to avoid changes to Konqueror I guess you need to offer the mount point renaming in yast? But here a question: In konqueror, under drives:/, if you right mouse click you got a "add new device menu", with a list of device types... What is this about? Jerry On Mon, 2004-05-24 at 23:17, Chris Carlen wrote:
Folks:
This is driving me bonkers. I tried editing my /etc/hotplug/hotplug.subfs.functions file to the way shown in Sjoerd's reply to my "Why does USB drive mount automagically?" thread.
As anticipated, the result of this is that USB storage devices are no longer automounted, but then can only be mounted by root. This could be partially dealt with by adding a line in /etc/fstab, but this is not a good solution because the device name isn't guaranteed when using these USB hotplugged devices.
Thus, I am curious to get some sort of feedback from you folks about how this *should* work.
Here is what happens with the default 9.1 installed system:
1. User plugs in USB storage device. 2. KDE Konqueror window automatically pops up with display of device contents. A mount point in /media has been automatically generated. 3. When user is done, he tried to unmount by going to Konqueror's "devices" right clicking on the device, and selecting "unmount" to which the system complains that he is not root. 4. User unplugs device not knowing if the file buffer is flushed or not. 5. Window disappears. Mount point dir disappears.
We hope all went well. The only real problem here is that Suse didn't allow the user to unmount the device. Here is my proposal for a well thought-out setup with some options for different user preferences instead of "Bill G. knows best how you shall compute" :
OPTION 1 (fully automatic, but user unmountable):
1. User plugs in USB storage device. System automatically mounts device on automatically created mount point dir. 2. KDE Konqueror window automatically pops up pointed to the mount path with a display of device contents. 3. When user is done, he unmounts by going to Konqueror's "devices" right clicking on the device, and selecting "unmount". Alternatively the power user can umount it at the command prompt. 4. Window disappears. Mount point dir disappears.
This setup is also KDE transparent. It should be an option in KDE that causes the Konq. window to appear or not. But the automounting and user manual unmounting will satisfy the non-KDE user as well.
OPTION 2 (fully manual mounting, automatic mount point creation and /etc/fstab entry creation):
1. User plugs in USB storage device. System automatically creates mount point dir in /media, and adds a line to /etc/fstab to allow user to mount manually. 2. User can go to Konqueror's "devices," right click on the device, and select "mount". Contents of device may now be browsed and used as a normal part of the filesystem under /media/thingy_name 3. When user is done, he unmounts by going to Konqueror's "devices" right clicking on the device, and selecting "unmount". Alternatively the power user can umount it at the command prompt. 4. Mount point disappears.
Other options anyone?
My final points:
1. Suse didn't design handling of hotplugged storage devices very well. It is very close to being a good system, but the failure to allow users to unmount is an unfortunate oversight.
2. There are also inconsistencies in the whole user interface to these devices. In the 9.1 User Guide section on digital cameras it says a KDE icon shoud appear on the desktop when you plug in a USB camera. But a USB storage device pops a Konq. window ?
Which way Suse? Please make up your mind and quit changing it with each version, or worse having different devices handled different ways.
3. Offer the ability to configure this stuff in Yast. We should at least be able to choose between options 1 and 2 described above. More fine grained configuration options would be even better.
4. There is no documentation on hotplug, Suseplugger, etc. Fortunately there is at least a manpage for submount. There should be a large chapter in the books about this stuff, explaining in detail how to make the system behave in exactly the way the user wants.
THAT is what can make this thing better than the "competition".
Input would be appreciated.
Good day!
-- ____________________________________ Christopher R. Carlen Principal Laser/Optical Technologist Sandia National Laboratories CA USA crcarle@sandia.gov
Tims Suse List wrote:
Other options anyone?
Can i suggest that the drive is user writeable?
I cannot copy or delete files of my Memory Stick.
Thanks
This is very peculiar. I can read and write mine. Can you plug your in, then show the text resulting from the commands:
mount
...
ls -l /media
...
cd /media ls -l
-- ____________________________________ Christopher R. Carlen Principal Laser/Optical Technologist Sandia National Laboratories CA USA crcarle@sandia.gov
On Tue, 2004-05-25 at 16:26, Chris Carlen wrote:
This is very peculiar. I can read and write mine. Can you plug your in, then show the text resulting from the commands:
mount
/dev/hda6 on / type reiserfs (rw,acl,user_xattr) proc on /proc type proc (rw) tmpfs on /dev/shm type tmpfs (rw) devpts on /dev/pts type devpts (rw,mode=0620,gid=5) /dev/hda1 on /windows/C type ntfs (ro,noexec,nosuid,nodev,gid=100,umask=0002,nls=utf8) /dev/hda2 on /windows/D type vfat (rw,noexec,nosuid,nodev,gid=100,umask=0002,iocharset=utf8) /dev/hdd on /media/cdrecorder type subfs (ro,nosuid,nodev,fs=cdfss,procuid,iocharset=utf8) /dev/hdc on /media/dvd type subfs (ro,nosuid,nodev,fs=cdfss,procuid,iocharset=utf8) /dev/fd0 on /media/floppy type subfs (rw,nosuid,nodev,sync,fs=floppyfss,procuid) usbfs on /proc/bus/usb type usbfs (rw) 192.168.0.2:/home/evolution on /home/tim/evolution type nfs (rw,addr=192.168.0.2) 192.168.0.2:/home/pictures on /home/tim/pictures type nfs (rw,addr=192.168.0.2) 192.168.0.2:/home/website on /home/tim/website type nfs (rw,addr=192.168.0.2) /dev/sdd1 on /media/usb-storage-681146645994:0:0:3p1 type subfs (rw,noexec,nosuid,nodev,sync,fs=floppyfss,procuid)
...
ls -l /media
total 5 drwxr-xr-x 6 root root 208 2004-05-25 17:14 . drwxr-xr-x 23 root root 568 2004-05-25 17:14 .. drwxrwxrwx 1 root root 0 2004-05-22 22:19 cdrecorder drwxrwxrwx 1 root root 0 2004-05-22 22:19 dvd drwxrwxrwx 1 root root 0 2004-05-22 22:19 floppy -rw-r--r-- 1 root root 402 2004-05-25 17:14 lsmedia.txt drwxrwxrwx 1 root root 0 2004-05-23 18:18 usb-storage-681146645994:0:0:3p1
...
cd /media ls -l
total 5 drwxr-xr-x 6 root root 208 2004-05-25 17:14 . drwxr-xr-x 23 root root 568 2004-05-25 17:14 .. drwxrwxrwx 1 root root 0 2004-05-22 22:19 cdrecorder drwxrwxrwx 1 root root 0 2004-05-22 22:19 dvd drwxrwxrwx 1 root root 0 2004-05-22 22:19 floppy -rw-r--r-- 1 root root 402 2004-05-25 17:14 lsmedia.txt drwxrwxrwx 1 root root 0 2004-05-23 18:18 usb-storage-681146645994:0:0:3p1
-- ____________________________________ Christopher R. Carlen Principal Laser/Optical Technologist Sandia National Laboratories CA USA crcarle@sandia.gov
Tims Suse List wrote:
On Tue, 2004-05-25 at 16:26, Chris Carlen wrote:
This is very peculiar. I can read and write mine. Can you plug your in, then show the text resulting from the commands:
ls -l /media
total 5 drwxr-xr-x 6 root root 208 2004-05-25 17:14 . drwxr-xr-x 23 root root 568 2004-05-25 17:14 .. drwxrwxrwx 1 root root 0 2004-05-22 22:19 cdrecorder drwxrwxrwx 1 root root 0 2004-05-22 22:19 dvd drwxrwxrwx 1 root root 0 2004-05-22 22:19 floppy -rw-r--r-- 1 root root 402 2004-05-25 17:14 lsmedia.txt drwxrwxrwx 1 root root 0 2004-05-23 18:18 usb-storage-681146645994:0:0:3p1
...
cd /media ls -l
total 5 drwxr-xr-x 6 root root 208 2004-05-25 17:14 . drwxr-xr-x 23 root root 568 2004-05-25 17:14 .. drwxrwxrwx 1 root root 0 2004-05-22 22:19 cdrecorder drwxrwxrwx 1 root root 0 2004-05-22 22:19 dvd drwxrwxrwx 1 root root 0 2004-05-22 22:19 floppy -rw-r--r-- 1 root root 402 2004-05-25 17:14 lsmedia.txt drwxrwxrwx 1 root root 0 2004-05-23 18:18 usb-storage-681146645994:0:0:3p1
Look at this, which I think is extremely strange, and different from yours: user1@mango2:~> l /media total 8 drwxr-xr-x 2 root root 4096 2004-05-12 10:19 cdrecorder drwxr-xr-x 2 root root 4096 2004-05-12 10:19 floppy drwxrwxrwx 1 root root 0 2004-05-24 13:28 usb-storage-odd-ProlificTechnologyInc-USBMassStorageDevice:0:0:0p1 user1@mango2:~> cd /media user1@mango2:/media> l total 32 drwxr-xr-x 5 root root 4096 2004-05-24 13:05 ./ drwxr-xr-x 21 root root 4096 2004-05-24 06:01 ../ drwxr-xr-x 2 root root 4096 2004-05-12 10:19 cdrecorder/ drwxr-xr-x 2 root root 4096 2004-05-12 10:19 floppy/ drwxr-xr-x 7 user1 users 8192 1969-12-31 16:00 usb-storage-odd-ProlificTechnologyInc-USBMassStorageDevice:0:0:0p1/ user1@mango2:/media> Notice that when I *log in* to the directory /media, that the ls shows different ownership for the device mount point than when I ls /media from somewhere else in the tree. I can't explain this. But it might not even be the real issue. Another thing to consider is whether you are actually the same userid (the *numerical uid* not the username associated with the uid) on the two different machines you are transfering from. cat /etc/passwd to see what your uids are. Just a possiblity. Good luck. -- ____________________________________ Christopher R. Carlen Principal Laser/Optical Technologist Sandia National Laboratories CA USA crcarle@sandia.gov
On Monday 24 May 2004 22:17, Chris Carlen wrote:
Folks:
Thus, I am curious to get some sort of feedback from you folks about how this *should* work.
No worse than it did before, i.e. the USB stuff that used to mount fine under 8.2 and 9.0 working right. As for the automatic / manual nature of the beast, I'm indifferent - but unbreaking whatever got broken would be a good idea. Scanners too.
-- Fergus Wilde Chetham's Library Long Millgate Manchester M3 1SB Tel: +44 161 834 7961 Fax: +44 161 839 5797 http://www.chethams.org.uk
participants (8)
-
Anders Johansson
-
Bryan Tyson
-
Chris Carlen
-
Fergus Wilde
-
Fred Miller
-
Jerome R. Westrick
-
Marcus Meissner
-
Tims Suse List