rexray icon indicating copy to clipboard operation
rexray copied to clipboard

create s3fs volume Mountpoint is ""

Open hahazhu123 opened this issue 5 years ago • 5 comments

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 
  1. create volume
docker volume create --driver rexray/s3fs --name rexray-s3
  1. check volume
[root@qxg-dev /]# docker volume ls
DRIVER               VOLUME NAME
rexray/s3fs:latest   rexray-s3
  1. 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 ???

  1. 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?

hahazhu123 avatar Aug 22 '19 13:08 hahazhu123

Hi,

Try adding --volume-driver parameter:

[root@qxg-dev volumes]# docker run -it --volume-driver=rexray/s3fs -v rexray-s3:/opt centos

Salokyn avatar Apr 07 '20 13:04 Salokyn

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": "" } } ]

afeef avatar May 06 '20 12:05 afeef

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

afeef avatar May 20 '20 08:05 afeef

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 avatar Mar 30 '21 14:03 ioricloud

@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

bizmate avatar Sep 04 '21 11:09 bizmate