Page 1 of 1

Create NFSv4 exports

Posted: 21 Nov 2018 21:30
by kalle
Hello,

I would like to create directories to share over NFSv4. My solution up to now is:

1. Create NFSv4 root directory and configure it in Xigmanas "/mnt/nfs_mnt"
2. Create directories for exports and mount this over terminal "/mnt/nfs_mnt/mountA", "/mnt/nfs_mnt/mountC" and "/mnt/nfs_mnt/mountC"
3. Configure the NFSv4 exports in Xigmanas

All works fine. But the problem is number 2. After each restart the directories and the mount-points are deleted.

That's why my question: How can I done the work of number 2. with Xigmanas? I can't find options in Disks --> Mount Point. Must I use a script?

Greets
Kalle

Re: Create NFSv4 exports

Posted: 21 Nov 2018 23:48
by ms49434
kalle wrote:
21 Nov 2018 21:30
Hello,

I would like to create directories to share over NFSv4. My solution up to now is:

1. Create NFSv4 root directory and configure it in Xigmanas "/mnt/nfs_mnt"
2. Create directories for exports and mount this over terminal "/mnt/nfs_mnt/mountA", "/mnt/nfs_mnt/mountC" and "/mnt/nfs_mnt/mountC"
3. Configure the NFSv4 exports in Xigmanas

All works fine. But the problem is number 2. After each restart the directories and the mount-points are deleted.

That's why my question: How can I done the work of number 2. with Xigmanas? I can't find options in Disks --> Mount Point. Must I use a script?

Greets
Kalle
The above indicates that you are running the embedded version of XigmaNAS.
/mnt is a folder on a memory disk, any folder or file created under this folder will not survive a reboot.
/mnt is used to mount physical data storage like ZFS pools, software RAID arrays or simple UFS formatted devices. It looks like you didn't perform this step.
Mounting and exporting must be done using the WebGUI to ensure the configuration gets stored. Manual changes (mount / NFS export) using a terminal session will not be permanent and will be lost on a reboot.

Re: Create NFSv4 exports

Posted: 22 Nov 2018 15:49
by kalle
Thank you for your explanation and I understand it. But my question is:

How can I do this in the WebGUI? Especially, how can I create the mount points (mount -t nullfs /source /dest)?

Re: Create NFSv4 exports

Posted: 22 Nov 2018 16:00
by ChriZathens
Do you want to mount nfs shares from xigmanas to other system, or the other way around?
Presenting an NFS share to another system can be done via Services > NFS > Add
The other way around - while I haven't done it - I guess can be accomplished by creating folders (to be used as mountpoints) inside a permanent location and then use a postinit script (System > Advanced > Command Scripts > Add) to mount them on each boot
So the mountpoints should be in /mnt/pool_mountpoint/nfs_mnt/mountA instead of /mnt/nfs_mnt/mountA and a postinit script can contain something like

Code: Select all

mount -t nullfs remote:/path/to/share /mnt/pool_mountpoint/nfs_mnt/mountA

Re: Create NFSv4 exports

Posted: 23 Nov 2018 19:19
by kalle
The other way around - while I haven't done it - I guess can be accomplished by creating folders (to be used as mountpoints) inside a permanent location and then use a postinit script (System > Advanced > Command Scripts > Add) to mount them on each Boot ...
I almost thought so. Thanks for your help.

Re: Create NFSv4 exports

Posted: 05 Mar 2019 09:21
by patilmang
Good Information