Mounting Neo Object Storage to Centos 7

Written By Support Team (Administrator)

Updated at February 14th, 2021

We will explain about how to mounting NEO Object Storage to Centos 7 use S3FS. S3FS is application function for bridge you operating system to mounting NEO Object Storage like as Operation System storage.

Step 1 

Install packet and dependensi needed to run S3FS

# yum install automake gcc gcc-c++ git libcurl-devel libxml2-devel make openssl-devel mailcap curl-devel libstdc++-devel fuse fuse-devel wget

Step 2 

Download and Compile Fuse

#cd /usr/src
#wget https://github.com/libfuse/libfuse/releases/download/fuse-3.0.0/fuse-3.0.0.tar.gz
#tar -xzf fuse-3.0.0.tar.gz
#cd fuse-3.0.0
#./configure --prefix=/usr/local
#make
#make install
#export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
#ldconfig
#modprobe fuse

Step 3 

Download and Compile S3FS

#cd /usr/src
#git clone https://github.com/s3fs-fuse/s3fs-fuse.git
#cd s3fs-fuse
#./autogen.sh
#./configure --prefix=usr --with-openssl
#make
#make install

Step 4 

Make file contain Access Key and Secret Key for granted access to Object Storage

For Access Key and Secret Key can be seen on Portal NEO (portal.neo.id) at Object Storage Overview, and for see Secret Key click show.

Shape1

#nano /etc/passwd-s3fs

Fill like format below

YourAccessKey:YourSecretKey
Chmod 600 /etc/passwd-s3fs

Step 5 

Mounting Object Storage

#mkdir /mys3bucket  
#s3fs cobabikin_35 /mys3bucket/ -o passwd_file=/etc/passwd-s3fs -o url=https://nos.wjv-1.neo.id -o use_path_request_style

If you want to see log while connection you can run command below

#s3fs cobabikin_35 /mys3bucket/ -o passwd_file=/etc/passwd-s3fs -o url=https://nos.wjv-1.neo.id -o use_path_request_style -d -d -f -o f2 -o curldbg

Check Object Storage already mounted can use command df -h

If DNS Object Storege not resolve you can add parameter on file /etc/hosts.

103.77.104.25 nos.wjv-1.neo.id

If you want Object Storage automatically mounted every instance turn on / restart, you can add parameter on file /etc/rc.local

s3fs cobabikin_35 /mys3bucket/ -o passwd_file=/etc/passwd-s3fs -o url=https://nos.wjv-1.neo.id -o use_path_request_style

And then run chmod

# chmod +x /etc/rc.local





Was this article helpful?