Map NFS Clients to Server's Owner:Group?

Status
Not open for further replies.

nello

Patron
Joined
Dec 30, 2012
Messages
351
2016.08.25 Update
TL;DR
Lessons learned:
  • If using hostname, make sure that it resolves. If the hostname refers to a LAN computer, it probably will not resolve unless you've gone out of your way to make it do so, e.g., set up your own LAN DNS.

  • NFS version 3 (NFS3) supports using client UID:GID for host (read/write) permissions. NFS version 4 (NFS4) does not (seem) to support this feature at this time.

  • Make sure that the ZFS Dataset allows for world execute.
End of Update.




I have Ubuntu 16 running as a guest OS on FreeNAS using bhyve/iohyve. I'm running CrashPlan in this VM and want CrashPlan's Destination to be outside of the VM, so I'm trying to create an NFS share for /mnt/red/crashPlanOctoberGroupNAS. This directory and all the files in it are owned by crashPlan:backup:
Code:
[root@OctoberGroupNAS /]# ls -Al /mnt/red/                             
total 233                                                               
...
drwxrwx---  15 crashPlan  backup  17 Aug  7 17:00 crashPlanOctoberGroupNAS
...             
[root@OctoberGroupNAS /]#



In order for CrashPlan to read and write to the existing backup archives in this directory, I want the file permissions to map to crashPlan:backup when the share is mounted by Ubuntu. After reading the fine manual, I thought this could be done by configuring:
  • Mapall User = crashPlan
  • Mapall Group = backup

Like this:
OctoberGroupNAS_-_FreeNAS-9_10_1__d989edd_.png



I'm able to mount this NFS share from within Ubuntu:
Code:
nello@ubuntu16:~$ sudo mount 10.10.49.10:/mnt/red/crashPlanOctoberGroupNAS /mnt/nfs/crashPlanOctoberGroupNAS
nello@ubuntu16:~$ df -h
Filesystem                                     Size  Used Avail Use% Mounted on
...
10.10.49.10:/mnt/red/crashPlanOctoberGroupNAS  7.3T  2.9T  4.5T  40% /mnt/nfs/crashPlanOctoberGroupNAS
nello@ubuntu16:~$



But, the permissions for the share are NOT crashPlan:backup:
Code:
nello@ubuntu16:~$ ls -Al /mnt/nfs
total 17
drwxrwx--- 15 nobody 4294967294 17 Aug  7 17:00 crashPlanOctoberGroupNAS
nello@ubuntu16:~$



And, as a result, Ubuntu can neither list the directory nor write a file into it:
Code:
nello@ubuntu16:~$ ls -Al /mnt/nfs/crashPlanOctoberGroupNAS
ls: cannot open directory '/mnt/nfs/crashPlanOctoberGroupNAS': Permission denied
nello@ubuntu16:~$ touch /mnt/nfs/crashPlanOctoberGroupNAS/trashMe.txt
touch: cannot touch '/mnt/nfs/crashPlanOctoberGroupNAS/trashMe.txt': Permission denied
nello@ubuntu16:~$



How do I create an NFS share that Ubuntu can mount and from/to which CrashPlan can read and write?

Thank you.

- nello
 
Last edited:

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
The UID and GID need to match on both systems. If your user/group as a UID/GID of 1001/1001, this needs to be the same on the other machine.
 

nello

Patron
Joined
Dec 30, 2012
Messages
351
The UID and GID need to match on both systems.

On FreeNAS ...

Here are the permissions on the directory I'm trying to share, /mnt/red/trashMe:
Code:
[root@OctoberGroupNAS /]# ls -Al /mnt/red                                  
total 233                                                                  
...       
drwxr-xr-x   2 crashPlan  backup   3 Aug 14 10:50 trashMe                            
[root@OctoberGroupNAS /]#



Here's the FreeNAS share for directory /mnt/red/trashMe with Mapall User and Mapall Group set to crashPlan and backup, respectively:
OctoberGroupNAS_-_FreeNAS-9_10_1__d989edd_.png



Here's the UID and GID for crashPlan, 1001 and 1001, respectively:
Code:
[root@OctoberGroupNAS /]# cat /etc/passwd | grep crashPlan                  
crashPlan:*:1001:1001:CrashPlan Backups:/nonexistent:/bin/csh              
[root@OctoberGroupNAS /]#



Here's the GID for backup, 1001:
Code:
[root@OctoberGroupNAS ~]# cat /etc/group | grep backup
backup:*:1001:                                                              
[root@OctoberGroupNAS ~]#



On Ubuntu (VM) ...

Here's the UID and GID for crashPlan, 1001 and 1001, respectively:
Code:
nello@ubuntu16:~$ cat /etc/passwd | grep crashPlan
crashPlan:x:1001:1001:crashPlan User for NFS share,,,:/home/crashPlan:/bin/bash
nello@ubuntu16:~$



Here's the GID for backup, 1001:
Code:
nello@ubuntu16:~$ cat /etc/group | grep backup
backupSystem:x:34:crashPlan
backup:x:1001:
nello@ubuntu16:~$



Unfortunately, after mounting the share, I'm still not able to read the directory or write files in it:
Code:
nello@ubuntu16:~$ sudo mount 10.10.49.10:/mnt/red/trashMe /mnt/nfs/crashPlanOctoberGroupNAS
nello@ubuntu16:~$ ls -Al /mnt/nfs
total 1
drwxr-xr-x 2 nobody 4294967294 3 Aug 14 10:50 crashPlanOctoberGroupNAS
nello@ubuntu16:~$ ls -Al /mnt/nfs/crashPlanOctoberGroupNAS
ls: reading directory '/mnt/nfs/crashPlanOctoberGroupNAS': Input/output error
total 0
nello@ubuntu16:/$ touch /mnt/nfs/crashPlanOctoberGroupNAS/empty.txt
touch: cannot touch '/mnt/nfs/crashPlanOctoberGroupNAS/empty.txt': Input/output error
nello@ubuntu16:/$


@m0nkey_: What am I doing wrong?



2016.08.15 Update

It seems like a lot of people have mounted existing CrashPlan backup sets and adopted them by CrashPlan running in a Linux VM, running in either a VirtualBox Jail or iohyve/bhyve. This can't be that hard. I must me making a simple mistake. What is it?

Creating a VirtualBox jail, installing a VM using an ISO file, downloading and installing CrashPlan within the VM and then mounting the datasets you want to backup is a 15-20 minute job.
I've gone the VM route too! CentOS 6.7 with NFS mounts to FreeNAS datasets. Seems to be a good solution to a continually breaking CrashPlan jail.

@AdrianWilliamson: I've spent a few weeks trying to do what you've suggested, first within a VirtualBox Jail (too slow and couldn't mount the datasets), and now with iohyve/bhyve. Can you give me some guidance on how to set up the NFS share in FreeNAS and mount it so that CrashPlan in the VM can read and write from/to it?


I switched to a Linux vm running crashplan with my data mounted into the VM.
@SweetAndLow: How did you set up the NFS share in FreeNAS and mount it in your VM?


Here is what I have done....
Created a linux VM.
In the fstab, created NFS mounts to the FreeNas shares I wanted to backup.
On the linux VM, installed the supported CP application from CP.
Adopted the backups I already at CP (https://support.code42.com/CrashPlan/4/Configuring/Replacing_Your_Device)
done ...

@stone961: How did you set up your NFS share in FreeNAS so that CrashPlan in the VM can read and write from/to it?



... I am using bhyve/iohyve to host the ubuntu guest.... I just setup NFS shares and mounted them in fstab. Seems to be running fairly smoothly so far.

@icsy7867: How did you set up your NFS share in FreeNAS so that CrashPlan in the VM can read and write from/to it?


... My experience (and that of others who have posted) is that Crashplan works just fine on a supported platform (in my case, running in an Ubuntu VM).

... I gave up and installed it [Crashplan] under Linux instead. ...
@danb35: How did you share your existing backups in FreeNAS so that CrashPlan in the VM can read and write from/to it?
 
Last edited:

nello

Patron
Joined
Dec 30, 2012
Messages
351
According to this reply on a serverfault.com thread:
... To specify the user and group IDs to use with remote users from a particular host, use the anonuid and anongid options, respectively. In this case, a special user account can be created for remote NFS users to share and specify (anonuid=,anongid=), where is the user ID number and is the group ID number.

You'll need to add the flag no_root_squash to disable this, as it's on by default.


A reply posted on another thread on serverfault.com says:
We are using the NFS options anonuid and anongid to set the user/group IDs the server will use for files created by anonymous. If these are not set, "nobody" and "nogroup" will be used - which may vary depending on OS version and distribution. So a

/websites 10.0.0.0/8
(fsid=0,no_subtree_check,rw,no_root_squash,anonuid=1001,anongid=1001)
^^^^^^^^^^^^^^^^^^^^^^^^^^

may to the trick (with 1001 being a valid and usable UID/GID on your server).


@m0nkey_, is this what you meant when you said:
The UID and GID need to match on both systems. If your user/group as a UID/GID of 1001/1001, this needs to be the same on the other machine.


My FreeNAS export lacks the options no_root_squash, anonuid and anongid:
Code:
[root@OctoberGroupNAS ~]# cat /etc/exports
V4: / -sec=sys          
/mnt/red/trashMe  -mapall=crashPlan:backup ubuntu16       
/mnt/red/isos  -alldirs     
/mnt/red/crashPlanOctoberGroupNAS  -mapall=crashPlan:backup ubusrv16          
[root@OctoberGroupNAS ~]#



Unfortunately, I don't see anything in the FreeNAS documentation of NFS Shares that mentions the options no_root_squash, anonuid, or anongid so I guess that what I want to do can't be done in the FreeNAS GUI. But that seems like an unlikely oversight.


Can someone confirm that the NFS share options no_root_squash, anonuid, and anongid can NOT be set from the FreeNAS GUI?


 
Last edited:

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
First off, each user has a UID, and each group has a GID. Each UID must be unique, and each GID must be unique.

What you showed in the first post was that the "crashPlan" users (on each system) had a UID of 1001, and their primary group was the group with GID 1001, whatever that group happened to be. You also showed that the GID of the group "backup" (on each system) had a GID of 1001. However, that would be odd at first glace, because usually a user's primary group is the same as their name (though it can be configured otherwise), which makes me curious if you have two groups on each system with a GID of 1001. Do a "cat /etc/group | grep 1001" and see what you get.

You shouldn't need to concern yourself with the NFS options to make this work. In fact, I don't think you actually need to set the Mapall user/group, as long as the files are owned by crashPlan:backup.

Do you have any directory services configured? I'm wondering if you are getting your crashPlan user or backup group from a directory service instead of the local one.
 

nello

Patron
Joined
Dec 30, 2012
Messages
351
... usually a user's primary group is the same as their name ....
Yes, when I created crashPlan on Ubuntu, it created a new group of the same name. Ubuntu also already had a group named backup, so I renamed it to backupSystem and created a new backup group, assigned it a GID of 1001, and made it crashPlan's primary group.

Might it be a problem that crashPlan has two groups?(No, it has no effect; See update below.)
Code:
nello@ubuntu16:~$ groups crashPlan
crashPlan : backup backupSystem
nello@ubuntu16:~$





Do a "cat /etc/group | grep 1001" and see what you get.
On FreeNAS:
Code:
[root@OctoberGroupNAS ~]# cat /etc/group | grep 1001                          
backup:*:1001:                                                                
[root@OctoberGroupNAS ~]# cat /etc/passwd | grep 1001                        
crashPlan:*:1001:1001:CrashPlan Backups:/nonexistent:/bin/csh                
[root@OctoberGroupNAS ~]#


On Ubuntu:
Code:
nello@ubuntu16:~$ cat /etc/group | grep 1001
backup:x:1001:
nello@ubuntu16:~$ cat /etc/passwd | grep 1001
crashPlan:x:1001:1001:crashPlan User for NFS share,,,:/home/crashPlan:/bin/bash
nello@ubuntu16:~$



You shouldn't need to concern yourself with the NFS options to make this work. In fact, I don't think you actually need to set the Mapall user/group, as long as the files are owned by crashPlan:backup.
Yes, the directory being shared is owned by crashPlan:backup:
Code:
[root@OctoberGroupNAS ~]# ls -Aln /mnt/red                                   
total 233                                                                     
...
drwxrwx---  15 1001  1001  17 Aug  7 17:00 crashPlanOctoberGroupNAS           
...                       
drwxr-xr-x   2 1001  1001   3 Aug 14 10:50 trashMe                           
[root@OctoberGroupNAS ~]#


Do you have any directory services configured?
Good question. But, no, I don't have any directory services configured.


2016.08.15 Update

Removing crashPlan from the group backupSystem did NOT solve my permissions problem.
Code:
nello@ubuntu16:~$ sudo deluser crashPlan backupSystem
Removing user `crashPlan' from group `backupSystem' ...
Done.
nello@ubuntu16:~$ getent group backupSystem
backupSystem:x:34:
nello@ubuntu16:~$ groups crashPlan
crashPlan : backup
nello@ubuntu16:~$ sudo mount 10.10.49.10:/mnt/red/crashPlanOctoberGroupNAS /mnt/nfs/crashPlanOctoberGroupNAS
nello@ubuntu16:~$ ls -Al /mnt/nfs
total 17
drwxrwx--- 15 nobody 4294967294 17 Aug  7 17:00 crashPlanOctoberGroupNAS
nello@ubuntu16:~$ ls -Al /mnt/nfs/crashPlanOctoberGroupNAS
ls: cannot open directory '/mnt/nfs/crashPlanOctoberGroupNAS': Permission denied
nello@ubuntu16:~$
 
Last edited:

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
I'm wondering if something you've configured in the attempt to fix this is what's breaking it now. Can you make a new dataset and a new NFS share? Set the dataset owner/group to crashPlan/backup (and tweak the permissions as appropriate). Make sure you check the three "apply" check boxes, and check the "set recursively" box as well.

The only change you should have to make in the NFS share settings is to add your IP/hostname to the allowed IP/hostname field.
 

nello

Patron
Joined
Dec 30, 2012
Messages
351
I'm wondering if something you've configured in the attempt to fix this is what's breaking it now.
It wouldn't surprise me.

Can you make a new dataset and a new NFS share?
Does an NFS share need to be at the root of a ZFS dataset? If so, maybe that was one of my problems. Nevertheless, here's my new dataset:
OctoberGroupNAS_-_FreeNAS-9_10_1__d989edd_.png


Set the dataset owner/group to crashPlan/backup (and tweak the permissions as appropriate). Make sure you check the three "apply" check boxes, and check the "set recursively" box as well.
Done:
OctoberGroupNAS_-_FreeNAS-9_10_1__d989edd_.png


The only change you should have to make in the NFS share settings is to add your IP/hostname to the allowed IP/hostname field.
Done:
OctoberGroupNAS_-_FreeNAS-9_10_1__d989edd_.png


I turned off/on the NFS service just to make everything's updated.

The export shows that this new dataset share has no options enabled:
Code:
[root@OctoberGroupNAS ~]# cat /etc/exports                                    
V4: / -sec=sys                                                                
/mnt/red/fresh  ubuntu16                                                      
/mnt/red/trashMe  -mapall=crashPlan:backup ubuntu16                            
/mnt/red/isos  -alldirs                                                        
/mnt/red/crashPlanOctoberGroupNAS  -mapall=crashPlan:backup ubusrv16          
[root@OctoberGroupNAS ~]#



Unfortunately, it still mounts as nobody:nogroup:
Code:
nello@ubuntu16:~$ sudo mount 10.10.49.10:/mnt/red/fresh /mnt/nfs/crashPlanOctoberGroupNAS
nello@ubuntu16:~$ df -h
Filesystem                     Size  Used Avail Use% Mounted on
udev                           2.0G     0  2.0G   0% /dev
tmpfs                          396M  6.0M  390M   2% /run
/dev/mapper/ubuntu16--vg-root   18G  5.1G   12G  32% /
tmpfs                          2.0G  140K  2.0G   1% /dev/shm
tmpfs                          5.0M     0  5.0M   0% /run/lock
tmpfs                          2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda1                      472M  110M  339M  25% /boot
tmpfs                          396M  8.0K  396M   1% /run/user/1000
10.10.49.10:/mnt/red/fresh      10G  128K   10G   1% /mnt/nfs/crashPlanOctoberGroupNAS
nello@ubuntu16:~$ ls -Aln /mnt/nfs
total 1
drwxrwxrwx 2 65534 4294967294 2 Aug 16 14:20 crashPlanOctoberGroupNAS
nello@ubuntu16:~$ ls -Al /mnt/nfs
total 1
drwxrwxrwx 2 nobody 4294967294 2 Aug 16 14:20 crashPlanOctoberGroupNAS



Oh, but now I think I see the problem. The directory I'm using as the mount point is owned by root:root:
Code:
nello@ubuntu16:/mnt/nfs$ sudo umount /mnt/nfs/crashPlanOctoberGroupNAS
nello@ubuntu16:/mnt/nfs$ ls -Al
total 4
drwxr-xr-x 2 root root 4096 Aug 13 20:46 crashPlanOctoberGroupNAS



So I change the ownership to crashPlan:backup and try mounting the share again:
Code:
nello@ubuntu16:/mnt/nfs$ sudo chown -R crashPlan:backup crashPlanOctoberGroupNAS
nello@ubuntu16:/mnt/nfs$ ls -Al
total 4
drwxr-xr-x 2 crashPlan backup 4096 Aug 13 20:46 crashPlanOctoberGroupNAS
nello@ubuntu16:/mnt/nfs$ cd /
nello@ubuntu16:/$ sudo mount 10.10.49.10:/mnt/red/fresh /mnt/nfs/crashPlanOctoberGroupNAS



But it still mounts as nobody:nogroup and Ubuntu still can't list the mounted share or write to it:
Code:
nello@ubuntu16:/$ ls -Al /mnt/nfs
total 1
drwxrwxrwx 2 nobody 4294967294 2 Aug 16 14:20 crashPlanOctoberGroupNAS
nello@ubuntu16:/$ cd /mnt/nfs/crashPlanOctoberGroupNAS
nello@ubuntu16:/mnt/nfs/crashPlanOctoberGroupNAS$ ls -Al
ls: reading directory '.': Input/output error
total 0
nello@ubuntu16:/mnt/nfs/crashPlanOctoberGroupNAS$ touch /mnt/nfs/crashPlanOctoberGroupNAS/empty.txt
touch: cannot touch '/mnt/nfs/crashPlanOctoberGroupNAS/empty.txt': Input/output error
nello@ubuntu16:/mnt/nfs/crashPlanOctoberGroupNAS$


I'm still getting an Input/output error.

I must be doing something wrong that's staring me in the face.
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
Just to be sure, can FreeNAS resolve the host "ubuntu16"? I would assume that if it couldn't, it wouldn't even let you mount the drive, but I'm not so sure about that.
 

nello

Patron
Joined
Dec 30, 2012
Messages
351

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
A good 'ole "ping" will do. I just want to make sure that FreeNAS understands who "ubuntu16" is. You could also put ubuntu16's IP address in there instead of its hostname.
 

nello

Patron
Joined
Dec 30, 2012
Messages
351
A good 'ole "ping" will do. I just want to make sure that FreeNAS understands who "ubuntu16" is.
YES!!!!

The client's hostname is ubuntu16:
Code:
nello@ubuntu16:/$ hostname
ubuntu16
nello@ubuntu16:/$



But you are correct, FreeNAS can't resolve it (because, I suppose, it's using OpenDNS for its DNS service):
Code:
[root@OctoberGroupNAS ~]# ping ubuntu16                                         
ping: cannot resolve ubuntu16: Unknown host                                   
[root@OctoberGroupNAS ~]# nslookup ubuntu16                                   
Server:         208.67.222.222                                               
Address:        208.67.222.222#53                                             
                                                                             
** server can't find ubuntu16: NXDOMAIN                                       
                                                                             
[root@OctoberGroupNAS ~]#


You could also put ubuntu16's IP address in there instead of its hostname.
I changed the share to use the IP address and now I'm able to read and write to the mounted directory!!!

But ... it's still mounting as nobody:nogroup:
Code:
nello@ubuntu16:/$ sudo mount 10.10.49.10:/mnt/red/fresh /mnt/nfs/crashPlanOctoberGroupNAS
nello@ubuntu16:/$ touch /mnt/nfs/crashPlanOctoberGroupNAS/empty.txt
nello@ubuntu16:/$ cd /mnt/nfs/crashPlanOctoberGroupNAS
nello@ubuntu16:/mnt/nfs/crashPlanOctoberGroupNAS$ ls -Al
total 1
-rw-rw-r-- 1 nobody 4294967294 0 Aug 16 16:00 empty.txt
nello@ubuntu16:/mnt/nfs/crashPlanOctoberGroupNAS$ cd ..
nello@ubuntu16:/mnt/nfs$ ls -Al
total 1
drwxrwxrwx 2 nobody 4294967294 3 Aug 16 16:00 crashPlanOctoberGroupNAS
nello@ubuntu16:/mnt/nfs$



Why doesn't it mount as crashPlan:backup?
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
Try:
Code:
sudo mount -o uid=1001,gid=1001 10.10.49.10:/mnt/red/fresh /mnt/nfs/crashPlanOctoberGroupNAS


If that doesn't work, what happens if you change the owner of the test file to crashPlan:backup?
 

nello

Patron
Joined
Dec 30, 2012
Messages
351
Try:
Code:
sudo mount -o uid=1001,gid=1001 10.10.49.10:/mnt/red/fresh /mnt/nfs/crashPlanOctoberGroupNAS
Unfortunately, neither uid nor gid are valid options:
Code:
nello@ubuntu16:/$ sudo mount -o uid=1001,gid=1001 10.10.49.10:/mnt/red/fresh /mnt/nfs/crashPlanOctoberGroupNAS
mount.nfs: an incorrect mount option was specified
nello@ubuntu16:/$ 



If that doesn't work, what happens if you change the owner of the test file to crashPlan:backup?
I'm sorry, I don't understand what file you are referring to. I've been focused on the ownership of the mount point root; what should I be looking at?
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
From Ubuntu:
Code:
sudo chown crashPlan:backup /mnt/nfs/crashPlanOctoberGroupNAS/empty.txt


From the FreeNAS server, check the owner/group on the file after you run the above.
 

nello

Patron
Joined
Dec 30, 2012
Messages
351
From Ubuntu:
Code:
sudo chown crashPlan:backup /mnt/nfs/crashPlanOctoberGroupNAS/empty.txt
The error message is Operation not permitteed.
Code:
nello@ubuntu16:/$ sudo chown crashPlan:backup /mnt/nfs/crashPlanOctoberGroupNAS/empty.txt
chown: changing ownership of '/mnt/nfs/crashPlanOctoberGroupNAS/empty.txt': Operation not permitted
nello@ubuntu16:/$ 



From the FreeNAS server, check the owner/group on the file after you run the above.
Code:
[root@OctoberGroupNAS ~]# ls -Al /mnt/red/fresh/                 
total 34                                                                      
drwxr-xr-x  3 4294967294  backup  13 Aug 16 17:46 754740932183315422          
-rw-rw-r--  1 1000        backup   0 Aug 16 16:00 empty.txt                    
[root@OctoberGroupNAS ~]#
 

nello

Patron
Joined
Dec 30, 2012
Messages
351
For what it's worth, I ran CrashPlan on the Ubuntu VM, backing up my Ubuntu usr directory to the mount point. It worked like a charm, even though the permissions are still wrong.
Code:
[root@OctoberGroupNAS ~]# ls -Al /mnt/red/fresh/754740932183315422           
total 283                                                                     
-rw-r--r--  1 4294967294  backup     18 Aug 16 17:45 754740932183315422       
-rw-r--r--  1 4294967294  backup    712 Aug 16 17:46 cp.properties           
drwxr-xr-x  2 4294967294  backup      5 Aug 16 17:46 cpbf0000000000000000000 
-rw-r--r--  1 4294967294  backup    349 Aug 16 17:46 cpbp                     
-rw-r--r--  1 4294967294  backup  42430 Aug 16 17:46 cpfmf                   
-rw-r--r--  1 4294967294  backup  26967 Aug 16 17:46 cpfmfp                   
-rw-r--r--  1 4294967294  backup      8 Aug 16 17:46 cpfmfs                   
-rw-r--r--  1 4294967294  backup  13619 Aug 16 17:46 cpfmfx                   
-rw-r--r--  1 4294967294  backup  32168 Aug 16 17:46 cphdf                   
-rw-r--r--  1 4294967294  backup   1754 Aug 16 17:46 cprp                     
-rw-r--r--  1 4294967294  backup  14946 Aug 16 17:46 cptl                     
[root@OctoberGroupNAS ~]#



It backed up 279 files and 167.2MB in about 10 seconds. Nice!
 
Last edited:

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
So, something is going on here related to UIDs and GIDs not getting mapped correctly. I'm not super familiar with Ubuntu, but I'm wondering if it's doing something funky here.

From FreeNAS, do the "chown" command above on the empty.txt file. What do you see in Ubuntu after doing it?

Did you by chance enable NFSv4? There's a checkbox in the Services->NFS settings. If you did check the box, can you uncheck it?
 

nello

Patron
Joined
Dec 30, 2012
Messages
351
From FreeNAS, do the "chown" command above on the empty.txt file. What do you see in Ubuntu after doing it?
Unfortunately, I can't execute that command from FreeNAS:
Code:
[root@OctoberGroupNAS /]# ls -Al /mnt/red/fresh                                
total 34                                                                      
drwxr-xr-x  3 4294967294  backup  13 Aug 16 17:46 754740932183315422          
-rw-rw-r--  1 1000        backup   0 Aug 16 16:00 empty.txt                    
[root@OctoberGroupNAS /]# sudo chown crashPlan:backup /mnt/red/fresh/empty.txt
Sorry, user root is not allowed to execute '/usr/sbin/chown crashPlan:backup /mn
t/red/fresh/empty.txt' as root on OctoberGroupNAS.local.                      
[root@OctoberGroupNAS /]#




Did you by chance enable NFSv4? There's a checkbox in the Services->NFS settings. If you did check the box, can you uncheck it?
Yes, it was checked. I unchecked it and this is what it looks like now:
OctoberGroupNAS_-_FreeNAS-9_10_1__d989edd_.png


I stopped/started the service and then tried to mount the share from Ubuntu ... but apparently Ubuntu wants NFS v4 and isn't able to connect when it attempts v3 protocol:
Code:
nello@ubuntu16:/$ sudo mount -v  10.10.49.10:/mnt/red/fresh /mnt/nfs/crashPlanOctoberGroupNAS
mount.nfs: timeout set for Tue Aug 16 19:04:58 2016
mount.nfs: trying text-based options 'vers=4,addr=10.10.49.10,clientaddr=10.10.49.123'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=10.10.49.10'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 10.10.49.10 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 10.10.49.10 prog 100005 vers 3 prot UDP port 716
nello@ubuntu16:/$ 
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
You don't need the "sudo" for the command on FreeNAS; you're already root.

You might need to add a "-t nfs" to the mount command, though it looks like its already trying v3. Did you try rebooting the Ubuntu VM?

I'm starting to suspect that this is an Ubuntu problem. Do you have any other linux servers on your network? Could you make another VM, but with something like Debian or CentOS, to try it? (Don't forget to add the new server's IP to the allowed hosts.)
 
Status
Not open for further replies.
Top