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

[Suggestion] umount dir before mount, incase it's already mounted #3

Open
karbowiak opened this issue Nov 16, 2014 · 10 comments
Open

Comments

@karbowiak
Copy link

Hi..

Is it possible to make it unmount the dir that it's set to mount it to ?

Maybe add a true/false thing that is default false, so people can turn it on / off :)

@EricTheMagician
Copy link
Owner

What do you mean?
Like auto unmount before trying to mount?

Eric

On Sun, Nov 16, 2014 at 3:02 PM, Michael Karbowiak
[email protected] wrote:

Hi..
Is it possible to make it unmount the dir that it's set to mount it to ?

Maybe add a true/false thing that is default false, so people can turn it on / off :)

Reply to this email directly or view it on GitHub:
#3

@karbowiak
Copy link
Author

Exactly! :)

Once the script is stopped, it doesn't automatically unmount, thus leaving behind the mount, blocking it from being used unless it's unmounted before hand :)

@karbowiak
Copy link
Author

Just tested it, sadly it doesn't unmount the mount automatically on Debian Wheezy using the 0.11 branch.

It's like the command is never executed, tried running as the user that mounted the path, and as root, even tried changing it from fusermount -u #{config.mountPoint} to umount -u #{config.mountPoint} to umount -u /mnt/gdrive

Nada :(

EricTheMagician added a commit that referenced this issue Dec 7, 2014
@EricTheMagician
Copy link
Owner

I thought it would have just worked on linux.
So for now, I've made it log the error messages and any info.

I'm not really sure why it's not unmounting. Maybe I need to add a delay between unmounting and mounting?

@karbowiak
Copy link
Author

Just pulled the new code, and gave it a whirl.

$ coffee fs.coffee
info: loading upload tree
Access Token Set
info: Loading folder structure
info: attempting to start f4js
error: Exception when starting file system: Error: EEXIST, file already exists '/mnt/gdfs'
debug: Getting changes from Google Drive. The last change id was 184565.
debug: There was 0 to parse
debug: Finished parsing changes from google

Still no dice tho, tried changing it to umount instead of fusermount -u aswell, same thing.

It seems that it's not even trying to execute the command?
Can't be because of delay, umount and fusermount -u should both block till they're finished.

@EricTheMagician
Copy link
Owner

what's odd is that you have no error messages or actual output from unmounting.
maybe replace fusermount with $(which fusermount). and umount with $(which umount).

it might be that for some reason, on your distro, it requires the full path.

@karbowiak
Copy link
Author

Changed

command = "fusermount -u #{config.mountPoint}"

to

command = "$(which fusermount) -u #{config.mountPoint}"

This is the output

info: loading upload tree
Access Token Set
info: Loading folder structure
info: attempting to start f4js
error: Exception when starting file system: Error: EEXIST, file already exists '/mnt/gdfs'
debug: Getting changes from Google Drive. The last change id was 184565.
debug: There was 0 to parse
debug: Finished parsing changes from google

Tried changing it to /bin/fusermount instead, still the same.

/o\

edit://
also tested with umount, same "non"message :P

@EricTheMagician
Copy link
Owner

I might be spinning up a VM soon. So I will check that out when I do.

@karbowiak
Copy link
Author

Coolio, feel free to tell me to do stuff :)

@EricTheMagician
Copy link
Owner

You've done everything I've though of so far, but maybe I'll have some more ideas later.

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

No branches or pull requests

2 participants