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

Issues with mount and documentation #166

Open
Juul opened this issue Jul 11, 2024 · 1 comment
Open

Issues with mount and documentation #166

Juul opened this issue Jul 11, 2024 · 1 comment

Comments

@Juul
Copy link

Juul commented Jul 11, 2024

The cli documentation says "To access the repository files it needs to be mounted first" and tells me to use the command ouisync mount --name NAME but there are two problems.

First, when I run ouisync start it auto-mounts all of my repositories in ~/ouisync so it seems that I actually don't have to run the mount command at all (also the ~/ouisync directory confusingly completely disappears when ouisync is stopped again which is not what I usually expect from a *nix mount).

Second, when I try to run OUISYNC_MOUNT_DIR=/mnt/ouisync ouisync mount --all after having created /mnt/ouisync and set ownership to the current user, then I get a permission error. Given that it can obviously mount without root access it seems odd that this doesn't work (also it should probably warn me that I've already mounted everything elsewhere). If I then try adding a sudo to the mount command then it doesn't work because the ouisync cli running as the root user doesn't see the repositories created by the ouisync running as the current user.

Third, if the mount command worked then it probably should be possible to specify the mount point as a normal part of the command and only use OUISYNC_MOUNT_DIR as a default if nothing is specified.

and lastly, when I ouisync create --name foo then even though it seems like all repos are mounted in ~/ouisync then no ~/ouisync/foo is created. If I then run ouisync mount --all then ~/ouisync/foo appears. Shouldn't it be auto-mounted on creation? Is there ever a reason why anyone would create a new repo and not immediately mount it?

@Juul
Copy link
Author

Juul commented Jul 19, 2024

I would recommend changing the mount command to work in a more unixy way. Here's a proposal.

I'd expect to be able to specify the mount point as an argument, and without having to use -<letter> or --<word> since those should be used for optional arguments, not required arguments. Also, this should probably stick as close as possible to the normal *nix mount command usage to avoid confusion so something like this:

ouisync mount <name_of_repo> <mount_dir>

There could be a file called maybe ouisynctab somewhere that specifies both a default dir for all mounts and optionally specific dirs for specific repos, e.g. like so:

# <repo_name>           <mount_point>
*                      ~/ouisync # default mount point
my_repo               /mnt/my_repo

If that file exists then the following command should work

ouisync mount -a

or

ouisync mount --all

I feel like there should also be another option to continuously auto-mount new repos as they are added based on the rules in the ouisynctab file, e.g:

ouisync mount -a -c # or --continuous

though it might make more sense to make the continuous mounting the default and instead have an argument that disables continuous mounting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant