March 31, 20251 yr Hello All I was looking for the no_root_squash option for the NFS exports but could not find it in the GUI. Before I copy over the /etc/exports file after each reboot, is there any other way to specify it for the NFS exports? Thanks a lot!
March 31, 20251 yr Community Expert It is better to use the UNRAID SHARE OPTIONS! example: Quote 192.168.2.253(rw,sec=sys,no_subtree_check,no_root_squash) so only 2.253 can nfs connect to PBS However, the limitation is i only want to share the images folder within PBS... You would need to add the share info to exports... Unraid is slack ware linux... it uses systeminvar for services located at /etc/rc.d the exports option your trying to edit is generated at boot from loading the emhttp data from the share settings configs... the exports file and nfs on unraid is reliant on 2 services similar to samba smb and nmb ... nfs relies on the rpc and nfs service files... If you replace the export file and stop/start/restart the services the exports file will regenerate based on the unraid shares web ui... As the exports, file controls how and what paths are shared for NFS... Unriad default scripts, configuration and web UI prevent the ability to manually edit and add additional entries... However, you can add multiple rule lines in Unraid in the share tab... this said... you won't be able to write an entire nfs export line for a sub folder with in the share... However... with user scritps, and messing with workarounds scripts... It is techily possible but HIGHLY not recommend... The unraid nfs service is weird. There are advance linux things one can do... and use in ways, such as root locking a file so it can't be edited by root. ... so as an example... but this would require a exports config located somewhere at each boot.... and Breaks the use of the unraid web ui nfs options... any changes in the web ui for nfs will brick and break... this alos doesn't fix the rpc issue that is needed... This was something i tested due to nfs being broken in uraid during the v7 beta 1 and up to stable release... to accomplish this, you need to make a user linux script that stop the nfs then stop rpc service. deletes the export config copy the export config you have else where and set correct chown and chmod permission and protect the file form unraid root from removing and defaulting it... so root lock, so root can't edit delete modify the file... (which i won't share for my own workarounds i test and have for my own services. as it would be fairly easy for limetech to add the unlock to there scripts, breaking any world around I would do...) the start the rpc server and nfs server and test... BUT! since this introduces root file type locks and can not only be unreliable for a nfs share, as it also added instability to scripts within emhttp the unraid web UI.... so no. Please use the unriad web ui for nfs shares and setup the main master folder share to use a unraid nfs shared resource... see forum: https://unraid.net/de/blog/deploying-an-unraid-nfs-server?srsltid=AfmBOornhxSjGLfIUEMOaTnfVdccY-48At-2C9IDbOvqlLlWcBInr8Ri Edited March 31, 20251 yr by bmartino1 typo
March 31, 20251 yr Author I need to be able to use root user from another linux box to rsync files from the other linux box to the unraid server. For this I need the NFS disk exports to have the no_root_squash option in them. I can modify /etc/exports and execute exportfs -ra and this solves my problem of being unable to chown from within rsync as the NFS export has all_squash in it.
March 31, 20251 yr Community Expert Solution 30 minutes ago, starcat said: I need to be able to use root user from another linux box to rsync files from the other linux box to the unraid server. For this I need the NFS disk exports to have the no_root_squash option in them. I can modify /etc/exports and execute exportfs -ra and this solves my problem of being unable to chown from within rsync as the NFS export has all_squash in it. Quote NFS disk exports Unassigned disk plugin? make a nfs share for a disk ... Otherwise... Under the Main Share of the folder you are using in share make the nfs share private. and use rule: 192.168.1.x(rw,sec=sys,no_subtree_check) Per your requiem net of removing the no root squash option.... so set the ip of the one machine that is rsyncing file too... However I will argue that, that seems incorrect on how to access and maintain files over nfs... Nfs doesn't care of the remotes systems file permission and structure unless told otherwise... Example: on unraid you will need to chmod and chown the permission for the share before nfs options are set... Set permission example chmod 777 -R * chown nobody:users -R * But you would want the no root squash for chown of files... no_root_squash is critical for rsync to be able to chown as root on the remote box. SO, working with Unraid and NFS you would want to configure an NFS share to be: -Private -Accessible by root from another Linux machine -With no_root_squash so rsync can preserve ownership using chown -Set only through the Unraid web UI this sounds like a mis-understanding on how the remote machine and how to connect to the share... as this private rule should work with Rsync... 192.168.2.253(rw,sec=sys,no_subtree_check,no_root_squash) If using /etc/fstab on the client, a line might look like: unraid:/mnt/user/PBS /mnt/pbs-backup nfs rw,vers=3,hard,intr 0 0 or issues with how your using the rsync command... ... review: would need more data / info to assit. ip of remote machine.... Command / fstab of remote machine how are you connecting the remote nfs share? rsynic command line your using... file use case to not need no_root _squach
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.