Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespaced file operations #27572

Closed
labkode opened this issue Apr 5, 2017 · 7 comments
Closed

Namespaced file operations #27572

labkode opened this issue Apr 5, 2017 · 7 comments
Assignees

Comments

@labkode
Copy link

labkode commented Apr 5, 2017

Currently in OC in the All my files tab both user owned files/folders are merged with shared resources from other users/groups at any level in the virtual tree.

When the number of shares is high the performance of the system degrades drastically to the fact of waiting several seconds to list a folder. The hack used in CERNBox to avoid mounting shared resources when they are not needed is to guess based on the URL and its parameters if the shared mounts must be mounted or not.

For such purpose, our user/group shares file target names are suffixed with a unique id that indicates that this mount point is a shared folder.

In the hack, based on query parameters like ?path, ?file, ?dir etc... we decide to mount or not the shared file system. The hack can be found here

We would like to have the possibility to scope user files and shared files based on the path.
Nowadays, owncloud uses the files/ prefix for all files.
We would like to have something like myfiles/ and shared/ namespaces for mapping directly to a mount point without having to guess based on dirty hacks we have in place.

@PVince81
Copy link
Contributor

PVince81 commented Apr 5, 2017

talk with @mrow4a

It sucks that OC needs to mount ALL mount points for any file operation even unrelated.
Needs a good rewrite of the FS layer especially the mount provider/manager part.

Potential approach here: #26190.

@mrow4a
Copy link
Contributor

mrow4a commented Apr 5, 2017

@labkode Yep, this is exactly what I wanted to achieve recently, but it is a bit more complicated then for EOS, and to do it properly it might need some rewrite, but for OC10 it is already too late, so we just plaster bleeding wounds and doing this properly in OC11.

@labkode
Copy link
Author

labkode commented Apr 6, 2017

@PVince81 @mrow4a Great to know that we are aligned on this issue. Looking forward to see the advancements of this area.

I really like the idea of using a fstab-like approach.
For static mounts (system wide), this could be defined in the config.php file (ala /etc/fstab)

For dynamic mounts (user created mounts, external storage) these could be created on the fly in the DB ( ala mount -t ext4 -o ro /dev/sda1 /mnt/myusb).

Finally, these two mount specification files would merge into one central place, like oc_mounts, basically the way *nix does it with the /etc/mtab or /proc/mounts files.

# in config.php
mounts => array(
  '/home' => array(
    'filesystemspec' = > '\OC\Storage\EosHomeStorage',
    'options' => 'rw'
  ),
  '/shared' => array(
    'filesystemspec' => '\OC\Storage\EosSharedStorage',
    'options' => 'rw'
  ),
  '/thumbnails' => array(
    'filesystemspec' => '\OC\Storage\LocalStorage',
    'options' => 'rw'
  ),
  ...
)

@PVince81
Copy link
Contributor

PVince81 commented Apr 6, 2017

No, we already had a mount.json file and it was a nightmare to manage, especially that the config is not searchable with DB queries.

All mounts to be stored in the DB and be managed by OCC commands like the external storage config ones. In this case one could still write a script if they fancy having their mounts in separate files...

@PVince81 PVince81 added this to the backlog milestone Aug 7, 2017
@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

@PVince81
Copy link
Contributor

Leaving closed in favor of #26190. We need a proper mechanism to not mount stuff that is not in the current view/folder.

Another proposed approach was to have a cached view which would remove the need to resolve mount points every single time. @DeepDiver1975 was there any ticket about your view ideas ?

@lock
Copy link

lock bot commented Aug 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants