Skip to content

Connect to a Space via SMB/NFS #2073

@oblivioncth

Description

@oblivioncth

Forgive me if I get some things wrong here, as I am not very familiar with OpenCloud's/OCIS's implementation.

Goal

In the interest of using OpenCloud as an all-in-one storage platform for sharing files via various means, it would be fantastic if one could access Spaces via more protocols, namely SMB and/or NFS, in the same manner one currently can via WebDAV

So in the end, a feature set like:

  • Connect to a Space via WebDAV
  • Connect to a Space via SMB
  • Connect to a Space via NFS

Then OpenCloud could be used in even more situations where installation of the client is not possible, or at least not preferable, with the access method able to be better tailored depending on the specific OS/device that needs to access the Space.

Personally I'm looking to use OpenCloud an alternative to my current setup of NextCloud and some host SMB/NFS shares.

Background

Unlike with NextCloud where everything is based on PHP and WebDAV internally, OpenCloud presumably utilizes an abstract interface for filesystem manipulation since it features multiple storage backends, meaning in theory it should not be particularly shackled to WebDAV; however, like NextCloud the only external file mounting protocol (for access of files, not consumption) currently supported is WebDAV.

While still functional, WebDAV is quite old and not always well supported (despite being fairly flexible in the cases when it is supported), with Microsoft even deprecating support for it. Additionally, it's performance is often lacking when compared to other protocols.

Alternatives

Ingest via SMB/NFS, External Files (not implemented)

There are various requests to add an "External Files" (e.g. NextCloud) feature in which CIFS/SMB and NFS could be used to add spaces (or directories to a space) that are completely independent from OpenCloud's primary storage via these protocols. I think these are very valid and useful requests; however, this has various challenges, such as requiring changes to OpenCloud's storage paradigm to allow for the concept of an external Space or to compose a space partially from an external source, and obviously has yet to be implemented (I imagine these should be consolidated as duplicates).

Use an NFS share as a backing store for the data directory (implemented, problematic)

Alternatively, one could host files all on one filesystem and then NFS share that into OpenCloud using the Collaborative PosixFS backend and rely on external solutions for sharing those files elsewhere. Yet, as described in the docs, this can be troublesome:

  • Doesn't handle large amounts of external manipulation well
  • Introduces a lot of overhead to constantly monitor the filesystem
  • Creates concerns of some kinds of "incompatible" external manipulations occurring, like file attribute or ownership changes
  • General concerns of corruption or de-syncs
  • Locks the user into only being able to use NFS for sharing those files elsewhere, since mixed protocol usage of the same directory introduces a number of permission and file-locking problems (i.e. if one tried to also create a CIFS/SMB share off the same directory that is NFS shared as OpenCloud's data directory)

Summary

There may be technical reasons this is not feasible, but a potential way to avoid many of these headaches and greatly increase OpenCloud's flexibility, furthering the goal of allow it to act as a "one-stop-shop" solution for various sharing needs is if OpenCloud could create CIFS/NFS shares (as an alternative to the requests of it consuming them) the same way it can current create WebDAV shares.

Perhaps it is much more challenging or impossible to create SMB/NFS drivers/plugins in the same way one was created for WebDAV (i.e. mapping WebDAV HTTP requests to file actions within a user's Space), though it seems like there is at least the potential for SMB via Samba VFS Modules. For NFS, I'm not sure.

Note

If such features are too technically infeasible, then implementing the request for attaching files to spaces (or whole spaces) via external SMB/NFS shares (i.e. Alternative 1) would be the next best bet IMO.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Unqualified

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions