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 from fstab runs in foreground #36

Closed
greerso opened this issue Nov 7, 2015 · 29 comments
Closed

Mount from fstab runs in foreground #36

greerso opened this issue Nov 7, 2015 · 29 comments

Comments

@greerso
Copy link

greerso commented Nov 7, 2015

used goofys#bucketname /mnt/mountpoint fuse allow_other,--file-mode=0777,--dir-mode=0777,--uid="33,--gid="33",--storage-class="REDUCED_REDUNDANCY" in /etc/fstab.

sudo mount /mnt/mountpoint mounted the volume with the following messages left open in foreground:

2015/11/07 21:34:10.777609 s3.INFO Switching from region 'us-west-2' to 'us-east-1'
2015/11/07 21:34:10.816434 main.INFO File system has been successfully mounted.

CTRL-C unmounted the volume.

@kahing
Copy link
Owner

kahing commented Nov 7, 2015

That's odd, it worked fine for me. Could you double check that you are at the latest revision?
On Nov 7, 2015 13:39, Danny Greer notifications@github.com wrote:used goofys#bucketname /mnt/mountpoint fuse allow_other,--file-mode=0777,--dir-mode=0777,--uid="33,--gid="33",--storage-class="REDUCED_REDUNDANCY" in /etc/fstab.

sudo mount /mnt/mountpoint mounted the volume with the following messages left open in foreground:

2015/11/07 21:34:10.777609 s3.INFO Switching from region 'us-west-2' to 'us-east-1'
2015/11/07 21:34:10.816434 main.INFO File system has been successfully mounted.

CTRL-C unmounted the volume.

—Reply to this email directly or view it on GitHub.

@greerso
Copy link
Author

greerso commented Nov 7, 2015

goofys -v
goofys version 0.0.2

Same after running:

go get github.com/kahing/goofys
go install github.com/kahing/goofys

@kahing
Copy link
Owner

kahing commented Nov 8, 2015

What's the git revision?
On Nov 7, 2015 3:56 PM, Danny Greer notifications@github.com wrote:goofys -v
goofys version 0.0.2

—Reply to this email directly or view it on GitHub.

@greerso
Copy link
Author

greerso commented Nov 8, 2015

Sorry, I don't know how to tell.

Tried "git pull" from within the src directory and it says "Already up-to-date."

@greerso
Copy link
Author

greerso commented Nov 8, 2015

The -f option shows in --help but makes no difference

@kahing
Copy link
Owner

kahing commented Nov 9, 2015

I cannot reproduce this issue. Could you verify that go install is installing goofys to the same place mount is running it from?

@greerso
Copy link
Author

greerso commented Nov 9, 2015

which goofys shows /home/ubuntu/.gvm/pkgsets/go1.5.1/global/bin/goofys

I delete all trace of goofys from the go directories, then ran get and install again. Same problem. Should I send you my binary?

@kahing
Copy link
Owner

kahing commented Nov 9, 2015

How does mount run goofys from /home/ubuntu/.gvm/pkgsets/go1.5.1/global/bin/goofys ?

@greerso
Copy link
Author

greerso commented Nov 10, 2015

"/home/ubuntu/.gvm/pkgsets/go1.5.1/global/bin/goofys bucketname /mnt/mountpoint" ran in background.

Copy or symlink goofys binary to /usr/bin or /bin so that I am able to use fstab and it runs in foreground.

@greerso
Copy link
Author

greerso commented Nov 10, 2015

This is my fstab entry:

goofys#bucketname /mnt/mountpoint fuse allow_other,--file-mode=0777,--dir-mode=0777,--uid="33,--gid="33",--storage-class="REDUCED_REDUNDANCY" 0 0

@kahing
Copy link
Owner

kahing commented Nov 10, 2015

so if you run /usr/bin/goofys bucketname /mnt/mountpoint, it runs in foreground? Even if /usr/bin/goofys is identical to /home/ubuntu/.gvm/pkgsets/go1.5.1/global/bin/goofys? That doesn't make sense to me.

@greerso
Copy link
Author

greerso commented Nov 10, 2015

no run from the commandline it is working fine, only when I add the entry above to fstab and type "sudo mount /mnt/mountpoint" it runs in foreground.

@kahing
Copy link
Owner

kahing commented Nov 10, 2015

Sounds like you are not running the same goofys then. Try

$ sudo strace -f mount /mnt/mountpoint >& xout
$ grep execve xout

and compare the goofys mount is executing with /home/ubuntu/.gvm/pkgsets/go1.5.1/global/bin/goofys

@greerso
Copy link
Author

greerso commented Nov 10, 2015

ubuntu@archive:~$ sudo strace -f mount /mnt/cpirepsarchive.s3/ >& xout

^Cubuntu@archive:$ grep execve xout
execve("/bin/mount", ["mount", "/mnt/mountpoint/"], [/* 15 vars /]) = 0
[pid 6562] execve("/sbin/mount.fuse", ["/sbin/mount.fuse", "goofys#bucketname", "/mnt/mountpoint", "-o", "rw,allow_other,--file-mode=0777,"...], [/
11 vars /]) = 0
[pid 6562] execve("/bin/sh", ["/bin/sh", "-c", "'goofys' 'bucketname' '/mnt/"...], [/
12 vars /]) = 0
[pid 6563] execve("/bin/goofys", ["goofys", "bucketname", "/mnt/mountpoint", "-o", "rw,allow_other,--file-mode=0777,"...], [/
13 vars /]) = 0
[pid 6566] execve("/home/ubuntu/goofys", ["goofys", "bucketname", "/mnt/mountpoint", "-o", "rw,allow_other,--file-mode=0777,"...], [/
14 vars /]) = -1 ENOENT (No such file or directory)
[pid 6569] execve("/bin/fusermount", ["fusermount", "-o", "dev,suid,default_permissions,fsn"..., "--", "/mnt/mountpoint"], [/
15 vars /] <unfinished ...>
[pid 6569] <... execve resumed> ) = 0
[pid 6572] execve("/bin/mount", ["/bin/mount", "--no-canonicalize", "-i", "-f", "-t", "fuse", "-o", "rw,default_permissions,allow_oth"..., "bucketname", "/mnt/mountpoint"], [/
0 vars */]) = 0
ubuntu@archive:
$ ll
total 27360

I see a problem here "/home/ubuntu/goofys" There is no goofys in the home directory. I'll check paths, and reboot.

@kahing
Copy link
Owner

kahing commented Nov 10, 2015

[pid 6563] execve("/bin/goofys", ["goofys", "bucketname", "/mnt/mountpoint", "-o", "rw,allow_other,--file-mode=0777,"...], [/ 13 vars /]) = 0
[pid 6566] execve("/home/ubuntu/goofys", ["goofys", "bucketname", "/mnt/mountpoint", "-o", "rw,allow_other,--file-mode=0777,"...], [/ 14 vars /]) = -1 ENOENT (No such file or directory)

What's /bin/goofys? mount shouldn't run both /bin/goofys and /home/ubuntu/goofys (which doesn't exist because execve is returning ENOENT)

@greerso
Copy link
Author

greerso commented Nov 10, 2015

/bin/goofys is where I copied /home/ubuntu/.gvm/pkgsets/go1.5.1/global/bin/goofys.

@kahing
Copy link
Owner

kahing commented Nov 10, 2015

So what's launching /home/ubuntu/goofys? I pushed another commit for additional error check, could you rebuild and try again?

@greerso
Copy link
Author

greerso commented Nov 10, 2015

I've rebooted go get and go install again and no longer get any output from:

$ sudo strace -f mount /mnt/mountpoint >& xout
$ grep exec xout

@greerso
Copy link
Author

greerso commented Nov 10, 2015

Correction. I get:

execve("/bin/mount", ["mount", "/mnt/mountpoint"], [/* 15 vars */]) = 0

@greerso
Copy link
Author

greerso commented Nov 10, 2015

The new build returns:

ubuntu@ip-10-0-0-27:~$ sudo mount /mnt/mountpoint/
panic: unable to daemonize: fork/exec /home/ubuntu/goofys: no such file or directory

goroutine 1 [running]:
main.main.func1(0xc820071b00)
/home/ubuntu/.gvm/pkgsets/go1.5.1/global/src/github.com/kahing/goofys/main.go:152 +0x503
github.com/codegangsta/cli.(*App).Run(0xc8200719e0, 0xc820084280, 0x6, 0x8, 0x0, 0x0)
/home/ubuntu/.gvm/pkgsets/go1.5.1/global/src/github.com/codegangsta/cli/app.go:180 +0x1028
main.main()
/home/ubuntu/.gvm/pkgsets/go1.5.1/global/src/github.com/kahing/goofys/main.go:191 +0xf6

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/home/ubuntu/.gvm/gos/go1.5.1/src/runtime/asm_amd64.s:1696 +0x1

goroutine 5 [runnable]:
os/signal.loop()
/home/ubuntu/.gvm/gos/go1.5.1/src/os/signal/signal_unix.go:20
created by os/signal.init.1
/home/ubuntu/.gvm/gos/go1.5.1/src/os/signal/signal_unix.go:28 +0x37

@greerso
Copy link
Author

greerso commented Nov 10, 2015

I just built and ran on another ubuntu 14.04 server and got the same problem:

ubuntu@devrs:~$ sudo mount /mnt/cpisyndicationarchive.goofys
panic: unable to daemonize: fork/exec /home/ubuntu/goofys: no such file or directory

Maybe how I'm installing go? http://www.hostingadvice.com/how-to/install-golang-on-ubuntu/

@kahing kahing closed this as completed in 1e942f4 Nov 10, 2015
@kahing
Copy link
Owner

kahing commented Nov 10, 2015

Thanks for helping me debug this issue! I couldn't reproduce this problem because I do all my test in the source dir, where the original binary exists. The issue is due to sevlyar/go-daemon#8

@greerso
Copy link
Author

greerso commented Nov 10, 2015

Thanks for open sourcing this much needed alternative to the unreliable S3FS and RIOFS.

@cr-solutions
Copy link

Hello,

I have the same issue.
fstab and autofs not working.
Any solution?

debug shows:
mounted indirect on /mnt/goofys with timeout 300, freq 75 seconds
ghosting enabled
attempting to mount entry /mnt/goofys/panthermedia-test

2018/06/07 12:47:03.534282 s3.INFO Switching from region 'us-east-1' to 'eu-west-1'
2018/06/07 12:47:03.572287 main.INFO File system has been successfully mounted.

but ls /mnt/goofys/panthermedia-test/ not returning

@corymickelson
Copy link

Getting the same thing, oddly it worked great for about a week, not sure what could have changed but im in the same boat as everyone else here now, everything i've tried results in this same error.

@kahing
Copy link
Owner

kahing commented May 30, 2019

What's "the same thing"? This issue was fixed 3 years ago. Could you elaborate more since you are likely not having the exact same issue (even though the symptom maybe similar)

@corymickelson
Copy link

corymickelson commented May 30, 2019

s3.INFO Switching from region 'us-east-1' to 'us-west-2'
May 30 10:45:18 cmickelson-workstation /home/cmickelson/Go/bin/goofys[9868]: main.FATAL Mounting file system: Mount: Statting mount point: stat /home/cmickelson/Remote/LP/: transport endpoint is not connected

the same error's as stated above.
I dont know where the us-east-1 region is coming from, aws config is set to us-west-2, the command is simply goofys . There is no rush here, I already have a work around for the time being, but thank you for the quick reply

@kahing
Copy link
Owner

kahing commented May 30, 2019

if you run mount, do you see a stale mount?

@corymickelson
Copy link

@kahing Thank you, yes I just had to unmount with fusermount -u /path/to/mnt and rerun goofys. Thanks again for such a timely reponse.

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

4 participants