How to mount eodata using s3fs in Linux on CODE-DE-Lab
This procedure mounts the eodata bucket as a read-only filesystem over HTTPS.
Prerequisites
No. 1 Linux machine and administrative access
The commands below use Ubuntu or Debian and require sudo. The machine must resolve eodata.code-de.org and reach HTTPS port 443.
No. 2 Personal EODATA credentials
Obtain your EODATA access key and secret key from Tenant Manager.
Install s3fs
sudo apt update
sudo apt install s3fs
type -a s3fs
Use /usr/bin/s3fs below. On migrated VMs, an older executable in /usr/local/bin can cause signature errors. See the CODE-DE-Lab migration guide for the existing-mount repair procedure.
Store the credentials
Open the password file:
sudo nano /etc/passwd-s3fs
Enter your personal key pair on one line, replacing both placeholders:
ACCESS_KEY:SECRET_KEY
Restrict access to the file:
sudo chmod 600 /etc/passwd-s3fs
Mount and verify EODATA
Check whether /eodata is already mounted before creating another mount:
findmnt /eodata
If it is mounted and working, keep the existing mount. To replace a broken mount, stop applications using it, leave the directory, and run sudo umount /eodata. Then mount the bucket:
sudo mkdir -p /eodata
sudo /usr/bin/s3fs eodata /eodata -o passwd_file=/etc/passwd-s3fs -o url=https://eodata.code-de.org -o use_path_request_style -o allow_other -o ro -o umask=0222
ls /eodata
The directory should contain EODATA collections. Store processing results outside /eodata.
Mount automatically after restart
Open /etc/fstab with sudo nano /etc/fstab. Replace an obsolete entry for this mount instead of adding a duplicate. Keep the following entry on one line:
/usr/bin/s3fs#eodata /eodata fuse _netdev,nofail,allow_other,ro,use_path_request_style,uid=0,gid=0,umask=0222,mp_umask=0222,url=https://eodata.code-de.org,passwd_file=/etc/passwd-s3fs 0 0
When the manual mount is no longer in use, unmount it and test the fstab entry:
cd ~
sudo umount /eodata
sudo mount /eodata
ls /eodata