hotplug II / mdev discussion and implementation

Unfortunately, I have only very limited resources at the moment...

It would be interesting to see the log produced during umount and detachment. How did you unmount the partitions/stick?

I have noticed that some usb hubs require an active power supply: it seems as if the internal power of the 7270 is a little slow/weak.
 
I used the normal linux commands in ssh shell for unmounting the stick.
Code:
umount /dev/sda1
umount /dev/sda2
swapoff /dev/sda3

There were no special syslog entries except these:
Code:
Nov 13 22:51:37 fritz local0.info mdevmodule[6601]: remove module chain sg sd_mod
Nov 13 22:51:45 fritz local0.info usbcontrol[6617]: remove 1-1  
Nov 13 22:51:45 fritz local0.info usbcontrol[6617]: 1-1 usb hub device
 
What happens when you eject the usb device(s) using the avm web front-end?
 
nearly the same with some syslog entries, but the directories still exist after unmount.
Example for USB-disk (now with 3 partitions).
Mount:
Code:
Nov 15 18:11:14 fritz local0.info usbcontrol[2217]: add 1-1
Nov 15 18:11:14 fritz local0.info usbcontrol[2217]: 1-1 transparent scsi mass storage device
Nov 15 18:11:14 fritz local0.info mdevmodule[2239]: add module chain sd_mod sg
Nov 15 18:11:20 fritz local0.info partition[2287]: created mount point '/var/media/ftp/uStora2'
Nov 15 18:11:20 fritz local0.info partition[2287]: starting e2fsck on '/dev/sda2'
Nov 15 18:11:20 fritz local0.info partition[2279]: swap activated on '/dev/sda3'
Nov 15 18:11:21 fritz local0.info partition[2273]: created mount point '/var/media/ftp/uStora1'
Nov 15 18:11:22 fritz local0.info partition[2273]: mounted '/dev/sda1' on '/var/media/ftp/uStora1' with 'rw,uid=1000,gid=0,fmask=0000,dmask=0000'
Nov 15 18:11:22 fritz local0.info partition[2287]: /dev/sda2: clean, 1802/7561216 files, 295475/30214248 blocks
Nov 15 18:11:22 fritz local0.info partition[2273]: not starting any services on '/var/media/ftp/uStora1'
Nov 15 18:11:22 fritz local0.info partition[2287]: mounted '/dev/sda2' on '/var/media/ftp/uStora2' with 'noatime,nodiratime'
Nov 15 18:11:22 fritz local0.info partition[2287]: not starting any services on '/var/media/ftp/uStora2'
Unmount via AVM-Web-IF:
Code:
Nov 15 19:33:15 fritz local0.info storage[3834]: user swapoff 'uStora3/swap'
Nov 15 19:33:15 fritz local0.info storage[3827]: user umount '/var/media/ftp/uStora2'
Nov 15 19:33:15 fritz local0.info storage[3831]: user umount '/var/media/ftp/uStora1'
Remaining directories:
Code:
/var/mod/root # ls -l /var/media/ftp/
drwxr-xr-x    2 root     root            0 Nov 15 18:11 uStora1
drwxr-xr-x    2 root     root            0 Nov 15 18:11 uStora2
 
Code:
 1044 root      1212 S    -/bin/sh
 1107 root         0 SW<  [scsi_eh_0]
 1108 root         0 SW<  [usb-storage]
 1132 root      1192 S <  /sbin/mdev block
 1134 root      1192 S <  sh -c /lib/mdev/block/partition
 1135 root      1208 S <  /bin/sh /lib/mdev/block/partition
 1201 root      1208 S <  /bin/sh /lib/mdev/block/partition
 1203 root      1188 S <  logger -t partition[1135] -p local0.error
 1276 root      1192 R    ps
MfG Oliver

When I comment (#) the sleep loop that waits for rc.S to finish, then no such unfinished sh scripts occur in the process list. Could this be the source of the problem?
The wait loop seems a quick and dirty fix for a problem that I do not have to consider (I have the FB WLAN disabled).

Code:
/lib/mdev/block/mount::
mount_service () {
	# having problems while booting w/ wlan on
#	while pidof rc.S >/dev/null; do
#		usleep 200000
#	done
 
Hi.
Good hint. "cat /dev/debug &" is shown as "...rc.S" in process list since we enabled busybox no_exec applets.

Regards
Oliver
 
Hi.
Good hint. "cat /dev/debug &" is shown as "...rc.S" in process list since we enabled busybox no_exec applets.

So what should we do? Change rc.S or use a different condition to wait for in the /lib/mdev/block/mount script to make sure that WLAN has been properly initialised (because that is what the comment in the script suggests as the pupose of the wait loop)?

BTW.
Any potentially indefinite wait for a condition in an event driven system such as hotplug is a cause for problems and should thus be avoided.
That rc.S does not finish could be regarded a bug in itself.
 
If rc.S doesn't finish, itis a serious bug. But in this case another process started by rc.S is displayed as rc.S. That is something different.

It might be possible to force a new exec() and therefor a new process name by calling /bin/cat insted of cat.
 
can you make mdev to work with mini_fo or usbroot?
 
Kann jemand von den Beteiligten hier eine kurze Zusammenfassung zu diesem Thema geben:
1. Was ist bereits realisiert und was geht definitiv
2. Welche Probleme gibt es noch, was ist noch zu tun
3. Ob mdev in irgendeiner Form/Version bereits im trunk ist
4. Welche Patches und Binaries braucht man? Es gab einiges im Posting 1, dann noch 2-3 Einsätze über die 100 Postimgs verstreut
5. Wird hier dran noch gearbeitet oder gibt es Alternativen?

Ich habe zwar fleißig 100 Postings überflogen, aber wirklich schlau bin ich davon nicht geworden.

MfG
 
herman: zu 3: Ja.
4: Siehe menuconfig. mdev ist unter unstable inzwischen, denn dort hab ich es hingeschoben, weil:
5: anscheinend nein.
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.