[Eisfair_dev] USBIP 2.0.1 cool!
Thomas Bork
tom at eisfair.org
Di Okt 14 11:18:21 CEST 2014
Am 13.10.2014 um 22:38 schrieb Alex Busam:
> habe eine neue VM namens "eis_isdn" eingerichtet, dort eis, usbip
> installiert, das usb-device meiner Fritz Card USB 2.1 dran gebunden.
> Dann in der Konfig usbip das device exportiert. Und auf meinem eis als
> import-uspip eingerichtet.
> Wenn ich "List remote device available to import" ausführe, die IP
> eingebe, dann erscheint auch der importierbare Controller korrekt.
Zeige die Ausgabe von
/etc/init.d/usbip status
auf Server und Client.
> Jetzt beschwert sich der eis aber über eine nicht laufende CAPI. Ich
> habe das so verstanden, dass auf dem client capi genauso konfiguriert
> sein muss wie bei direktangeschlossener Hardware. Also capi=yes, in
> meinem Fall capi_use_fritz_usb21=yes.
> Bei list installed controllers der capi werden aber keine gefunden.
> Meldung: capi not installed - success (0)
> Mmmmmh.....wo ist mein Denkfehler? Und auf dem eis_isdn brauche ich
> keinen Fritz-treiber, oder?
Ich denke: Nein.
Beispiel mit einem USB-Stick (Treiber usb-storage):
Bisher lade ich die Treiber usb-storage und usblp im init-Skript von
usbip. Ich kommentiere das jetzt mal sowohl auf Server als auch Client
in /etc/init.d/usbip aus:
do_load_usbipmods ()
{
if ! modprobe -c | grep -q 'usbip'
then
boot_mesg " Cannot find usbip modules, don't starting usbip!"
echo_failure
exit 0
fi
# modprobe usb-storage
modprobe usbip-core
modprobe usbip-host
modprobe vhci-hcd
# modprobe usblp
sleep 1
}
Nun exportiere ich den USB-Stick auf dem Server (Name 'alsa') und
imortiere ihn auf dem Client (Name 'samba').
Server alsa:
============
alsa # rmmod usb-storage
alsa # rmmod usblp
alsa # /etc/init.d/usbip restart
* Stopping usbip ...
Unbind local busid 1-1 complete.
[ OK ]
- Stopping usbipd ...
[ OK ]
* Starting usbip ...
- Starting usbipd ...
[ OK ]
Bind local usbid 0951:1600 to busid 1-1 complete.
[ OK ]
alsa # lsmod | grep usb
usbip_host 10042 0
usbip_core 3823 2 vhci_hcd,usbip_host
usbhid 18283 0
hid 34648 1 usbhid
usbcore 94102 8
vhci_hcd,usbip_host,usbhid,xhci_hcd,ohci_hcd,uhci_hcd,ehci_hcd
usb_common 566 1 usbcore
alsa # /etc/init.d/usbip status
Checking status of usbip ...
usbipd is running.
Available busids (hub and usbhid filtered out):
busid=1-1 usbid=0951:1600 1-1:1.0=usbip-host
Es ist also kein Treiber für die Hardware auf dem Server alsa geladen.
Der Treiber usbip-host bedient das exportierte Device.
Client samba:
=============
samba # rmmod usb-storage
samba # rmmod usblp
samba # /etc/init.d/usbip restart
* Stopping usbip ...
usbipd is not running.
[ WARN ]
* Starting usbip ...
- Starting usbipd ...
[ OK ]
Attaching remote busid 1-1 on 192.168.0.31 to port 0 ...
[ OK ]
samba # lsmod | grep usb
usbip_host 10062 0
usbip_core 3785 2 vhci_hcd,usbip_host
usbhid 18283 0
hid 34648 1 usbhid
usbcore 94102 8
vhci_hcd,usbip_host,usbhid,xhci_hcd,ohci_hcd,uhci_hcd,ehci_hcd
usb_common 566 2 vhci_hcd,usbcore
samba # /etc/init.d/usbip status
Checking status of usbip ...
usbipd is running.
Available busids (hub and usbhid filtered out):
busid=3-1 usbid=0951:1600 3-1:1.0=unknown
Auf dem Client bedient kein Treiber das importierte Device (usb-storage
ist nicht geladen, also 'unknown'). Somit ist der USB-Stick nicht
benutzbar, es ist nur die interne Festplatte da:
samba # sfdisk -l
Disk /dev/sda: 522 cylinders, 255 heads, 63 sectors/track
sfdisk: Warning: The partition table looks like it was made
for C/H/S=*/43/32 (instead of 522/255/63).
For this listing I'll assume that geometry.
Units: cylinders of 704512 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 0+ 6096- 6097- 4194303+ ee GPT
sfdisk: end: (c,h,s) expected (1023,42,32) found (522,42,32)
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
Sobald ich aber usb-storage lade, ändert sich das Bild:
samba # modprobe usb-storage
samba # /etc/init.d/usbip status
Checking status of usbip ...
usbipd is running.
Available busids (hub and usbhid filtered out):
busid=3-1 usbid=0951:1600 3-1:1.0=usb-storage
usb-storage bedient das importierte Gerät und der USB-Stick ist zu sehen:
samba # sfdisk -l
Disk /dev/sda: 522 cylinders, 255 heads, 63 sectors/track
sfdisk: Warning: The partition table looks like it was made
for C/H/S=*/43/32 (instead of 522/255/63).
For this listing I'll assume that geometry.
Units: cylinders of 704512 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 0+ 6096- 6097- 4194303+ ee GPT
sfdisk: end: (c,h,s) expected (1023,42,32) found (522,42,32)
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
Disk /dev/sdb: 125 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdb1 0+ 124 125- 1004031 b W95 FAT32
/dev/sdb2 0 - 0 0 0 Empty
/dev/sdb3 0 - 0 0 0 Empty
/dev/sdb4 0 - 0 0 0 Empty
Ich kann sdb1 mounten und damit arbeiten, als wäre der USB-Stick am
Client samba direkt angeschlossen. Ein Treiber ist nur an samba geladen
und nicht an alsa.
Quintessenz:
Möglicherweise muss also die Initialisierung der capi und des Treibers
auf dem Client laufen, _nachdem_ usbip das Gerät importiert hat.
Wann wird die capi gestartet? usbip startet mit 60 und wird mit 40 beendet:
alsa 2.3.3 # ls -l /etc/rc2.d | grep usbip
lrwxrwxrwx 1 root root 15 Oct 8 19:06 K40usbip -> ../init.d/usbip
lrwxrwxrwx 1 root root 15 Oct 8 19:06 S60usbip -> ../init.d/usbip
Wenn ich mir das capi-Paket ansehe, startet es anscheinend bei 21. Zu
dem Zeitpunkt kann usbip (welches ein funktionierendes Netzwerk
benötigt) aber noch in keinem Fall laufen, denn die Netzwerk-Karten
werden mit 15 geladen, das Netzwerk mit 25, route mit 30 und resolv mit 35.
Eventuell hat Holger eine Idee?
--
der tom
[eisfair-team]
Mehr Informationen über die Mailingliste Eisfair_dev