Custom Unmanaged NFS/CIFS Shares

From OSNEXUS Online Documentation Site
Jump to: navigation, search

Some specialized deployments may require the creation of special NFS and CIFS share entries that are ignored by QuantaStor. These unmanaged network shares will not appear in the QuantaStor web UI but can be setup manually to provide special access to a QuantaStor Systems. This is usually done for integration with special 3rd party applications or to share out sub-paths of an existing share or Gluster Volume.

Custom NFS Exports

All custom NFS exports should be specified in the /etc/exports.custom file. The contents of this file are appended to the /etc/exports file automatically by the QuantaStor service. After making changes you can force the /etc/exports to update with a restart of the management service using 'service quantastor restart'.

An example of adding a custom NFS export to a custom sub-share called 'customshare' running on a Gluster Volume called 'gvol1' is detailed below:

First Make the custom directory you are looking to export:

mkdir /export/gvol1/customshare

Second, add an NFS exports entry such as the example below to the /etc/exports.custom file using nano or vim:

/export/gvol1/customshare *(rw,insecure,sync,no_subtree_check)

Finally, restart the QuantaStor management service using the command below have QuantaStor apply the custom export to the exports file.

sudo service quantastor restart

The new custom export will appear at the bottom of the /etc/exports directory.

Custom SMB Shares

The smb.conf file can be edited to include custom share entries. Note that any share with a path entry containing /mnt/storage-pools or /mnt/gluster-volumes will be managed by QuantaStor and may be removed automatically. Hence all custom SMB share entries must not use that in the 'path' specifier. To access a sub-path of an existing network share be sure to reference it under its bind point which is under /export/SHARENAME.

An example of adding a custom CIFS share definition for a custom sub-share called 'customshare' running on a Gluster Volume called 'gvol1' is detailed below:

First Make the custom directory you are looking to export:

mkdir /export/gvol1/customshare

Second, add an entry such as the example below to the bottom of the /etc/samba/smb.conf file using nano or vim, this example entry will create a basic CIFS share for admin access by a local samba user called 'localadmin':

[customshare]
admin users = localadmin
valid users = localadmin
browseable = yes
create mask = 0755
directory mask = 0755
hide unreadable = no
hide unwriteable files = no
path = /export/gvol1/customshare
public = no
writable = yes

Finally, restart the CIFS Samba service using the command below to have the 'customshare' defined above made available via CIFS/SMB. Starting with QuantaStor 4.0 we provide both a Samba 3.x and Samba 4.x release, we have provided the restart commands for each below:

For Samba 3.x:

sudo restart smbd 
sudo restart nmbd
sudo service winbind restart

For Samba 4.x:

sudo service sernet-samba-smbd restart
sudo service sernet-samba-nmbd restart
sudo service sernet-samba-winbindd restart