How to have external eSATA drive auto mount on plug-in??
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to have external eSATA drive auto mount on plug-in??
I have a SATA drive in an external enclosure connected via eSATA. The same device I plug in with USB works just fine, mounts up automatically and unmounts no prob. (I use thunar and HAL with thunar-volman on a plain fluxbox session).
I'm wondering how or if it's even possible to have the drive behave the same way when plugged in via eSATA, or if I have to add an fstab entry??
I apologize, because my post isn't going to be much help, but I recently wrote a script for my work (in Python) that uses DBUS (and HAL) to watch for a drive with a specific volume name to get plugged in, and then automagically mounts it when it is ready.
My only suggestion is to look into HAL's rule definitions for handling drives.
I would, except I can't divulge the script due to non-distribution clauses in my employment agreement; not to mention, there are too many work-specific things within the script. I'll re-write a bare-bones version when I get home.
I've been trying to mount my externals to specific locations for awhile. The only answer I've found is using the UUID of the drive and creating a static entry for it in FSTAB, but then it doesn't automatically mount when plugged... you have to hit it with a command line.
Sorry for the lack of sending any scripts; I've been terribly busy at work (double-duty as a machinist and mechanical engineer) and I've either been at work, or sleeping.
I'll be sure to email both of your when I have the script ready.
(I'll post it here as well.)
I do apologize, but I just do not have the time, currently, to re-write this script. Here's a link to the dbus-python bindings I used. If you haven't programmed in Python before, it's shockingly easy (perhaps the easiest programming language to learn I've ever seen). I used that tutorial when I was writing the original script for my work; just as a vote of confidence in your abilities, I do not program in Python unless specifically asked to, not because I don't think it's a good language (I think it's a sweet language), but because I have a focus on Common Lisp and Java.
My drive actually does automount with eSATA, but it does not show in the thunar side pane (with all other volumes/mounted drives as icons). What I'm going to do is try and make a little zenity script with a pop-up question to unmount/mount the drive and bind the script to a keybinding in flux's keys file.
This may or may not help your situation, but I did figure out the settings I needed for FSTAB... It was as simple as creating these entries:
LABEL=Muzick /media/muzick ntfs-3g uid=1000,gid=0,rw,users 0 0
~ My NTFS drive that is a music archive
UUID=61bfb982-a349-4269-8bec-8a941036ae1a /media/dropbox ext2 users,atime,rw,nodev,noexec,nosuid 0 0
~ An ext2 drive that is for backup
The drives will consistently mount to those locations, with the edition of the "users" attribute and the "uid=1000" (my uid) allowed them to be automagically mounted and handled through Konqueror. I would assume you could bookmark the static folders of the mount location and access them through Thunar the same way...
noticed there was no "seagate" directory inside of /media so i
sudo mkdir /media/seagate
some reason, i still don't get a external esata auto mount icon in gnone. fdisk -l sees it fine so does sudo vol_id and i've double checked the UUID. any ideas ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.