CatDV Portal‎ > ‎

NSA CatDV VM1 Linux VM

The following are Frequently Asked Questions about the NSA VM1 CatDV Server Linux Virtual Machines.


Q: How do I mount a CIFS (SMB) share to a linux computer or VM?

Mounting Instructions


Manual Mount Syntax:


sudo mount -t cifs -o username=authorized_user  //server-address/share /media/mount


Edit fstab to add the CIFS mount

sudo vi /etc/fstab


Example for /etc/fstab to mount a CIFS share


//10.113.101.100/sf_akomi-data /media/sf_akomi-data cifs username=storage-user,password=storage-password,file_mode=0775,dir_mode=0775,uid=apache,gid=northshore,nofail 0 0


There have been issues with SMB version. Updated syntax specifies newer version:


//10.113.101.100/sf_akomi-data /media/sf_akomi-data cifs credentials=/root/.smbcredentials,file_mode=0775,dir_mode=0775,uid=apache,gid=northshore,vers=2.1,nofail 0 0


.smbcredentials contents:

username=MyUsername

password=MyPassword



Mounting Storage from FSTAB

Mounts all entries in fstab with verbose output


sudo mount -av


Unmounting storage


sudo umount /path/to/folder

Example: sudo umount /Volumes/MEDIA01


General SMB mount notes:

Always put "nofail" in the fstab entry. This tells the server to not halt the boot process if a desired/configured mount is not available to the client at boot time. 


Quantum StorNext SMB notes:

Tech Source, Thank You:  Rowie Nameri from IMT


Always put "noperm" in the fstab entry. This tells the server that the client is not overriding the server's understanding of who should be accessing the data, which it determines based on:

  • 1- Share level - Access to the share is set on the Quantum SMB server. You wont be able to mount the share if the user youre mounting with isnt allowed. By default everyone is allowed, but we usually set "valid users=" there to restrict access to a particular set of users. There are also other options that can be set globally per share, like umask etc. This is standard Samba stuff.

  • 2- File level - Stornext specific behavior: Access and permissions to the data in the share by default are based on file level ACLs only. POSIX permissions are completely disregarded.

    • If there is no ACL on the file/dir, the Quantum SMB server assumes an "Everyone Allow" ACL should be there and the file/dir is wide open.

    • It is possible to change the default behavior so that with no ACL present, the server will translate the POSIX permissions of the file/dir to the closest approximation as an ACL, and that will be the access granted. 

    • In the Quantum smb.conf. "snfs:enable default acl" is the default behavior, and changing that to "disable" would switch the behavior to translating POSIX when no ACL present.

Always add "vers=3.0" (or 2.1 or whatever the max SMB version capability of your Linux client) into the fstab entry. It is standard Linux client behavior to mount any SMB share using SMB1 by default, which is slow and problematic.

 

//stornext.local/MediaStor/Akomi/sf_akomi-data /media/sf_akomi-data cifs credentials=/root/.smbcredentials,vers=3.0,noperm,nofail     0       0