From: Wout Mertens <wmertens@cisco.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Working on a usb-storage hotplug script
Date: Tue, 09 Dec 2003 09:05:29 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-107096092025626@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-107006883203516@msgid-missing>
Hi,
I was wondering what the current state of auto-mount-inserted-devices
is.
I posted my script which is run as a hotplug agent for storage some time
ago, someone else had one along the same lines, Mandrake uses devfsd to
call their configuration scripts and the fstab editor, Lindows has
something, Suse as well, there is the vold project which uses polling, ...
It sometimes seems that everyone and their brother has their own
solution :(
Is there some standardized way of solving this in the works? Perhaps
based on sysfs?
Issues I know of hotplug-automounting in the 2.4 world:
- When run by usb.agent, you need to have a different name than the
kernel module usb-storage, because otherwise you only get called when
that module isn't loaded.
- When run by usb.agent, you don't know what the device is that sd_mod
made out of it. You need to either check all attached devices or do
some creative grepping on the serial number and hope that the device
is unique at this point in time.
- When run by devfsd, you only get called when sd_mod is loaded. If it
doesn't get loaded for some reason, you don't get called.
- sd_mod is very bad about detecting when a device has gone or replaced
by another. You need to kick it with something like "dd if=<device>
of=/dev/null bsQ2 count=1" for it to see new partition layouts. This
can be done from devfsd though. Can it be done from udev?
- If you don't use supermount to mount the devices, unplugging them
without closing all filedescriptors (including standing in subdirs)
makes the kernel upset, and you have to umount -l or -f. Only,
supermount is a hack that changes Unix semantics :(.
Comments?
Wout.
Nov 30, an infinite number of monkeys worshipping Greg KH pounded out:
> On Fri, Nov 28, 2003 at 05:19:30PM -0800, Martin wrote:
> > I recently got my first USB flash drive - I have one on loan from work,
> > but I finally OWN one, so I am motivated to do something with it now.
> > One of the things I want to have working is hotplugging, with automatic
> > mounting. The device it's mounted on doesn't matter so much but one of
> > the absolutely mandatory requirements is that I not need a fstab entry.
> > This became a requirement when I noticed that plugging the device in,
> > then unplugging it, then plugging it BACK in resulted in it being
> > attached first to sdc and then to sdd. (This is a SCSI system.)
>
> Have you looked at devlabel? It should solve your problem for you.
>
> thanks,
>
> greg k-h
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> 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
>
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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
next prev parent reply other threads:[~2003-12-09 9:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-29 1:19 Working on a usb-storage hotplug script Martin
2003-11-29 12:33 ` reflex
2003-11-29 14:06 ` Oliver Neukum
2003-11-29 18:05 ` Marco d'Itri
2003-11-30 11:19 ` reflex
2003-11-30 19:38 ` Greg KH
2003-12-09 9:05 ` Wout Mertens [this message]
2003-12-09 16:09 ` Olaf Hering
2003-12-09 16:24 ` Greg KH
2003-12-10 19:29 ` Wout Mertens
2003-12-10 19:41 ` Wout Mertens
2003-12-10 19:49 ` Olaf Hering
2003-12-11 15:37 ` Wout Mertens
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=marc-linux-hotplug-107096092025626@msgid-missing \
--to=wmertens@cisco.com \
--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).