s3fs unmount: directory is not empty
Asked Answered
M

4

16

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.

Mcclung answered 10/5, 2019 at 15:17 Comment(0)
M
45

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.

Mcclung answered 10/5, 2019 at 15:18 Comment(0)
B
9

In a normal case, you can simply unmount the directory using umount from the root

$ umount /mountpoint

For unprivileged user

fusermount -u /mountpoint

else use this to umount directly if shows Device or resource busy / directory is not empty / Permission denied

umount -l /mounthpath

and do rm -rf /path if not needed anymore. FYI : needed more details about s3fs https://www.mankier.com/1/s3fs#

Boorman answered 27/8, 2022 at 14:15 Comment(0)
A
1

You can also use fusermount:

fusermount -u $PWD/s3

You may need to install fusermount first

Azarria answered 11/5, 2022 at 16:39 Comment(0)
F
0

Yes, Just umount mount-point is enough.

Fixing answered 5/3, 2022 at 8:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.