This guide covers the steps to set up your filesystem to mount automatically upon boot on Linux. For macOS, see this guide.
Check that /etc/objectivefs.env/OBJECTIVEFS_PASSPHRASE
exists so you can mount your filesystem without needing to enter the passphrase.
If it doesn’t exist, create the file with your passphrase as the content.
$ sudo ls /etc/objectivefs.env
AWS_ACCESS_KEY_ID OBJECTIVEFS_LICENSE
AWS_SECRET_ACCESS_KEY OBJECTIVEFS_PASSPHRASE
Add the following line in /etc/fstab
<filesystem> <mount dir> objectivefs auto,_netdev 0 0
Note:
a. Check that `<mount dir>` is an existing empty directory
b. `_netdev` is used by many Linux distributions to mark the file system as a network file system.
c. Additional filesystem [mount options](/userguide#mount) can be added after `_netdev` separated by commas.
Example:
s3://bucket-name /ofs objectivefs auto,_netdev,mt,noatime,nodiratime 0 0
`$ chkconfig --level 3 netfs on $ chkconfig --list netfs netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off`
/etc/fstab
is set up correctly to mount on boot.$ sudo mount -a
If SELinux is enabled and you get an error during boot, you may need one of the following commands to allow mount on boot.
$ setsebool -P allow_mount_anyfile 1
$ semanage permissive -a mount_t
All examples below assumes your filesystem is stored in an S3 bucket called myfs
and your mount directory is /ofs
.
Mount on boot with multithreading and compaction level 3 enabled
Add this line in /etc/fstab
:
s3://myfs /ofs objectivefs auto,_netdev,mt,compact=3 0 0
Mount on boot with disk cache enabled
a. Add a file /etc/objectivefs.env/DISKCACHE_SIZE
that contains the desired disk cache size, e.g. 500G.
(see disk cache user guide for options)
# echo 500G > /etc/objectivefs.env/DISKCACHE_SIZE
b. Add this line in /etc/fstab
s3://myfs /ofs objectivefs auto,_netdev 0 0
/etc/ofs.admin
s3://myfs /ofs objectivefs auto,_netdev,env=/etc/ofs.admin 0 0
Last updated by ObjectiveFS staff, May 02, 2020
ObjectiveFS is a shared file system for OS X and Linux that automatically scales and gives you scalable cloud storage.
If you have questions or article idea suggestions, please email us at support@objectivefs.com