Exporting ObjectiveFS to Windows via Samba
This guide covers the steps to share your ObjectiveFS filesystem from Linux to Windows via Samba. For NFS export instructions, see this guide.
What You Need
- Completed installing ObjectiveFS and creating a filesystem on your Linux server.
On the Linux Server
Mount your objectivefs filesystem (e.g. on /ofs).
$ sudo mount.objectivefs <your filesystem> /ofs
Install Samba.
$ sudo apt-get install samba
$ sudo yum install samba
Set a password for your user in Samba.
$ sudo smbpasswd -a <user_name>
Note: Samba uses a separate set of users and passwords (stored in /etc/samba/smbpasswd) instead of the standard Linux system accounts. This user must have read/write permission to the /ofs directory.
Add the following to the end of /etc/samba/smb.conf.
Note: The last two lines are only needed if you want to use Windows ACLs.
[ofs]
path = /ofs
valid users = <user_name>
writable = yes
browseable = yes
; The following lines enable Windows ACL support
vfs objects = acl_xattr
acl_xattr:ignore system acls = yes
nt acl support = yes
Restart the samba server.
$ sudo service smbd restart
$ sudo /etc/init.d/smb restart
$ sudo systemctl restart smb.service
$ sudo systemctl restart nmb.service
You can use this command to check for any syntax errors in smb.conf.
$ testparm
For Linux distributions with SELinux, you might also need to allow Samba sharing:
$ setsebool -P samba_share_fusefs=1
On the Windows server
These steps are for Windows Server 2012 R2.
Set up connection to Linux Samba Server
Start
→ This PC
→ Click on Computer from the top menu
→ Select "Map network drive"
→ For Folder, use: \\<ip address>\ofs
→ Click Finish
→ Enter the user name and password that you have set up
Reference
- Filesystem Mount User Guide
- Mount on boot User Guide
- How To Mount an Instance Store on EC2 for Disk Cache
- How To Restrict S3 Bucket Policy to Only One S3 Bucket
Last updated ObjectiveFS staff
ObjectiveFS is a shared file system for macOS 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