GNOME Bugzilla – Bug 355382
Share drives with zeroconf
Last modified: 2019-03-20 10:36:58 UTC
From a mail from David Zeuthen: > [3] : in the same vein, it would be nice for g-h-m to have a feature to > share some/all (external, maybe also internal) storage drives using > Avahi. Sounds like a fun and small project for someone to hack on, > possibly it needs some integration with e.g. gnome-user-share. Would be > a really nice feature though, would help extend our (GNOME) reach even > more into the data center and the world of sys admins.
Apple does this. It also makes remote mounting very very easy.
what is zeroconf? I'm sensing someone else will have to implement this and send me a patch
Avahi is an implementation of zeroconf/Rendezvous/Bonjour.
This should most probably be moved to gnome-user-share...
Note that there are actually two things we want here 1. Share the files from locally mounted drives via a _file_ sharing protocol such as dav/smb/ftp/etc. - This is a well-known problem and somewhat straightforward to solve. - The device can still be used locally 2. Share the _device_ using protocols like nbd/iSCSI/etc. - This probably prevents local usage of the device - But allows the client to do things like - burning discs - watching DVD's - booting from the device incl. rootfs etc. These are somewhat different use cases. This bug was filed with the intent of doing task 1.
(In reply to comment #5) > Note that there are actually two things we want here > > 1. Share the files from locally mounted drives via a _file_ sharing > protocol such as dav/smb/ftp/etc. > - This is a well-known problem and somewhat straightforward to solve. > - The device can still be used locally We would only handle sharing over WebDav ourselves. The modifications would go directly in http.c for gnome-user-share, and just change the root of the share. > 2. Share the _device_ using protocols like nbd/iSCSI/etc. > - This probably prevents local usage of the device > - But allows the client to do things like > - burning discs > - watching DVD's > - booting from the device incl. rootfs etc. > > These are somewhat different use cases. This bug was filed with the intent of > doing task 1. Did a bit of research on that. - Sharing USB devices (only works with USB, Linux only): http://usbip.sourceforge.net/ - Using iSCSI (horrible implementation, on both sides, mostly) - gnbd would probably be pretty easy to have exported, with a thin avahi layer on top, but would probably only work well with read-only media
(In reply to comment #6) > We would only handle sharing over WebDav ourselves. The modifications would go > directly in http.c for gnome-user-share, and just change the root of the share. Yeah. Can we do this on the fly? > - Sharing USB devices (only works with USB, Linux only): > http://usbip.sourceforge.net/ Yeah, that's somewhat a different use case. > - Using iSCSI (horrible implementation, on both sides, mostly) Oh, there are like 3 different implementations of targets and even more for initiators. Some are horribly complex and come with initscripts / configuration files; others are much nicer and don't force all kinds of configuration files; sharing a drive is simply starting a process with the appropriate parameters. For iSCSI we most probably want to ignore the overly complex discovery protocol they have and just do simple mDNS stuff ourselves. > - gnbd would probably be pretty easy to have exported, with a thin avahi layer > on top, but would probably only work well with read-only media Right. Also keep in mind that the user might want to set a password on the shared drive and probably also crazy options like whether the link is encrypted etc. We probably want to expose at least passwords? Either way, since sharing a device requires privileges, I think we'd need HAL (or rather the upcoming HAL 2.0 (DeviceKit*) stuff I'm going to announce real soon now) to expose simple D-Bus methods to a) enumerate; b) start sharing device; c) stop sharing device. Then we can probably abstract the way things are shared too and keep the code in g-u-s somewhat simple. Thoughts? David
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-user-share/issues/8.