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

mount fails with file system subtypes set #116

Closed
mapi opened this issue Aug 14, 2015 · 11 comments
Closed

mount fails with file system subtypes set #116

mapi opened this issue Aug 14, 2015 · 11 comments

Comments

@mapi
Copy link

mapi commented Aug 14, 2015

This is work

mount -t gcsfuse -o rw,user my-bucket /mnt/mybucket

These are not work.

mount -t fuse -o rw,user gcsfuse#my-bucket /mnt/mybucket
mount -t fuse.gcsfuse -o rw,user my-bucket /mnt/mybucket

mount can use another way. but these command return gcsfuse error.

Error: gcsfuse takes exactly two arguments.

NAME:
   gcsfuse - Mount a GCS bucket locally

USAGE:
   gcsfuse [global options] bucket mountpoint

[snip]

I met this problem while using chef.
Chef's mount function support fuse, but use mount -t fuse -o rw,user gcsfuse#my-bucket /mnt/mybucket idiom.

@jacobsa
Copy link
Contributor

jacobsa commented Aug 14, 2015

Thanks for the report. I'm not familiar with Chef; can you provide a link?

@jacobsa
Copy link
Contributor

jacobsa commented Aug 16, 2015

After some Googling, I assume you're referring to this Chef. In particular, here are the docs on mounting.

Can you share your Chef configuration that is causing this problem? It seems like you must have provided the string fuse or fuse.gcsfuse somewhere. If you set fstype to gcsfuse it seems like this would just work?

@mapi
Copy link
Author

mapi commented Aug 17, 2015

My small config is here.

mount "/mnt/my-bucket" do
  device "gcsfuse#my-bucket"
  fstype "fuse"
  options "rw,user"
  action [:mount, :enable]
end

without fstype "fuse", Chef check device "my-bucket" is exist.
This makes "Device my-bucket does not exist" error. (Chef's issue)

mount "/mnt/my-bucket" do
  device "my-bucket"
  fstype "fuse.gcsfuse"  # also fstype "gcsfuse"
  options "rw,user"
  action [:mount, :enable]
end

Of course, Chef should skip the device check if fstype is gcsfuse. but there is already generic way to skip check.

And I found man mount(8) after this issue created.

The programs mount and umount support filesystem subtypes. The subtype is defined by a '.subtype' suffix.
For example 'fuse.sshfs'. It's recommended to use subtype notation rather than add any prefix to the mount source (for example 'sshfs#example.com' is deprecated).

support mount with subtypes improve compatibility.

@jacobsa
Copy link
Contributor

jacobsa commented Aug 17, 2015

To confirm, I believe you're saying that the following doesn't work because Chef gets in the way:

mount "/mnt/my-bucket" do
  device "my-bucket"
  fstype "gcsfuse"
  options "rw,user"
  action [:mount, :enable]
end

This should work; mount -t gcsfuse my-bucket /mnt/my-bucket is totally valid. Have you reported the bug to Chef?

That said, it does make sense to ensure subtypes work, for the reasons described in torvalds/linux@79c0b2d. I'll look into it.

@jacobsa jacobsa changed the title Support some mount idiom mount fails with file system subtypes set Aug 17, 2015
@jacobsa
Copy link
Contributor

jacobsa commented Aug 17, 2015

For the record, I can reproduce this on Ubuntu 15.04 with the following line in /etc/fstab:

jacobsa-standard-asia /home/jacobsa/mp fuse.gcsfuse rw,noauto,user

@jacobsa
Copy link
Contributor

jacobsa commented Aug 17, 2015

@mapi: Could you confirm that the following causes this to work for you?

sudo ln -s /sbin/mount.gcsfuse /sbin/mount.fuse.gcsfuse

@mapi
Copy link
Author

mapi commented Aug 18, 2015

On Debian 8.1(jessie)

after create symlink.

mount -t fuse.gcsfuse -o rw,user my-bucket /mnt/mybucket
This works fine.

mount -t fuse -o rw,user gcsfuse#my-bucket /mnt/mybucket
This return error.

Error: gcsfuse takes exactly two arguments.

NAME:
   gcsfuse - Mount a GCS bucket locally

USAGE:
   gcsfuse [global options] bucket mountpoint

VERSION:
   0.10.0 (commit 2cda84d)
[snip]

@jacobsa
Copy link
Contributor

jacobsa commented Aug 18, 2015

Thanks. Right, I haven't added support for the deprecated version. Will make a release that adds support for the modern version soon.

jacobsa added a commit that referenced this issue Aug 19, 2015
This allows fstab lines specifying file system type `fuse.gcsfuse` to
work, as discussed in #116.
@jacobsa
Copy link
Contributor

jacobsa commented Aug 19, 2015

Thanks again for the report. This should be fixed as of v0.11.0. @mapi: Could you update and confirm?

@jacobsa jacobsa closed this as completed Aug 19, 2015
@mapi
Copy link
Author

mapi commented Aug 20, 2015

👏 great work. thank you.

@rshade
Copy link

rshade commented Jul 11, 2018

@mapi how did you get this to work via chef?

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

3 participants