Skip to main content

GeeseFS

GeeseFS is a program with which you can mount a bucket on a device or server and work with it as a regular folder. GeeseFS is suitable for working with a large number of objects, up to 1 MB each. You can work with GeeseFS on Linux, Windows and macOS.

Customize GeeseFS

  1. Configure access.
  2. Install the client.
  3. Create a configuration.

1. Set up access to S3

Access can be configured by the Account Owner or a user with the role of iam_admin.

  1. Create a service user with role with access to S3. If you use a service user with the role object_storage_user or s3.bucket.user, the bucket must have an access access policy.
  2. Issue an S3 key to the user.

2. Install the client

  1. Make sure that the FUSE utilities are installed by default:

    apt list --installed | grep fuse
  2. If the utilities are not installed, install them:

    sudo apt-get install fuse
  3. Download and install GeeseFS:

    wget https://github.com/yandex-cloud/geesefs/releases/latest/download/geesefs-linux-amd64
    chmod a+x geesefs-linux-amd64
    sudo cp geesefs-linux-amd64 /usr/bin/geesefs

3. Create a configuration

  1. Open the CLI.

  2. Create a directory where the S3 key file will be stored:

    mkdir ~/.aws
  3. Create a credentials file:

    nano ~/.aws/credentials
  4. Add an S3 key:

    [default]
    aws_access_key_id = <access_key>
    aws_secret_access_key = <secret_key>

    Specify:

    • <access_key> — field value Access key from S3 key;
    • <secret_key> — field value Secret key from the S3 key.
  5. Press Ctrl + X → Y → Enter.

Mount the bucket

  1. Create a folder to mount:

    mkdir /mnt/<folder_name>

    Specify <folder_name> — the name of the folder to which the bucket will be mounted.

  2. Mount the bucket:

    sudo geesefs
    --endpoint https://<s3_domain>
    --region <pool>
    --profile <profile_name>
    <bucket_name> /mnt/<folder_name>

    Specify:

    • <s3_domain> — S3 API domain depending on the pool in which the bucket is located;
    • <pool> — pool where the buckets are located;
    • <bucket_name> — name of the bucket to be mounted;
    • <profile_name> — profile name, default default;
    • <folder_name> — name of the folder you created in step 1.
  3. Make sure the buckets are mounted:

    df -hT /mnt/<folder_name>

    Specify <folder_name> is the name of the folder you created in step 1.

Repair the tank

The method of unmounting depends on how the bucket was mounted — one-time or automatically.

Unmount the bucket:

sudo umount /mnt/<local_folder>

Specify <local_folder> — the path to the folder to which the bucket is mounted.