3 ms·
This reminds me of my periodic wish to have a USB device that presents itself to the host OS as a hard drive, but is really an iSCSI initiator. Voila: now you c
by kstrauser 6y ago
This reminds me of my periodic wish to have a USB device that presents itself to the host OS as a hard drive, but is really an iSCSI initiator. Voila: now you can give your Playstation or Xbox arbitrary amounts of fast network storage on the home NAS.
- mschuster91 6y agoIn theory you could do this with an rpi zero w, if you were willing to write the USB gadget adapter code... but I doubt you could get much performance out of it.
- jsight 6y agoAFAIK, the Pi 4 also supports this mode and would offer gigabit performance. Still not terrific, but maybe enough to be usable.
- mschuster91 6y agoI just had a look at the actual kernel code (https://elixir.bootlin.com/linux/v5.10/source/drivers/usb/gadget/function/f_mass_storage.c https://elixir.bootlin.com/linux/v5.10/source/drivers/usb/ga...), looks like you'd have to clone it and re-implement it, I'd go for userspace (possibly via GadgetFS, https://blog.soutade.fr/post/2016/07/create-your-own-usb-gadget-with-gadgetfs.html https://blog.soutade.fr/post/2016/07/create-your-own-usb-gad...).
- wtallis 6y agoIt looks like this should be possible with any Linux single board computer that supports acting as a USB gadget and has an appropriate network interface. See https://www.kernel.org/doc/html/latest/usb/mass-storage.html https://www.kernel.org/doc/html/latest/usb/mass-storage.html which can be pointed at an arbitrary block device or file. (It appears that UASP support is not included.)