From: Nico Schottelius <nico-kernel@schottelius.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: linux-hotplug-devel@lists.sourceforge.net
Subject: udev/modprobe issue
Date: Thu, 29 Sep 2005 07:41:40 +0000 [thread overview]
Message-ID: <20050929074140.GD2886@schottelius.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2255 bytes --]
Good morning everybody!
I've a small problem with loading the sata_sil module, but it could be a
general issue: We use this sata-kontroller with sata-harddisks to backup
our systems. The harddisk is exchanged (while the system is running) every
day. So we load/unload sata_sil in our backup scripts, so 'hotplugging' is possible.
My problem is, that modprobe returns earlier than the attached device is usable:
----------------------------------------------------------------------
srwali01:/# modprobe sata_sil; mount /dev/sda1 /mnt/hdbackup/
mount: you must specify the filesystem type
srwali01:/# rmmod sata_sil
srwali01:/# modprobe sata_sil; ls -l /dev/sda1
ls: /dev/sda1: No such file or directory
----------------------------------------------------------------------
So I have to do
----------------------------------------------------------------------
srwali01:/# modprobe sata_sil
srwali01:/# sleep 2
srwali01:/# mount /dev/sda1 /mnt/hdbackup
----------------------------------------------------------------------
The problem is most likely that udev is too slow or that modprobe does not
know/wait for udev:
----------------------------------------------------------------------
srwali01:/# mount | grep tmpfs | grep -v /dev/shm
tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
srwali01:/# cat /proc/sys/kernel/hotplug
/sbin/udevsend
----------------------------------------------------------------------
My questions:
- Should modprobe wait for whatever current hotplug is so that
the system can definitly use the device after modprobe?
- Or should there be a command-line switch to modprobe to tell it to wait
for hotplug?
- Is the 'wait for hotplug'-idea possible to do or would it have to be a dirty
hack in the kernel?
- Is there clean solution to wait exactly as long as
it needs to load sata_sil and create /dev/sda*?
Using while+ls monitoring /dev/sda* is not a solution imho.
Greetings,
Nico
P.S.: Sorry for crossposting, I am not really sure which list would have been
the correct one to ask.
--
Latest project: cconfig (http://nico.schotteli.us/papers/linux/cconfig/)
Open Source nutures open minds and free, creative developers.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Nico Schottelius <nico-kernel@schottelius.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: linux-hotplug-devel@lists.sourceforge.net
Subject: udev/modprobe issue
Date: Thu, 29 Sep 2005 09:41:40 +0200 [thread overview]
Message-ID: <20050929074140.GD2886@schottelius.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2255 bytes --]
Good morning everybody!
I've a small problem with loading the sata_sil module, but it could be a
general issue: We use this sata-kontroller with sata-harddisks to backup
our systems. The harddisk is exchanged (while the system is running) every
day. So we load/unload sata_sil in our backup scripts, so 'hotplugging' is possible.
My problem is, that modprobe returns earlier than the attached device is usable:
----------------------------------------------------------------------
srwali01:/# modprobe sata_sil; mount /dev/sda1 /mnt/hdbackup/
mount: you must specify the filesystem type
srwali01:/# rmmod sata_sil
srwali01:/# modprobe sata_sil; ls -l /dev/sda1
ls: /dev/sda1: No such file or directory
----------------------------------------------------------------------
So I have to do
----------------------------------------------------------------------
srwali01:/# modprobe sata_sil
srwali01:/# sleep 2
srwali01:/# mount /dev/sda1 /mnt/hdbackup
----------------------------------------------------------------------
The problem is most likely that udev is too slow or that modprobe does not
know/wait for udev:
----------------------------------------------------------------------
srwali01:/# mount | grep tmpfs | grep -v /dev/shm
tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
srwali01:/# cat /proc/sys/kernel/hotplug
/sbin/udevsend
----------------------------------------------------------------------
My questions:
- Should modprobe wait for whatever current hotplug is so that
the system can definitly use the device after modprobe?
- Or should there be a command-line switch to modprobe to tell it to wait
for hotplug?
- Is the 'wait for hotplug'-idea possible to do or would it have to be a dirty
hack in the kernel?
- Is there clean solution to wait exactly as long as
it needs to load sata_sil and create /dev/sda*?
Using while+ls monitoring /dev/sda* is not a solution imho.
Greetings,
Nico
P.S.: Sorry for crossposting, I am not really sure which list would have been
the correct one to ask.
--
Latest project: cconfig (http://nico.schotteli.us/papers/linux/cconfig/)
Open Source nutures open minds and free, creative developers.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
next reply other threads:[~2005-09-29 7:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-29 7:41 Nico Schottelius [this message]
2005-09-29 7:41 ` udev/modprobe issue Nico Schottelius
2005-09-30 17:12 ` Kay Sievers
2005-10-02 22:05 ` Nico -telmich- Schottelius
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=20050929074140.GD2886@schottelius.org \
--to=nico-kernel@schottelius.org \
--cc=linux-hotplug-devel@lists.sourceforge.net \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.