Mount Folder on Ubuntu

Status
Not open for further replies.

spyke84

Dabbler
Joined
Jan 7, 2014
Messages
24
Hi,
i have a problem to mount a folder of my freeNas server.
I created a NFS share but when i browse the network and try to access server i must insert a username and password ... but i have not specify any users.

Can anyone help to make correct configuration to access with a username and password?

tnks a lot
Christian
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Not clear what you're doing.

Go to a command prompt on the Ubuntu box.

Type

ubuntuprompt% sudo mount 10.1.2.3:/mnt/pool/dataset /mnt

This will mount the dataset named "dataset" on pool "pool" on the NFS server "10.1.2.3" on the local system's /mnt directory. Salt to taste.

See what that says, and then write back with the results and a description of your FreeNAS NFS configuration for the export.
 

spyke84

Dabbler
Joined
Jan 7, 2014
Messages
24
thanks for reply!
i see the files in /mnt folder but one folder appear locked and i can't see the content. That folder is a dataset in freenas... is it a problem?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
No. Each dataset is essentially a different filesystem and has to be mounted separately. You can make mounts persistent by adding them to /etc/fstab. Suggest creating a mountpoint other than /mnt ...
 

spyke84

Dabbler
Joined
Jan 7, 2014
Messages
24
when i type a mount command i have this message:
mount.nfs : access denied by server while monunthing 192.1.2.3:/mnt/... in the command i must specify a user?
 
L

L

Guest
Create a user on the freenas that matches the user on the ubuntu with the same uid. On my mac I run as linda/uid 501. You can see the uid of your user on ubuntu by typing $id.

Change the ownership of the dataset to that user and you can also mapall users to use that user in the nfs share.

For some reason the docs use nobody. Nobody is unix is a special account to map to root user on another system. It is considered evil in nfs.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
No, the problem is that NFS does not cross file system boundaries. datasets are file system boundaries, hence they can't be crossed.

This is documented in the FreeNAS documentation because it's an often-overlooked-but-very-important aspect of using ZFS and NFS.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
when i type a mount command i have this message:
mount.nfs : access denied by server while monunthing 192.1.2.3:/mnt/... in the command i must specify a user?

If you did that with sudo, then it sounds like the FreeNAS NFS export isn't correct. Check the logs on the FreeNAS side to see if there's more detail. Post the details of your NFS export here, either snapshot of the relevant screen or cut and paste the contents of /etc/exports.

Create a user on the freenas that matches the user on the ubuntu with the same uid. On my mac I run as linda/uid 501. You can see the uid of your user on ubuntu by typing $id.

Change the ownership of the dataset to that user and you can also mapall users to use that user in the nfs share.

None of which is relevant if the NFS server is refusing the mount.

For some reason the docs use nobody. Nobody is unix is a special account to map to root user on another system. It is considered evil in nfs.

No, it isn't considered evil. nobody is considered the preferred account to use when permissions are not relevant, identities do not map cleanly between realms, and a whole host of other circumstances.
 

spyke84

Dabbler
Joined
Jan 7, 2014
Messages
24
the content of exports file is:
/mnt/nas -alldir -quit -mapall=nobody:nogroup -network 192.178.xx.0/24
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
the content of exports file is:
/mnt/nas -alldir -quit -mapall=nobody:nogroup -network 192.178.xx.0/24

Well, there's your problem. Fix your export to have the correct network.
 

spyke84

Dabbler
Joined
Jan 7, 2014
Messages
24
Done! i change the network. i look the correct ip but the problem Persist!
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Okay, so then you pretty much have to start doing all these things all at once. Tell us your configuration, especially your network configuration, and exports, and what error you're getting, and what is popping up in the log. Trying to do one at a time is a fail.
 

spyke84

Dabbler
Joined
Jan 7, 2014
Messages
24
ok, i try to tell you the configuration: i have a pc with freenas 9 with static ip, 192.168.1.200. a laptop with ubuntu 14 with static ip, 192.168.1.10 and a modem router.
when i mount the folder with command i can see all folder in /mnt folder. But one folder has locked and i can't access.
In freenas i have 2 disks raid-0. i have a jails dlna sharing a folder called myfreenas and a dataset called multimedia. multimedia is a subfolder of myfreenas.
 
Status
Not open for further replies.
Top