rexray: Error mounting s3fs bucket
Summary
Unable to mount rexray/s3fs volume to docker container
Bug Reports
I am able to install the Docker plugin successfully and successfully create volumes. However, when I try to mount the volume to a container using docker run -it --volume-driver=rexray/s3fs -v myVol:/test busybox, I get the following error message:
C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: error while mounting volume '/mnt/sda1/var/lib/docker/plugins/72070f05ca2941b6ed377bfff1ab116acd4cfd7410a98a01510a47c841517e4f/rootfs': VolumeDriver.Mount: docker-legacy: Mount: myVol: failed: error mounting s3fs bucket.
time="2018-03-07T15:28:25-06:00" level=error msg="error waiting for container: context canceled"
Version
docker plugin: rexray/s3fs:0.11.2
$ docker info
Containers: 4
Running: 1
Paused: 0
Stopped: 3
Images: 4
Server Version: 17.12.1-ce
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 17
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9b55aab90508bd389d7654c4baf173a981477d55
runc version: 9f9c96235cc97674e935002fc3d78361b696a69e
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.4.119-boot2docker
Operating System: Boot2Docker 17.12.1-ce (TCL 8.2.1); HEAD : 42357fc - Wed Feb 28 17:52:00 UTC 2018
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.65GiB
Name: default
ID: SKQJ:CIBW:25U2:SV2S:MIJG:IGM2:DXH3:5SVM:LPJO:UNC4:YSVE:MSVD
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 33
Goroutines: 48
System Time: 2018-03-07T21:31:23.029681921Z
EventsListeners: 0
HTTP Proxy: (removed)
HTTPS Proxy: (removed)
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
$ docker plugin inspect rexray/s3fs
[
{
"Config": {
"Args": {
"Description": "",
"Name": "",
"Settable": null,
"Value": null
},
"Description": "REX-Ray FUSE Driver for Amazon Simple Storage Service (S3FS)",
"DockerVersion": "18.02.0-ce",
"Documentation": "https://github.com/thecodeteam/rexray/.docker/plugins/s3fs",
"Entrypoint": [
"/rexray.sh",
"rexray",
"start",
"-f",
"--nopid"
],
"Env": [
{
"Description": "",
"Name": "REXRAY_LOGLEVEL",
"Settable": [
"value"
],
"Value": "warn"
},
{
"Description": "",
"Name": "LIBSTORAGE_INTEGRATION_VOLUME_OPERATIONS_MOUNT_ROOTPATH",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "LINUX_VOLUME_ROOTPATH",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "LINUX_VOLUME_FILEMODE",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "HTTP_PROXY",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "S3FS_ENDPOINT",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "S3FS_ACCESSKEY",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "S3FS_DISABLEPATHSTYLE",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "S3FS_MAXRETRIES",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "S3FS_OPTIONS",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "S3FS_REGION",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "S3FS_SECRETKEY",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "CSI_ENDPOINT",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "The name of the CSI plug-in used by the CSI module.",
"Name": "X_CSI_DRIVER",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "A flag that disables the CSI to libStorage bridge.",
"Name": "X_CSI_NATIVE",
"Settable": [
"value"
],
"Value": "false"
}
],
"Interface": {
"Socket": "rexray.sock",
"Types": [
"docker.volumedriver/1.0"
]
},
"IpcHost": false,
"Linux": {
"AllowAllDevices": true,
"Capabilities": [
"CAP_SYS_ADMIN"
],
"Devices": null
},
"Mounts": [
{
"Description": "",
"Destination": "/dev",
"Name": "",
"Options": [
"rbind"
],
"Settable": null,
"Source": "/dev",
"Type": "bind"
}
],
"Network": {
"Type": "host"
},
"PidHost": false,
"PropagatedMount": "/var/lib/rexray",
"User": {},
"WorkDir": "",
"rootfs": {
"diff_ids": [
"sha256:eebe6ffed8f4c85b884ec7c227cff7ed9a9c189f8d28949aa20c395dd121869f"
],
"type": "layers"
}
},
"Enabled": true,
"Id": "72070f05ca2941b6ed377bfff1ab116acd4cfd7410a98a01510a47c841517e4f",
"Name": "rexray/s3fs:latest",
"PluginReference": "docker.io/rexray/s3fs:latest",
"Settings": {
"Args": [],
"Devices": [],
"Env": [
"REXRAY_LOGLEVEL=warn",
"LIBSTORAGE_INTEGRATION_VOLUME_OPERATIONS_MOUNT_ROOTPATH=",
"LINUX_VOLUME_ROOTPATH=",
"LINUX_VOLUME_FILEMODE=",
"HTTP_PROXY=",
"S3FS_ENDPOINT=(removed)",
"S3FS_ACCESSKEY=(removed)",
"S3FS_DISABLEPATHSTYLE=",
"S3FS_MAXRETRIES=",
"S3FS_OPTIONS=url=(removed)",
"S3FS_REGION=",
"S3FS_SECRETKEY=(removed)",
"CSI_ENDPOINT=",
"X_CSI_DRIVER=",
"X_CSI_NATIVE=false"
],
"Mounts": [
{
"Description": "",
"Destination": "/dev",
"Name": "",
"Options": [
"rbind"
],
"Settable": null,
"Source": "/dev",
"Type": "bind"
}
]
}
}
]
Expected Behavior
I should be able to mount a an s3fs volume to a Docker container.
Actual Behavior
I receive an error when trying to mount the volume.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 1
- Comments: 23 (5 by maintainers)
When you install s3fs in your bash script do this:
docker plugin install rexray/s3fs:latest S3FS_REGION=${aws_region} S3FS_OPTIONS="allow_other,iam_role=auto,umask=000" --grant-all-permissionsFor those who are looking for solutions for setting up AWS S3bucket mapping for AWS ECS service through the USER DATA, the solution is here P.s. Like me subscribe to my channel 🙃
For me work well with minio only this (combination on options)
After a ton of searching to resolve this same problem this worked for me as well.
docker plugin install rexray/s3fs:latest S3FS_REGION=${aws_region} S3FS_OPTIONS="allow_other,iam_role=auto,umask=000" --grant-all-permissions