linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Robinson <awrobinson@cox.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: Problem mounting USB external drive
Date: Mon, 03 May 2004 21:26:00 +0000	[thread overview]
Message-ID: <4096B8E8.8070707@cox.net> (raw)
In-Reply-To: <4095D3FA.8060606@cox.net>

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

      parent reply	other threads:[~2004-05-03 21:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4096B8E8.8070707@cox.net \
    --to=awrobinson@cox.net \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).