Import from a remote source

Reading and exploring further on this:

  1. If mounting (from NFS, Samba, rclone, …) the parent directory is considered. But using a parent directory, leads to Export path should not have any sub-mounts.

  2. Assuming (for now) we are fine importing only subdirectory as a datasource, we get hit by
    Checking parent folder is writable before creating datasource (why can’t we add a truly read-only datasource, not only read-only workspace? :warning:)

  3. Let’s make this writable by doing an overlayfs out of the parent directory and give it permission to Pydio:
    mount -t overlay overlay -o lowerdir=where-rclone-mount-google,upperdir=_upper,workdir=_workdir pydio-mntpoint && chown -R pydio pydio-mntpoint and point datasource to pydio-mntpoint/subdirectory (Remember above point #1)

  4. Here I got object service local2 is already pointing to XXX, make sure to avoid using nested paths for different datasources (XXX is the parent of pydio-mntpoint/) but removing/recreating the datasource got rid of this.

  5. From here I could create a read-only Workspace, but the copy option is disabled (the workspace must be made read-write even if the goal is just to copy files out into another workspace) :warning:

  6. Side note, even deactivating the datasource, the umount is impossible target is busy (the datasource must be deleted first, which is, at least, very inconvenient :warning:)

Overall, this sounds doable with the below sample hierarchy:

├── _upper        # overlayfs (to make the it seemingly writable to Pydio) 
│   └── origin
│       ├── a.txt
│       ├── b.txt
│       └── subdirectory
│           ├── c.txt
│           └── d.txt
├── _workdir    # overlayfs
│   └── work
├── one-level   # This is the intermediary directory needed by Pydio
│   └── origin  # This is where you would mount your SMB/NFS/Google/rclone-mount/...
│       ├── a.txt
│       ├── b.txt
│       └── subdirectory
│           ├── c.txt
│           └── d.txt
└── pydio-mntpoint  # The overlayfs mount-point
    └── origin      # The directory to present to Pydio when creating a datasource
        ├── a.txt
        ├── b.txt
        └── subdirectory
            ├── c.txt
            └── d.txt

[tbc]

1 Like