Hello,
when plugging in a USB device it is automounted, all good. however sometimes the mount point (e.g /media/usb-device) is not deleted, usually when there was no proper unmount. then when I insert the same device again it is mounted in a new mount point (e.g /media/usb-device-1)
my question is, is there a way to force using the same mount point even if the directory already exists?
Thanks in advance, YB.
On 10/18/2010 08:21 PM, Dj YB wrote:
my question is, is there a way to force using the same mount point even if the directory already exists?
You can add an entry in /etc/fstab file to specify a mount point.
Some possible complications here:
Do you want *one* particular device to be mounted at the same mount point all the time? Or do you want that *any* USB device be mounted at the same mount point?
If it's the former, add a line in /etc/fstab: /dev/disk/by-label/<label> /media/usb-device auto defaults,user,noauto 0 0
If it's the latter, then if you have two USB devices plugged in, where should they be mounted?
Syam
On Tuesday October 19 2010 03:13:16 Sonic wrote:
On 10/18/2010 08:21 PM, Dj YB wrote:
my question is, is there a way to force using the same mount point even if the directory already exists?
You can add an entry in /etc/fstab file to specify a mount point.
Some possible complications here:
Do you want *one* particular device to be mounted at the same mount point all the time? Or do you want that *any* USB device be mounted at the same mount point?
any USB device.
If it's the former, add a line in /etc/fstab: /dev/disk/by-label/<label> /media/usb-device auto defaults,user,noauto 0 0
can this be used for automount? , usually the devices are disconnected.
If it's the latter, then if you have two USB devices plugged in, where should they be mounted?
Each USB device have unique partitions labels, so should not be a problem.
Thanks, YB.
On 10/19/2010 11:57 AM, Dj YB wrote:
On Tuesday October 19 2010 03:13:16 Sonic wrote:
Do you want *one* particular device to be mounted at the same mount point all the time? Or do you want that *any* USB device be mounted at the same mount point?
any USB device.
If it's the former, add a line in /etc/fstab: /dev/disk/by-label/<label> /media/usb-device auto defaults,user,noauto 0 0
can this be used for automount? , usually the devices are disconnected.
If you don't have noauto option, then you'll get boot-time mount fail messages if the devices are not connected. Is that good?
If it's the latter, then if you have two USB devices plugged in, where should they be mounted?
Each USB device have unique partitions labels, so should not be a problem.
No.. You said you want all USB devices to be mounted to the same mount point. Then if two devices are connected simultaneously, how will they be mounted?
Syam
On Wednesday October 20 2010 03:36:46 Sonic wrote:
On 10/19/2010 11:57 AM, Dj YB wrote:
On Tuesday October 19 2010 03:13:16 Sonic wrote:
Do you want *one* particular device to be mounted at the same mount point all the time? Or do you want that *any* USB device be mounted at the same mount point?
any USB device.
If it's the former, add a line in /etc/fstab: /dev/disk/by-label/<label> /media/usb-device auto defaults,user,noauto 0 0
can this be used for automount? , usually the devices are disconnected.
If you don't have noauto option, then you'll get boot-time mount fail messages if the device are not connected. Is that good?
as long as it will automount upon connection, and won't require "mount -a" or the like.
If it's the latter, then if you have two USB devices plugged in, where should they be mounted?
Each USB device have unique partitions labels, so should not be a problem.
No.. You said you want all USB devices to be mounted to the same mount point. Then if two devices are connected simultaneously, how will they be mounted?
sorry for the misunderstanding. the same mount point they automount now. /media/PARTITION-LABEL
On 10/20/2010 11:36 AM, Dj YB wrote:
No.. You said you want all USB devices to be mounted to the same mount point. Then if two devices are connected simultaneously, how will they be mounted?
sorry for the misunderstanding. the same mount point they automount now. /media/PARTITION-LABEL
In that case, you don't need an fstab entry. Open KDE System Settings > Removable Devices. Select 'Enable automatic mounting of removable media' Select the sub-entries you find necessary and add any device specific exceptions in the list below.
Syam
On Wednesday October 20 2010 14:03:31 Sonic wrote:
On 10/20/2010 11:36 AM, Dj YB wrote:
sorry for the misunderstanding. the same mount point they automount now. /media/PARTITION-LABEL
In that case, you don't need an fstab entry. Open KDE System Settings > Removable Devices. Select 'Enable automatic mounting of removable media' Select the sub-entries you find necessary and add any device specific exceptions in the list below.
that is already configured that way, the problem arise when there is an abnormal disconnection and the mount point is not deleted. resulting in the need to create a new mount point next time. for example: inserting usb device YB-PORTABLE and disconnecting abnormally (e.g. system crash) the mount point /media/YB-PORTABLE remain. reconnecting usb device a new mount point will be created /media/YB-PORTABLE-1 this is not good since all links point to /media/YB-PORTABLE/
I hope that is more clear now,
Thanks again, YB.
On Wed, 2010-10-20 at 17:40 +0200, Dj YB wrote:
On Wednesday October 20 2010 14:03:31 Sonic wrote:
On 10/20/2010 11:36 AM, Dj YB wrote:
sorry for the misunderstanding. the same mount point they automount now. /media/PARTITION-LABEL
In that case, you don't need an fstab entry. Open KDE System Settings > Removable Devices. Select 'Enable automatic mounting of removable media' Select the sub-entries you find necessary and add any device specific exceptions in the list below.
that is already configured that way, the problem arise when there is an abnormal disconnection and the mount point is not deleted. resulting in the need to create a new mount point next time. for example: inserting usb device YB-PORTABLE and disconnecting abnormally (e.g. system crash) the mount point /media/YB-PORTABLE remain. reconnecting usb device a new mount point will be created /media/YB-PORTABLE-1 this is not good since all links point to /media/YB-PORTABLE/
I have the same problem from time to time, though the circumstances are not completely clear, i.e. I work a lot with a pendrive and am always very careful to mount/umount (via the Device Manager, and watching the confirmation icon in the panel when unmounting). Nevertheless, every once in a while the unmount seems to leave an undeleted mount point behind, as you say. Furthermore, the mountpoint can't be deleted even by root as the system seems to think it's still busy. Using 'fuser' shows no active processes holding it open, but I've found that logging out will enable root to delete the mountpoint.
Something makes me think this is all GVFS's fault, but maybe I have a suspicious mind. In any case, it's a PITA.
poc
On Thursday October 21 2010 02:07:09 Patrick O'Callaghan wrote:
On Wed, 2010-10-20 at 17:40 +0200, Dj YB wrote:
On Wednesday October 20 2010 14:03:31 Sonic wrote:
On 10/20/2010 11:36 AM, Dj YB wrote:
[...]
I have the same problem from time to time, though the circumstances are not completely clear, i.e. I work a lot with a pendrive and am always very careful to mount/umount (via the Device Manager, and watching the confirmation icon in the panel when unmounting). Nevertheless, every once in a while the unmount seems to leave an undeleted mount point behind, as you say. Furthermore, the mountpoint can't be deleted even by root as the system seems to think it's still busy. Using 'fuser' shows no active processes holding it open, but I've found that logging out will enable root to delete the mountpoint.
I have no problem deleting as root the old mount point.
[...]
Regards, YB.