S3FS is an open source application that can be used for mounting cloud storage and can also be used as an application for mounting NEO Object Storage on an instance as a storage medium.
First, access your instance via ssh and update your Ubuntu 16.04 LTS, 18.04 LTS or Debian 9 instances using the command.
# apt-get update -y
Install the dependencies needed to run S3FS, here are the commands
# apt-get install automake autotools-dev fuse g ++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config wget unzip -y
Download the S3FS version 1.85 file via this page, and download the file with the .zip extension
After the S3FS file link has been obtained, download the file using the command
# wget https://github.com/s3fs-fuse/s3fs-fuse/archive/v1.85.zip
Unzip the downloaded S3FS using the unzip v1.85.zip command
Compile an S3FS file using the following commands
# cd s3fs-fuse-1.85 /
# make install
Specifies the destination directory for mount object storage. Here we will create a new folder with the name of the object-storage-s3 folder that is in the / var / directory, the folder naming can be adjusted according to your needs, the following commands can be used.
# cd / var
# mkdir object-storage-s3
Prepare a credential object storage consisting of Access_key and Secret_key object storage which can be viewed through portal.neo.id.
To see Secret_Key please click on the show menu in the image above, here are the results
Create a credential object storage on the instance side and give 600 permissions to the credential file, following the commands used
# echo ACCESS_KEY: SECRET_KEY> /etc/.passwd-s3fs
# chmod 600 /etc/.passwd-s3fs
Note: For ACCESS_KEY: SECRET_KEY, please enter accordingly on portal.neo.id
Create a bucket on the side of Object Storage, to create a bucket through portal.neo.id on the menu Dashboard >> Object Storage Service >> Bucket >> New Bucket.
Fill in the bucket name as you wish. Here we will example for the bucket name, namely bucket-neo then save as follows
Next, mount the storage object bucket that was created on the instance using s3fs and the commands used
# s3fs nama_bucket / path / to / directory -o passwd_file = / etc / .passwd-s3fs -o url = https: //nos.wjv-1.neo.id/ -o use_path_request_style
nama_bucket: Fill in the bucket name that was created previously on portal.neo.id
/ path / to / directory: Fill in the directory that was created previously on the instance
passwd_file: The credential storage object directory that was created earlier on the instance
Url: Adjust the url of the storage object to view it via portal.neo.id
Make sure that the bucket-neo is mounted to the / var / backup-object-storage directory using the “df -hT” command as follows
In the picture above, you can see that the bucket is mounted using s3fs.
To ensure that the bucket is properly mounted, please create a folder in the bucket and fill in the files in that folder. To create a folder on a bucket, go to portal.neo.id on the menu Dashboard >> Object Storage Service >> Bucket >> Select Bucket >> Create Folder.
Adjust the folder naming as needed
Upload the file in the folder that has been created as shown below
Make sure that in the bucket directory / var / object-storage-s3 there are folders and files that have been previously uploaded to portal.neo.id, the following commands can be used
# cd / var / object-storage-s3
# cd Neo \ Cloud /
cd: This command is used to change directories
ls: This command is used to view the contents of that directory
If you want Neo Object Storage to auto mount every instance enabled, add the following parameters to the / etc / fstab file
s3fs # bucket-neo / var / backup-object-s3 fuse _netdev, allow_other, use_path_request_style, url = https: //nos.wjv-1.neo.id/ 0 0