How to mount eodata as a filesystem using Goofys in Linux on EO-Lab

Goofys is one of the methods which you can use to access eodata on your virtual machine.

Warning

The method of obtaining goofys described in this article does not include automatic updates. If there is a new release of this piece of software, you will need to remove the previous version and use wget to download it manually. This is a relatively simple process because the goofys binary is just one file.

Installation and configuration

First, download a few packages.

sudo apt update && sudo apt upgrade && sudo apt install apt-utils wget

Now, navigate to your home directory, download the goofys binary using wget and make it executable:

cd
wget https://github.com/kahing/goofys/releases/latest/download/goofys
chmod +x goofys

You need to create the place in which you will store your credentials.

mkdir ~/.aws/
touch ~/.aws/credentials

The file ~/.aws/credentials should have the following content (you can replace 1234 and 4321 with something else - it does not matter since eodata does not require authentication):

[s3]
aws_access_key_id=1234
aws_secret_access_key=4321

Create the directory which will be the mount point for eodata, for example:

mkdir ~/eo

Mount eodata using the following command: (./goofys is the location of the goofys binary you downloaded and ~/eo is the location of the folder in which you want to mount the eodata filesystem):

./goofys --region RegionOne --profile s3 --endpoint http://s3.cloudferro.com DIAS ~/eo

DIAS is the name of the bucket which contains the eodata resources.

Now you can access eodata.

Mounting eodata on startup

If you want to mount eodata on startup, you should do the following:

sudo mkdir /root/.aws
sudo cp ~/.aws/credentials /root/.aws/

Now, add the following line to the file /etc/fstab (/home/eouser/goofys is the goofys binary you downloaded and /home/eouser/eo is the location in which you wish to mount eodata):

/home/eouser/goofys#DIAS /home/eouser/eo fuse _netdev,allow_other,--dir-mode=0777,--file-mode=0666,--region=RegionOne,--profile=s3,--endpoint=http://s3.cloudferro.com 0 0

Please add the # character at the beginning of every other line of this file (apart from those you intend to keep).