* Problem mounting USB external drive
@ 2004-05-03 5:09 Andrew Robinson
2004-05-03 5:38 ` Greg KH
2004-05-03 21:26 ` Andrew Robinson
0 siblings, 2 replies; 3+ messages in thread
From: Andrew Robinson @ 2004-05-03 5:09 UTC (permalink / raw)
To: linux-hotplug
I've got an external drive in a USB 2.0 enclosure that I would like to
have mounted when I plug it in. I'm running Fedora Core 1. I have
created an entry in /etc/updfstab.conf that successfully adds an entry
to the /etc/fstab and creates a mount point in /mnt. I can then mount
the drive from the CLI. Poking around the Fedora mailing list, the
answer to automated mounting seemed to lie in the
/etc/hotplug/usb/usb-storage script. I created the script and verified
that it was executed. However, updfstab does not seem to get run until
after usb-storage is completed. Hence, no automatic mount.
My question is this. What is the correct way within the hotplug
framework to get a hot-plugged drive to mount automatically?
If this is the wrong forum to ask this question, I apologize. Could
someone point me in the right direction to ask it.
Thanks!
Andrew Robinson
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_idÅ66&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem mounting USB external drive
2004-05-03 5:09 Problem mounting USB external drive Andrew Robinson
@ 2004-05-03 5:38 ` Greg KH
2004-05-03 21:26 ` Andrew Robinson
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2004-05-03 5:38 UTC (permalink / raw)
To: linux-hotplug
On Mon, May 03, 2004 at 12:09:14AM -0500, Andrew Robinson wrote:
>
> My question is this. What is the correct way within the hotplug
> framework to get a hot-plugged drive to mount automatically?
Use something like devlabel. It should handle it for you just fine.
Good luck,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_idÅ66&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem mounting USB external drive
2004-05-03 5:09 Problem mounting USB external drive Andrew Robinson
2004-05-03 5:38 ` Greg KH
@ 2004-05-03 21:26 ` Andrew Robinson
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Robinson @ 2004-05-03 21:26 UTC (permalink / raw)
To: linux-hotplug
Greg KH wrote:
> On Mon, May 03, 2004 at 12:09:14AM -0500, Andrew Robinson wrote:
>
>>My question is this. What is the correct way within the hotplug
>>framework to get a hot-plugged drive to mount automatically?
>
>
> Use something like devlabel. It should handle it for you just fine.
>
After studying the man page and playing with the program a bit, I cannot
figure out how to get devlabel to work for me. When I plug in the drive,
updfstab adds this entry to the /etc/fstab:
/dev/extdrive /mnt/extdrive auto noauto,owner,kudzu 0 0
That is based on this entry in the /etc/updfstab.conf file:
device extdrive {
match hd "WD800JB-00FMA0"
symlink true
}
The device symlink is this:
lrwxrwxrwx 1 root root 9 May 3 16:11 /dev/extdrive -> /dev/sda1
So to get a reference to the symlink in the fstab file, I have to
configure updfstab to create that link. When I try to add this entry to
devlabel, it complains that the symlink already exists. So I turned off
the drive and tried to add the entry to devlabel, and it complained that
the device file /dev/sda1 did not exist. The other way to add a devlabel
entry is by UUID, but this drive does not seem to have one. When I run
/usr/bin/partition_uuid /dev/sda1 (when /dev/sda1 exists), I get this
response:
partition_uuid: partition does not appear to have a UUID
When I run /usr/bin/scsi_unique_id against the device file, I get this
response:
model: WDC WD800JB-00FMA0
page83: No page83 information found.
page80: No page80 information found.
I could be missing something (I never underestimate my ability to screw
up), but it appears devlabel will not work for me in this instance. That
gets me back to my original problem. When I plug in this disk drive, I
get a valid entry in /etc/fstab. How do I mount that entry during the
hotplug sequence?
Thanks!
Andrew Robinson
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_idÅ66&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-03 21:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-03 5:09 Problem mounting USB external drive Andrew Robinson
2004-05-03 5:38 ` Greg KH
2004-05-03 21:26 ` Andrew Robinson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).