On Wednesday 26 August 2009 08:13:06 pm Rodney Baker wrote:
Never mind - found the answer with a custom udev rule and appropriate options in /etc/fstab. They now automount when plugged in and can be unmounted via the device-notifier if necessary.
For those interested, here is a new file that I created as /etc/udev/rules.d/98-automount_usb.rules:
#run mount -a every time a block device is added/removed. SUBSYSTEM=="block",RUN+="/bin/mount -a"
The following rules in /etc/udev/rules.d/ create the symlinks in /dev/ for the 2 USB HDD's:
KERNEL=="sd*[0-9]",SYSFS{idVendor}=="152d",SYSFS{idProduct}=="2338",SYMLINK +="backup" KERNEL=="sd*[0-9]",SYSFS{idVendor}=="1058",SYSFS{idProduct}=="1003",SYMLIN K+="Elements"
Finally, the additional lines in /etc/fstab to specify the mount points:
/dev/backup /media/backup ext3 auto,defaults,users 1 2 /dev/Elements /media/Elements ext3 auto,,defaults,users 1 2
The "users" parameter is necessary to allow a user other than the one that mounted the drive (in this case it is either root or udev) to be able to unmount/eject it e.g. to allow safe removal.
Excellent Rodney, I don't know why the usb mounts just "stopped" working, but I have experienced similar problems. I'll give it a try. -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org