NFS mounting as Read Only

Rabid3east

Dabbler
Joined
Jan 23, 2022
Messages
11
I'm running Scale in proxmox and prefer it over core as it offers apps if I want to quickly setup something then burn it. Everything is passed through with PCI-e card and zero issues until I want to run an NFS. My SMB runs fine but it won't allow my arch linux to rsync for backups, thus adding an NFS.

Problem, is that even with open ACL, Datasets and NFS share, it still assumes I only have read only access. I've been unable to get NFS3 working but NFS4 is fine minus the read only issue. I've tried chmod 777 and chown on the arch linux machine to the directory. I've searched high and low if this was supposed to be inside truenas terminal or on my computer?

cat /etc/exports
"/mnt/tank/exile"\
*(sec=sys,rw,anonuid=1000,anongid=1003,no_subtree_check)

# Fstab

192.168.88.156:/mnt/tank/ /mnt/seykota nfs rw,hard,timeo=900,retrans=5,_netdev 0 0


ls -l

drwxr-xr-x 5 root root 5 Jul 17 21:15 seykota

Obviously I need to have my name there rather than root:root.

Please help, I'm at a complete loss and have devoured hours searching google and forums to find the solution.
 
Last edited:

Rabid3east

Dabbler
Joined
Jan 23, 2022
Messages
11
I've changed the fstab to make sure the mount is identical.

Truenas Shell: drwxrwxrwx+ 3 justin tribe 3 Jul 17 19:00 /mnt/tank/exile(that's the user and group i created)

The user and group uid / gid all match up perfectly as I thought the same thing. uid is 1000 and gid is 1003.

On arch linux: $ ls -l
$ drwxrwxrwx 3 justin users 3 Jul 18 09:42 seykota

It seems like it should have all been fixed. I'm now running rsync command and getting the error msg back 'rsync: [generator] chown "/mnt/seykota/backups/fullbackup/." failed: Operation not permitted (1)'

here's my command in .bashrc:
alias fullbackup='sudo rsync -av --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/fileswap/*","/home/justin/.gvfs","/home/justin/storage/*","/home/justin/.cache/*"} / /mnt/seykota/backups/fullbackup'
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You are running rsync as root with sudo. Root ist mapped to "nobody" be default in NFS. You need to configure something like -maproot=root for your NFS export.
 

Rabid3east

Dabbler
Joined
Jan 23, 2022
Messages
11
You are running rsync as root with sudo. Root ist mapped to "nobody" be default in NFS. You need to configure something like -maproot=root for your NFS export.
I ended up having success with root:root which created no_root_squash in /etc/exports. Is this method a good way to backup files and migrate them to other machines? Also, the computer delays 2 minutes + because of the fstab. I can't seem to figure out what's the fix.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I would prefer ZFS send/receive and if that is not available rsync over SSH. I don't know why you picked NFS in the first place so I cannot tell if it is "a good way"? How do you plan to do incremental backups? Because a backup is only a backup if you have a history, so you can undo accidental changes etc. A single copy of a file somewhere is not a backup.

The need for a complete disaster recovery is pretty rare. The most common reason for needing a backup is "I need this file in the state of two days ago back".

I use Apple Time Machine for my Macs and ZFS snapshots and replication for everything else.
 

Rabid3east

Dabbler
Joined
Jan 23, 2022
Messages
11
I would prefer ZFS send/receive and if that is not available rsync over SSH. I don't know why you picked NFS in the first place so I cannot tell if it is "a good way"? How do you plan to do incremental backups? Because a backup is only a backup if you have a history, so you can undo accidental changes etc. A single copy of a file somewhere is not a backup. The need for a complete disaster recovery is pretty rare. The most common reason for needing a backup is "I need this file in the state of two days ago back". I use Apple Time Machine for my Macs and ZFS snapshots and replication for everything else.


ZFS snapshots within the OS or remote to Truenas which runs ZFS? I know arch linux can run ZFS along with snapshots but I wanted to transfer the files to Truenas before attempting it as incremental backups does sound a lot better. What other than rsync should I be considering?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I run almost all systems with ZFS, some TrueNAS, most plain FreeBSD. The "I need that file back" case is dealt with by local snapshots. One of these every 24 hours is replicated to a dedicated storage server for the "machine went boom" case.

For everything Unixy that does not know ZFS, I use Amanda. http://amanda.org

Desktops are dealt with by their respective backup software like Time Machine.
 

Rabid3east

Dabbler
Joined
Jan 23, 2022
Messages
11
I run almost all systems with ZFS, some TrueNAS, most plain FreeBSD. The "I need that file back" case is dealt with by local snapshots. One of these every 24 hours is replicated to a dedicated storage server for the "machine went boom" case.

For everything Unixy that does not know ZFS, I use Amanda. http://amanda.org

Desktops are dealt with by their respective backup software like Time Machine.
Thanks a lot this. You use Amanda to a SMB on the nas? Guess the laptop to the nas is the currently hurtle I'm facing currently.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Laptop: Time Machine, Windows Backup, Veeam ...

Amanda runs its own protocol. It's server to server. You could run it in a jail on TN CORE and probably in a container in SCALE. You have an Amanda client installed on each machine to be backed up and each night the server runs and collects all the data.
 

Rabid3east

Dabbler
Joined
Jan 23, 2022
Messages
11
Does sound like some promising software. I'll be checking it out. Currently running in Scale and that's probably why I've got all these issues with NFS currently as others are experiencing issues with it as well in NFS.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
It's pretty old school, but never let us down performing what it should do. You might like the other, more modern open source backup tool better - go check that too: https://www.bacula.org
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Does sound like some promising software. I'll be checking it out. Currently running in Scale and that's probably why I've got all these issues with NFS currently as others are experiencing issues with it as well in NFS.
What issues are others experiencing? It looks like you're trying to mount /mnt/tank, but you're exporting /mnt/tank/exile, but tank and tank/exile are different filesystems. Try exporting tank/exile directly.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Good catch, @anodos!

@Rabid3east never store data directly on /mnt/tank. Always create a sub-dataset first.
 

Rabid3east

Dabbler
Joined
Jan 23, 2022
Messages
11
What issues are others experiencing? It looks like you're trying to mount /mnt/tank, but you're exporting /mnt/tank/exile, but tank and tank/exile are different filesystems. Try exporting tank/exile directly.
I've actually resolved that a while ago. I'm still stuck on the NFS fstab though as it create a long loadup time 2+ minutes on my machine. It really makes me want to scratch the idea of using an NFS share.

It's pretty old school, but never let us down performing what it should do. You might like the other, more modern open source backup tool better - go check that too: https://www.bacula.org

Bacula does look nifty as well. Both tools you've mentioned appear to be quite an undertaking from what I've read about other people's experiences. I'm hoping to find a free open source alternative which is more simple to setup for my small homelab to assist two people. You think using something like syncthing to replicate my data to the NAS on all the home computers then having Truenas take snapshots would work? I would like to use an offsite backup of the Truenas with something like backblaze, but that doesn't solve my current issues with zero backups now, and an NFS fstab long delay.
 
Top