https://github.com/s3fs-fuse/s3fs-fuse

s3fs allows Linux, macOS, and FreeBSD to mount an S3 bucket via FUSE(Filesystem in Userspace).
s3fs makes you operate files and directories in S3 bucket like a local file system.
s3fs preserves the native object format for files, allowing use of other tools like AWS CLI.

 

Features

  • large subset of POSIX including reading/writing files, directories, symlinks, mode, uid/gid, and extended attributes
  • compatible with Amazon S3, and other S3-based object stores
  • allows random writes and appends
  • large files via multi-part upload
  • renames via server-side copy
  • optional server-side encryption
  • data integrity via MD5 hashes
  • in-memory metadata caching
  • local disk data caching
  • user-specified regions, including Amazon GovCloud
  • authenticate via v2 or v4 signatures

Installation

Many systems provide pre-built packages:

  • Amazon Linux via EPEL:

    sudo amazon-linux-extras install epel
    sudo yum install s3fs-fuse
  • Arch Linux:

    sudo pacman -S s3fs-fuse
  • Debian 9 and Ubuntu 16.04 or newer:

    sudo apt install s3fs
  • Fedora 27 or newer:

    sudo dnf install s3fs-fuse
  • Gentoo:

    sudo emerge net-fs/s3fs
  • RHEL and CentOS 7 or newer via EPEL:

    sudo yum install epel-release
    sudo yum install s3fs-fuse
  • SUSE 12 and openSUSE 42.1 or newer:

    sudo zypper install s3fs
  • macOS 10.12 and newer via Homebrew:

    brew install --cask macfuse
    brew install gromgit/fuse/s3fs-mac
  • FreeBSD:

    pkg install fusefs-s3fs
  • Windows:

    Windows has its own install, seening in this link

Otherwise consult the compilation instructions.

Examples

s3fs supports the standard AWS credentials file stored in ${HOME}/.aws/credentials. Alternatively, s3fs supports a custom passwd file.

The default location for the s3fs password file can be created:

  • using a .passwd-s3fs file in the users home directory (i.e. ${HOME}/.passwd-s3fs)
  • using the system-wide /etc/passwd-s3fs file

Enter your credentials in a file ${HOME}/.passwd-s3fs and set owner-only permissions:

echo ACCESS_KEY_ID:SECRET_ACCESS_KEY > ${HOME}/.passwd-s3fs
chmod 600 ${HOME}/.passwd-s3fs

Run s3fs with an existing bucket mybucket and directory /path/to/mountpoint:

s3fs mybucket /path/to/mountpoint -o passwd_file=${HOME}/.passwd-s3fs

If you encounter any errors, enable debug output:

s3fs mybucket /path/to/mountpoint -o passwd_file=${HOME}/.passwd-s3fs -o dbglevel=info -f -o curldbg

You can also mount on boot by entering the following line to /etc/fstab:

mybucket /path/to/mountpoint fuse.s3fs _netdev,allow_other 0 0

If you use s3fs with a non-Amazon S3 implementation, specify the URL and path-style requests:

s3fs mybucket /path/to/mountpoint -o passwd_file=${HOME}/.passwd-s3fs -o url=https://url.to.s3/ -o use_path_request_style

or(fstab)

mybucket /path/to/mountpoint fuse.s3fs _netdev,allow_other,use_path_request_style,url=https://url.to.s3/ 0 0

Note: You may also want to create the global credential file first

echo ACCESS_KEY_ID:SECRET_ACCESS_KEY > /etc/passwd-s3fs
chmod 600 /etc/passwd-s3fs

Note2: You may also need to make sure netfs service is start on boot

Limitations

Generally S3 cannot offer the same performance or semantics as a local file system. More specifically:

  • random writes or appends to files require rewriting the entire object, optimized with multi-part upload copy
  • metadata operations such as listing directories have poor performance due to network latency
  • non-AWS providers may have eventual consistency so reads can temporarily yield stale data (AWS offers read-after-write consistency since Dec 2020)
  • no atomic renames of files or directories
  • no coordination between multiple clients mounting the same bucket
  • no hard links
  • inotify detects only local modifications, not external ones by other clients or tools

References

  • CSI for S3 - Kubernetes CSI driver
  • docker-s3fs-client - Docker image containing s3fs
  • goofys - similar to s3fs but has better performance and less POSIX compatibility
  • s3backer - mount an S3 bucket as a single file
  • S3Proxy - combine with s3fs to mount Backblaze B2, EMC Atmos, Microsoft Azure, and OpenStack Swift buckets
  • s3ql - similar to s3fs but uses its own object format
  • YAS3FS - similar to s3fs but uses SNS to allow multiple clients to mount a bucket

Frequently Asked Questions

License

Copyright (C) 2010 Randy Rizun rrizun@gmail.com

Licensed under the GNU GPL version 2

[转帖]s3fs的更多相关文章

  1. nginx负载均衡基于ip_hash的session粘帖

    nginx负载均衡基于ip_hash的session粘帖 nginx可以根据客户端IP进行负载均衡,在upstream里设置ip_hash,就可以针对同一个C类地址段中的客户端选择同一个后端服务器,除 ...

  2. [转帖]网络协议封封封之Panabit配置文档

    原帖地址:http://myhat.blog.51cto.com/391263/322378

  3. [转帖]零投入用panabit享受万元流控设备——搭建篇

    原帖地址:http://net.it168.com/a2009/0505/274/000000274918.shtml 你想合理高效的管理内网流量吗?你想针对各个非法网络应用与服务进行合理限制吗?你是 ...

  4. 3d数学总结帖

    3d数学总结帖,以下是对3d学习过程中数学知识的简单总结 角度值和弧度制的互转 Deg2Rad 角度A1转弧度A2 => A2=A1*PI/180 Rad2Deg 弧度A2转换角度A1 => ...

  5. [转帖]The Lambda Calculus for Absolute Dummies (like myself)

    Monday, May 7, 2012 The Lambda Calculus for Absolute Dummies (like myself)   If there is one highly ...

  6. [转帖]FPGA开发工具汇总

    原帖:http://blog.chinaaet.com/yocan/p/5100017074 ----------------------------------------------------- ...

  7. [Android分享] 【转帖】Android ListView的A-Z字母排序和过滤搜索功能

      感谢eoe社区的分享   最近看关于Android实现ListView的功能问题,一直都是小伙伴们关心探讨的Android开发问题之一,今天看到有关ListView实现A-Z字母排序和过滤搜索功能 ...

  8. AxureRP7.0各类交互效果汇总帖(转)

    了便于大家参考,我把这段时间发布分享的所有关于AxureRP7.0的原型做了整理. 以下资源均有对应的RP源文件可以下载. 当然 ,其中有部分是需要通过完成解密游戏[攻略]才能得到下载地址或者下载密码 ...

  9. 未能加载文件或程序集“Newtonsoft.Json, Version=4.0.0.0, Culture=neutral, PublicKeyToken=30a [问题点数:40分,结帖人u010259408]

    未能加载文件或程序集“Newtonsoft.Json, Version=4.0.0.0, Culture=neutral, PublicKeyToken=30a [问题点数:40分,结帖人u01025 ...

  10. 转帖-[教程] Win7精简教程(简易中度)2016年8月-0day

    [教程] Win7精简教程(简易中度)2016年8月 0day 发表于 2016-8-19 16:08:41  https://www.itsk.com/thread-370260-1-1.html ...

随机推荐

  1. 前世今生:Kubernete 是如何火起来的?

    本课时,我们就开始正式进入 Kubernetes 的学习,或许你已经听过或简单了解过 Kubernetes,它是一款由 Google 开源的容器编排管理工具,而我们想要深入地掌握 Kubernetes ...

  2. 基于k6和python进行自动化性能测试

    摘要:在性能测试中,达到相应的性能指标对于一个软件来说十分重要,在本文中,将介绍一种现代化性能测试工具k6. 本文分享自华为云社区<基于k6和python进行自动化性能测试>,作者: 风做 ...

  3. 即使不会node.js,拖拽就可完成数据的可视化展示

    摘要:node-red是一款基于Node.js的开源可视化界面开发工具,不需要掌握node.js而通过拖拽即可完成数据的可视化展示. 1.首先看一下node-red对数据的渲染效果 你可能认为,必须熟 ...

  4. DTT年度收官圆桌π,华为云8位技术专家的年末盘点

    摘要:收下这份DTT年度收官圆桌π总结,在新的一年心想事成,技术上更上一层楼. 本文分享自华为云社区<DTT年度收官圆桌π,华为云8位技术专家的年末盘点>,作者:华为云社区精选 . 在20 ...

  5. Rocketmq学习2——Rocketmq消息过滤&事务消息&延迟消息原理源码浅析

    系列文章目录和关于我 零丶引入 在<Rocketmq学习1--Rocketmq架构&消息存储&刷盘机制>中我们学习了rocketmq的架构,以及消息存储设计,在此消息存储设 ...

  6. GPT应用开发:运行你的第一个聊天程序

    本系列文章介绍基于OpenAI GPT API开发大模型应用的方法,适合从零开始,也适合查缺补漏. 本文首先介绍基于聊天API编程的方法. 环境搭建 很多机器学习框架和类库都是使用Python编写的, ...

  7. 基于 SpringBoot+vue的地方美食系统,可作为毕业设计

    1 简介 这个项目是基于 SpringBoot和 Vue 开发的地方美食系统,包括系统功能模块,管理员功能模块,用户管理模块,功能齐全,可以作为毕业设计,课程设计等.源码下载下来,进行一些简单的部署, ...

  8. Go--append()

    作用:在原切片的末尾添加元素 实例: package main import "fmt" func main() { s1 := []int{} fmt.Printf(" ...

  9. sprint-boot 存储图片的base64

    需求:将前端上传的图片转换成base64码发送到后端存储到数据库中(oracle或者mysql) 问题:当图片大小比较大(大概是超过1M)后端接收到的数据就会有错误. 解决方法:  sprint-bo ...

  10. 一道C语言改错题

    下午,在上班,读者发来一道题目,问我怎么做.我大概瞄了一眼,看题目也不难.就先让他自己上网查下. 过了一会,他说查不到,问了群里,大家也不太会. 好吧,起码这位读者自己思考过,也问过了. 题目如下,找 ...