Linux - Hardware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
08-12-2008, 11:40 AM
|
#1
|
LQ Newbie
Registered: Jul 2008
Posts: 19
Rep:
|
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??
TIA for any help
|
|
|
08-12-2008, 01:23 PM
|
#2
|
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853
Rep:
|
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.
|
|
|
08-12-2008, 01:35 PM
|
#3
|
LQ Newbie
Registered: Jul 2008
Posts: 19
Original Poster
Rep:
|
Would you mind sharing the script? I'd like to give it a shot
|
|
|
08-12-2008, 01:48 PM
|
#4
|
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853
Rep:
|
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.
|
|
|
08-12-2008, 02:16 PM
|
#5
|
LQ Newbie
Registered: Jul 2008
Posts: 19
Original Poster
Rep:
|
Thanks a lot indienick, that would be greatly appreciated!!
|
|
|
08-15-2008, 10:54 AM
|
#6
|
LQ Newbie
Registered: Jul 2008
Posts: 19
Original Poster
Rep:
|
Hmm, indienick?
Or anyone else?
|
|
|
08-15-2008, 11:04 AM
|
#7
|
LQ Newbie
Registered: May 2008
Posts: 4
Rep:
|
I'd love to see this script as well.
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.
|
|
|
08-16-2008, 01:32 AM
|
#8
|
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853
Rep:
|
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.)
|
|
|
08-17-2008, 10:58 AM
|
#9
|
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853
Rep:
|
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.
Last edited by indienick; 08-18-2008 at 07:43 AM.
|
|
|
08-17-2008, 11:16 AM
|
#10
|
LQ Newbie
Registered: May 2008
Posts: 4
Rep:
|
Sweet! I'll give it a try, thanks for the reference...
|
|
|
08-19-2008, 05:19 PM
|
#11
|
LQ Newbie
Registered: Jul 2008
Posts: 19
Original Poster
Rep:
|
No sweat indienick!
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.
|
|
|
08-19-2008, 05:39 PM
|
#12
|
LQ Newbie
Registered: May 2008
Posts: 4
Rep:
|
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...
|
|
|
08-21-2008, 11:39 PM
|
#13
|
LQ Newbie
Registered: Jul 2008
Posts: 19
Original Poster
Rep:
|
How do I get the UUID of my disk/partition?? I'd like to try that second entry for my ext3 drive. Thanks Caleb
|
|
|
08-22-2008, 07:57 AM
|
#14
|
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853
Rep:
|
I believe you can get it if you run:
|
|
|
01-19-2009, 11:25 AM
|
#15
|
LQ Newbie
Registered: Jan 2009
Posts: 16
Rep:
|
i got the volume id for the ext4 backup partition using sudo vol_id /dev/sdb5
then i created the /etc/fstab entry and substituted ext4 in place of ext3 where the example here was earlier, as follows:
UUID=404ae123-6ee1-43f9-b6fb-0f0e0d66411b /media/seagate ext4 users,atime,rw,nodev,noexec,nosuid 0 0
i rebooted
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 ?
|
|
|
All times are GMT -5. The time now is 11:37 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|