Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Mounting FreeNAS CIFS (SMB) share to Bhyve Ubuntu VM

Status
Not open for further replies.

ThatGuy

Neophyte
Joined
Oct 30, 2017
Messages
5
Hi I have FreeNAS running v11.0 U4, it just idles along quite nicely.

I have a CIFS share as the majority of network devices are Microsoft. shared as \\server\Public
So no password is required when accessing the share.
I have a new VM (Ubuntu 16.04 LTS server) running on the NAS.
I need to mount my share as //serverip/Public/SubFolder /mnt/mntfolder
however I cannot get the VM to mount the share.
I have another share on an MS box that is password protected, this I can mount without issue, passing the user= and pass= parameters to the mount command.
Is there any special trick to mount a CIFS share as guest, I keep getting an error in the logs: mount error(95): Operation not supported Refer to the mount.cifs(8) manual page. I however am not sure which options I should be using.

command used:
mount -t cifs //ip.address.x.x/Public/Media /mnt/media guest,_netdev,rw,iocharset=utf8 0 0
and
mount -t cifs //ip.address.x.x/Public/Media /mnt/media user=guest,pass=guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777,_netdev 0 0


Are there any restrictions on mounting a FreeNAS Share from local bhyve VM to the local FreeNAS array?
 
Last edited by a moderator:

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,395
Those commands have mixed /etc/fstab and command-line mount usage. Using mount from the command line, the options are usually before the parameters (mount might require that). And there are no final two fields, those are only present in /etc/fstab.
 

ThatGuy

Neophyte
Joined
Oct 30, 2017
Messages
5
Thanks for the reply wblock.

I have fstab working on my password protected share as:
Code:
//10.100.100.17/Recorded\040TV /mnt/rectv cifs user=user,pass=passwd,iocharset=utf8,sec=ntlm,_netdev  0  0

this mounts the share successfully.

Trying to mount an unprotected share as follows results in error 95.
Code:
//10.100.100.10/Public/Media /mnt/media cifs user=guest,pass=,iocharset=utf8,sec=ntlm,_netdev 0 0

also tried:
Code:
//10.100.100.10/Public/Media /mnt/media cifs guest,iocharset=utf8,sec=ntlm,_netdev 0 0 

this has the same error.
Any thoughts on how I can mount a share that is not password protected and is SMB/CIFS from the Freenas? the successful share is on a Windows pc.
thanks.
p.s. thanks for the tip on code!
 

ThatGuy

Neophyte
Joined
Oct 30, 2017
Messages
5
Ok so I have managed to get it to work, yhipee!

solution was two fold.
I used the following in fstab:
Code:
//10.100.100.10/Public/Media /mnt/media cifs guest,vers=3.0,iocharset=utf8,sec=ntlm,_netdev 0 0

note the "vers=3.0" option, this however was not everything.
I also had to change the FreeNAS SMB service to a minimum of 2.0, changing this to version minimum 3.0 causes the mounts to be lost.
 
Last edited by a moderator:

Ericloewe

Not-very-passive-but-aggressive
Moderator
Joined
Feb 15, 2014
Messages
16,261
FreeNAS' default SMB3 setting is the Windows 10 version, which probably explains that quirk.
 

nojohnny101

Neophyte Sage
Joined
Dec 3, 2015
Messages
1,455
Your commands have been very helpful. I was just working on this today to get and mount my password protected SMB share from FN on my raspberry pi.

I ran the command similar to yours but it failed to mount. Any idea what I have missed?

Code:
 mount -t-o cifs //192.168.0.1/mnt/tank/path/to/media /media/storage/remotebox user=myFNusername,pass=myFNpassword,iocharset=utf8,nofail,sec=ntlm,_netdev
 

nojohnny101

Neophyte Sage
Joined
Dec 3, 2015
Messages
1,455
Nuke that "sec=ntlm" portion. You want to use real auth methods Ubuntu needs to fix their wiki.
Hmm. Well I'm trying to eliminate as many things as possible to find out why it doesn't want to connect and even if I just run:

Code:
 mount -t -o cifs //192.168.0.1/mnt/tank/path/to/media /media/storage/remotebox user=myFNusername,pass=myFNpassword

When I run that command, just barebones, it spits out part of the man mount.cifs page:

Usage:

mount [-lhV]

mount -a [options]

mount [options] [--source] <source> | [--target] <directory>

mount [options] <source> <directory>

mount <operation> <mountpoint> [<target>]


Mount a filesystem.


Options:

-a, --all mount all filesystems mentioned in fstab

-c, --no-canonicalize don't canonicalize paths

-f, --fake dry run; skip the mount(2) syscall

-F, --fork fork off for each device (use with -a)

-T, --fstab <path> alternative file to /etc/fstab

-i, --internal-only don't call the mount.<type> helpers

-l, --show-labels show also filesystem labels

-n, --no-mtab don't write to /etc/mtab

-o, --options <list> comma-separated list of mount options

-O, --test-opts <list> limit the set of filesystems (use with -a)

-r, --read-only mount the filesystem read-only (same as -o ro)

-t, --types <list> limit the set of filesystem types

--source <src> explicitly specifies source (path, label, uuid)

--target <target> explicitly specifies mountpoint

-v, --verbose say what is being done

-w, --rw, --read-write mount the filesystem read-write (default)


-h, --help display this help and exit
? Is this a problem from the raspberry pi side or some of my SMB settings on FreeNAS?
 

Linkman

Member
Joined
Feb 19, 2015
Messages
218
Isn't your initial "-t" supposed to be followed by a list of filesystem types (see man page output for -t, --types <list>)
 

nojohnny101

Neophyte Sage
Joined
Dec 3, 2015
Messages
1,455
Well you're right, I guess I don't need that -t and I also eliminated -o

I did -v to see more errors and it is now telling me mount error(13): permission denied.

after googling, some people have resolved this with specifying the security type with -osec option. does FreeNAS require this?
 
Status
Not open for further replies.
Top