's3fs unmount: directory is not empty

I'm using s3fs and osxfuse to mount an S3 directory on my Mac:

s3fs my-bucket-name $PWD/s3

When it's time to unmount it, I do this:

% s3fs umount $PWD/s3
s3fs: MOUNTPOINT directory /Users/kwilliams/blah/s3 is not empty.
if you are sure this is safe, can use the 'nonempty' mount option.

I am not sure this is safe - I didn't knowingly create any new files in the s3 directory, and if any new ones were created, I need to know about it so I can clean them up or figure out what happened.

I also don't want it to perform any actions (creation, deletion) on the underlying S3 bucket when trying to unmount. I'm not sure what the nonempty option will do.

The directory certainly appears nonempty when I do ls, because it shows me the contents of the bucket.

Finally - the message says I can use the 'nonempty' mount option - is it saying I should have used that option at mount time, or I can use it when unmounting? s3fs --help doesn't indicate that s3fs umount can take any options.



Solution 1:[1]

Okay, I feel silly - I figured out the answer right after posting. I'm not supposed to do s3fs umount $PWD/s3, just umount $PWD/s3.

The former is presumably trying to mount another bucket called umount at the same path where the previous one is mounted.

Solution 2:[2]

You can also use fusermount:

fusermount -u $PWD/s3

You may need to install fusermount first

Solution 3:[3]

Yes, Just umount mount-point is enough.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ken Williams
Solution 2 Jonathan Chow
Solution 3 chen Jacky