rexray
rexray copied to clipboard
create s3fs volume Mountpoint is ""
Summary
Create s3fs volume, then inspect this volume and found filed "Mountpoint" is ""
New Feature
1. install plugin
docker plugin install rexray/s3fs:latest
--grant-all-permissions
S3FS_REGION=cn-south-1
S3FS_ENDPOINT=https://obs.cn-south-1.myhuaweicloud.com
S3FS_ACCESSKEY=ak
S3FS_SECRETKEY=sk
- create volume
docker volume create --driver rexray/s3fs --name rexray-s3
- check volume
[root@qxg-dev /]# docker volume ls
DRIVER VOLUME NAME
rexray/s3fs:latest rexray-s3
- inspect volume
[root@qxg-dev volumes]# docker volume inspect rexray-s3
[
{
"CreatedAt": "0001-01-01T00:00:00Z",
"Driver": "rexray/s3fs:latest",
"Labels": {},
"Mountpoint": "",
"Name": "rexray-s3",
"Options": {},
"Scope": "global",
"Status": {
"availabilityZone": "",
"fields": null,
"iops": 0,
"name": "rexray-s3",
"server": "s3fs",
"service": "s3fs",
"size": 0,
"type": ""
}
}
]
Why filed "Mountpoint" is null ???
- run image with this volume
[root@qxg-dev volumes]# docker run -it -v rexray-s3:/opt centos
docker: Error response from daemon: error while mounting volume '': VolumeDriver.Mount: docker-legacy: Mount: rexray-s3: failed: error mounting s3fs bucket.
Run a centos image fail, which step is wrong?
Hi,
Try adding --volume-driver
parameter:
[root@qxg-dev volumes]# docker run -it --volume-driver=rexray/s3fs -v rexray-s3:/opt centos
Hi @Salokyn , I am having the same issue as OP and my steps are identical to him. I have tried adding --volume-driver
parameter but it still doesn't work.
Is there any else you can suggest.
I have tried the following
docker volume create -d rexray/s3fs --name rex-t4
docker run -it --rm --volume-driver=rexray/s3fs -v s3afeef5:/s3 alpine
then inside the container i create a file in s3
directory, exit the container and then in s3 console i don't see any file created in the bucket
I am running latest version of rexray/s3fs
plugin.
When i inspect the volume the mount point is null:
docker volume inspect s3afeef5 [ { "CreatedAt": "0001-01-01T00:00:00Z", "Driver": "rexray/s3fs:latest", "Labels": {}, "Mountpoint": "", "Name": "s3afeef5", "Options": {}, "Scope": "global", "Status": { "availabilityZone": "", "fields": null, "iops": 0, "name": "s3afeef5", "server": "s3fs", "service": "s3fs", "size": 0, "type": "" } } ]
Added the following S3FS_OPTIONS during plugin install and it started working
sudo docker plugin install rexray/s3fs \
S3FS_ACCESSKEY=<api_key> \
S3FS_SECRETKEY=<api_secret> \
S3FS_REGION=us-west-1 \
S3FS_OPTIONS="allow_other,nonempty,use_path_request_style,url=https://s3-us-west-1.amazonaws.com" --grant-all-permissions
I want to use create path inside Bucket with S3FS.
Is it possible?
Example: docker create volume -d rexray/s3fs:0.9.2 --name "bucket-created"/pathdesired
@ioricloud this command just creates the volume. When you mount the volume in a container then you can do all file operations allowed by the file system such as creating folders