Strange NFS behaviour: Can't copy files but replace

Status
Not open for further replies.

Schnuggler

Cadet
Joined
Oct 4, 2015
Messages
6
Hello,

I already asked at the german forum here, but got no help. Now I try in english.

I have a strange behaviour of my NFS share. I am using Freenas 9.10
My /etc/exports looks like this:
Code:
/mnt/RAID5_Datengrab/MEDIA  -mapall="alphorn_jd":"alphorn_jd" -network 192.168.1
78.0/24
/mnt/RAID5_Datengrab/MEDIA  -mapall="alphorn_jd":"alphorn_jd" heidi

I mount this with Linux Mint 19 with fstab that way:
Code:
freenas:/mnt/RAID5_Datengrab/MEDIA /media/heidi/MEDIA_NFS nfs defaults 0 0


Now I am able to do a lot of different things: Renaming, Create Files and Folder. Just copying or moving files is not possible.
With commandline I get this error:
cp: reguläre Datei './test.txt' kann nicht angelegt werden: Vorgang nicht zulässig
With LM19 Cinnamon Filemanager I get this:
Fehler beim Öffnen der Datei »/media/heidi/MEDIA_NFS/test.txt«: Vorgang nicht zulässig
Both means: Operation not allowed
NOW the strange thing: A file with a size of 0B is created. This file I can replace by using the same command again or drag and drop. The complete file is copied to the share???o_O

What is wrong?

The users are mapped correctly, the files are created with correct user and rights.

Best regards
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Questions:

1. Which network is host heidi on?
2. What are the source and destination of your copy command?
 

Schnuggler

Cadet
Joined
Oct 4, 2015
Messages
6
My Linux-PC heidi is in the workgroup "workgroup", but isn't this just necessary for Samba?
Heidi and Freenas are connected to the same Router and DHCP. Heidi has IP 192.168.178.66 and freenas 192.168.178.39
The source of the copy command is the home folder of heidi: /home/heidi/
The destination is the mounted NFS folder: /media/heidi/MEDIA_NFS/
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Can you cat the files?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Surely your export file only needs either one of the two entries you have, but not both? This assumes heidi is in your FreeNAS host file, or you've got working DNS (forward and reverse) on your network, and FreeNAS can fully resolve heidi.
 

Schnuggler

Cadet
Joined
Oct 4, 2015
Messages
6
Hello,

I took out my complete network and left just heidi in the rights of the NFS share.
Here my cat of Freenas /etc/hosts
Code:
::1            localhost localhost.my.domain
127.0.0.1        localhost localhost.my.domain
#
# Imaginary network.
#10.0.0.2        myname.my.domain myname
#10.0.0.3        myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP networks for
# private nets which will never be connected to the Internet:
#
#    10.0.0.0    -   10.255.255.255
#    172.16.0.0    -   172.31.255.255
#    192.168.0.0    -   192.168.255.255
#
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers.  Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#
192.168.178.66 heidi
127.0.0.1    freenas.local freenas
::1        freenas.local freenas


and here of /etc/exports (after change)
Code:
/mnt/noRAID_Seagate/hmmmm  -mapall="alphorn_jd":"alphorn_jd" heidi
/mnt/RAID5_Datengrab/MEDIA  -mapall="alphorn_jd":"alphorn_jd" heidi


A quick test was not sucessful. Same behaviour. Have to test a little bit more today.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Are you sharing datasets or directories? What's the output of the mount command on the FreeNAS host, and what's the output of nfsstat -m on Linux?
 

Schnuggler

Cadet
Joined
Oct 4, 2015
Messages
6
nfsstat -m on linux:
Code:
/media/heidi/hmmmm_NFS from freenas:/mnt/noRAID_Seagate/hmmmm
 Flags:    rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.178.39,mountvers=3,mountport=732,mountproto=udp,local_lock=none,addr=192.168.178.39

/media/heidi/MEDIA_NFS from freenas:/mnt/RAID5_Datengrab/MEDIA
 Flags:    rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.178.39,mountvers=3,mountport=732,mountproto=udp,local_lock=none,addr=192.168.178.39


mount on freenas:
Code:
devfs on /dev (devfs, local, multilabel)
tmpfs on /etc (tmpfs, local)
tmpfs on /mnt (tmpfs, local)
tmpfs on /var (tmpfs, local)
freenas-boot/grub on /boot/grub (zfs, local, noatime, nfsv4acls)
fdescfs on /dev/fd (fdescfs)
RAID5_Datengrab on /mnt/RAID5_Datengrab (zfs, local, nfsv4acls)
RAID5_Datengrab/Eigene Dateien on /mnt/RAID5_Datengrab/Eigene Dateien (zfs, local, nfsv4acls)
RAID5_Datengrab/MEDIA on /mnt/RAID5_Datengrab/MEDIA (zfs, NFS exported, local, nfsv4acls)
RAID5_Datengrab/hmmmm on /mnt/RAID5_Datengrab/hmmmm (zfs, local, nfsv4acls)
RAID5_Datengrab/jails on /mnt/RAID5_Datengrab/jails (zfs, local, nfsv4acls)
RAID5_Datengrab/jails/.warden-template-pluginjail-9.3-x64 on /mnt/RAID5_Datengrab/jails/.warden-template-pluginjail-9.3-x64 (zfs, local, nfsv4acls)
RAID5_Datengrab/jails/owncloud_1 on /mnt/RAID5_Datengrab/jails/owncloud_1 (zfs, local, nfsv4acls)
RAID5_Datengrab/usr on /mnt/RAID5_Datengrab/usr (zfs, local, nfsv4acls)
noRAID_Seagate on /mnt/noRAID_Seagate (zfs, local, nfsv4acls)
noRAID_Seagate/hmmmm on /mnt/noRAID_Seagate/hmmmm (zfs, NFS exported, local, nfsv4acls)
RAID5_Datengrab/.system on /var/db/system (zfs, local, nfsv4acls)
RAID5_Datengrab/.system/cores on /var/db/system/cores (zfs, local, nfsv4acls)
RAID5_Datengrab/.system/samba4 on /var/db/system/samba4 (zfs, local, nfsv4acls)
RAID5_Datengrab/.system/syslog-5ece5c906a8f4df886779fae5cade8a5 on /var/db/system/syslog-5ece5c906a8f4df886779fae5cade8a5 (zfs, local, nfsv4acls)
RAID5_Datengrab/.system/rrd-5ece5c906a8f4df886779fae5cade8a5 on /var/db/system/rrd-5ece5c906a8f4df886779fae5cade8a5 (zfs, local, nfsv4acls)
RAID5_Datengrab/.system/configs-5ece5c906a8f4df886779fae5cade8a5 on /var/db/system/configs-5ece5c906a8f4df886779fae5cade8a5 (zfs, local, nfsv4acls)
devfs on /mnt/RAID5_Datengrab/jails/owncloud_1/dev (devfs, local, multilabel)
procfs on /mnt/RAID5_Datengrab/jails/owncloud_1/proc (procfs, local)

I think I am sharing a dataset. Or not?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
All looks OK, can't explain what your seeing on 9.10. My install is now 11.1 and testing 11.2
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Have you turned on the option for NFS3 group behavior? (I can't remember the exact name as I'm not in front of my server right now, it's the option right below NFSv4) I have seen strange permissions handling on NFSv4 without that option set.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Have you turned on the option for NFS3 group behavior? (I can't remember the exact name as I'm not in front of my server right now, it's the option right below NFSv4) I have seen strange permissions handling on NFSv4 without that option set.

@sretalla Not relevant, as OP is using NFS3.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
So. What to do? Updating to a new freenas version?

Not necessarily, although there are benefits to using FN11.2 for jail and virtual machine users and other improvements. But FN11.2 does have issues whereas FN9.10-UX latest is thought to be very stable.

Why not use NFS4 with NFSv3 ownership model selected? Test by mounting at CLI as root in Linux ,
e.g. mount -v -t nfs <FreenNAS IP>:/mnt/RAID5_Datengrab/MEDIA /media/heidi/MEDIA_NFS
 
Status
Not open for further replies.
Top