2

Using gcsfuse to mount a point locally on a server within a script. Running on an Ubuntu 14 LTS server.

I have two fuse mount points and the script transfers data from other mount points into them.

This script is working for one of the mountpoints, but is not working for the second.

gcsfuse --debug_fuse bucket /mnt/gcloud-bucket
Using mount point: /mnt/gcloud-bucket
Opening GCS connection...
Opening bucket...
Mounting file system...
daemonize.Run: readFromProcess: sub-process: mountWithArgs: mountWithConn: Mount: mount: running fusermount: exit status 1

stderr:
fusermount: mountpoint is not empty
fusermount: if you are sure this is safe, use the 'nonempty' mount option

I checked my script for syntax errors, and its identical to the working one, and I tried running the command in the shell, and it continues to return the error.

I also tried rebooting to clear the mounts, but that did not resolve.

If I go to the /mnt/gcloud-bucket the data from the cloud is all there and mounted, and I can browse it, but it does not appear in the mount -l output.

I also tried doing a umount but the mount is not found.

Thanks,

Cam

Cam
  • 55
  • 3
  • 10

1 Answers1

2

If your mount command output shows that there is nothing mounted on the path, it means the files are stored on the parent filesystem.

So, in order to fix this, you need to remove the files from the directory before running the script again.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58
  • And that was it, I mv'd the folder and recreated the mnt folder, and my script is running like a charm. – Cam Feb 13 '17 at 19:35
  • 1
    Alternatively, you can pass the `nonempty` option when invoking the command to have the local files removed automatically: `gcsfuse -o nonempty bucket /mnt/gcloud-bucket` – Nathan Wallace Oct 07 '20 at 20:01