Object Storage via Fuse Filesystems

Fuse Best Practices and Limitations

Installation and Mounting Instructions

Basics

sudo apt install s3fs
sudo mkdir -p /mnt/fuse_s3fs && sudo chown $USER /mnt/fuse_s3fss3fs $BUCKETNAME /mnt/fuse_s3fs -o url=http://10.62.64.200 -o use_path_request_style
wget -N https://github.com/kahing/goofys/releases/latest/download/goofys
chmod a+x goofys
sudo mkdir -p /mnt/fuse_goofys && sudo chown $USER /mnt/fuse_goofys./goofys --endpoint=http://10.62.64.200 $BUCKETNAME /mnt/fuse_goofys
goofys <bucket:prefix> <mountpoint>
[fb]
type = s3
env_auth = true
region = us-east-1
endpoint = http://10.62.64.200
rclone --vfs-cache-mode writes mount fb:$BUCKETNAME /mnt/fuse_rclone &

Simulating a Directory Structure with Object Keys

Permissions

Angle 1: Reader

$ touch foo
touch: failed to close ‘foo’: Permission denied
$ ls
foo linux-5.12.13

$ ls
linux-5.12.13
$ cat pod.yaml
cat: pod.yaml: Permission denied

Angle 2: Writer

Enabling Deletions

Full Control

Bonus: Undo an Accidental Deletion

#!/usr/bin/python3
import boto3
import sys
FB_DATAVIP='10.62.64.200'if len(sys.argv) != 3:
print("Usage: {} bucketname key".format(sys.argv[0]))
sys.exit(1)
bucketname = sys.argv[1]
key = sys.argv[2]
s3 = boto3.resource('s3', endpoint_url='http://' + FB_DATAVIP)
kwargs = {'Bucket' : bucketname, 'Prefix' : key}
pageresponse = s3.meta.client.get_paginator('list_object_versions').paginate(**kwargs)for pageobject in pageresponse:
if 'DeleteMarkers' in pageobject.keys() and pageobject['DeleteMarkers'][0]['Key'] == key:
print("Undeleting s3://{}/{}".format(bucketname, key))
s3.ObjectVersion(bucketname, key, pageobject['DeleteMarkers'][0]['VersionId']).delete()
./s3-undelete.py phrex temp/pod.yaml
Undeleting s3://phrex/temp/pod.yaml

Performance Testing

Throughput results

for i in {1..24}; do
cp /mnt/ramdisk/file_1G /mnt/$d/temp/file_1G_$i
done
for i in {1..24}; do
cp /mnt/ramdisk/file_1G /mnt/$d/temp/file_1G_$i &
done
wait

Metadata results

Comparing to AWS

Summary

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store