Install objectivefs with amazon s3 on ubuntu.

1.Download ObjectiveFS

Register an account from https://objectivefs.com

“You can register a free account to download 14 days free license for testing  or an commercial account paying via VISA card to download commercial license for large sites.”

Download objectivefs_4.2_amd64.deb package from the site.

$ wget https://objectivefs.com/[…]/objectivefs_4.2_amd64.deb

2. Install ObjectiveFS.

$ sudo dpkg -i objectivefs_4.2_amd64.deb

3.Verify NTP has a small offset

$sudo /usr/sbin/ntpdate -q pool.ntp.org

4. Configure your credentials.

Need your keys? See: how to get your S3 keys or GCS keys

$sudo mount.objectivefs config

Enter ObjectiveFS license: <License key from ObjectiveFS>

Enter Access Key Id: <your AWS or GCS access key>

Enter Secret Access Key: <your AWS or GCS secret key>

5. Configure disk cache

$ sudo vi /etc/objectivefs.env/DISKCACHE_SIZE

10G

$ sudo mkdir /data/ofscache

$ sudo vi  /etc/objectivefs.env/DISKCACHE_PATH

/data/ofscache

6. Create a file system

$sudo mount.objectivefs create [-l <region>] <filesystem>
Passphrase: <your_passphrase>
Verify passphrase: <your_passphrase>

 7. Mount the file system.

$sudo mkdir /ofs
$sudo mount.objectivefs <myofs> /ofs
Passphrase: <your_passphrase>

8. Mount on Boot

8.1 Create a passphrase file.

$sudo vi /etc/objectivefs.env/OBJECTIVEFS_PASSPHRASE

<your_passphrase>

8.2 Add to fstab file

$sudo vi /etc/fstab

s3://myofs /ofs objectivefs auto,_netdev 0 0

 

9. Unmount

$sudo umount <dir>

10. You can mount this file system on all machines that you’d like to share your data.

Be the first to comment

Leave a Reply