NFS I do need help!

  • Here is a nice description:


    https://linuxize.com/post/how-…nt-an-nfs-share-in-linux/


    If you Google you will find many descriptions on how to mount a remote nfs share. They all describe the same process. It may help to look at several and note how they say exactly the same thing, but in slightly different ways.


    Some basics:


    Both the server and the client must be in the same network. Typically that means connected to the same router. You should be able to ping the server from the client and the client from the server.


    I am careful to always create the exact same users on the both the client and the server, in exactly the same order. The users then are assigned the same numerical user ID on both the server and the client. Then you can easily control access from the server and it will work as you would expect via the nfs share. Note that nfs does not care about the name of the user. Nfs only cares about the user ID.


    You must have created and activated the nfs share on the server. I am not sure if you need to reboot. But it shouldn't hurt, so reboot the server.


    You need to install the nfs client software on the client. It is called nfs-common. This is described in the link.


    You need to decide where to mount the nfs share on the client. It could be /srv/nfs/here or /home/there or somewhere else. Once you decided, create an empty folder there. This is also described in the link.


    Then, again on the client, you edit /etc/fstab to tell the client about the nfs share. Where it should be mounted and how, and where it comes from. This is described in the link above.


    Finally you reboot the client. If all goes well, the empty folder should now contain the remote share.


    This is something of a long and process. Several steps that all must be perfectly correct. Pen and paper may help. Write down the steps, modified for your situation. Two columns in chronological order may help. One for what to do on the server. One column for what to do on the client.


    Not all people are able to do this successfully. They simply are not able to focus and follow detailed instructions, step by step in the right order. Also they may lack some knowledge and misunderstand or even skip some instructions. Or get bored and frustrated after failing a few times. This is a very delicate "operation" editing critical system files on the client. It is even possible to make very small mistakes that break the client so it no longer is able to boot.


    Once you have done this successfully you have the right to call yourself "sysadmin". There are t-shirts and buttons available online.

    It is good practice to first have good backups of everything. Before you edit /etc/fstab, make a copy of it. Then if something goes wrong it is easy to fix.


    There are some problems. If you turn off the server the mount on the client is obviously gone. But if you turn on the server again, the mount will not be back. You need to remount the remote share from the client. This can be done from the command line or by rebooting the client. If you happen to disconnect a network cable, the client may also drop the mount the same way.


    I fixed this by using "autofs" on my clients. It automatically remount the server share if/when it is available. But don't try that until you get the normal way mount to work.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

    Edited once, last by Adoby ().

  • Once you have done this successfully you have the right to call yourself "sysadmin".

    :thumbup::)


    Very descriptive explanation!
    Is there anywhere a good explanation about the various NFS mounting options and which option(s) make(s) sense for different use cases?

    Note that nfs does not care about the name of the user. Nfs only cares about the user ID.

    What happens if for some reason it is not possible to assign the same ID for a user on client and server side? Maybe users were created a long time ago when no one has payed attention on the different user IDs. Is then no way to create a NFS connection with user permissions? What would be a good work around.

    OMV 3.0.99 (Gray style)
    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1)- Fractal Design Node 304

  • You can change the user id for an existing user. It takes some minor fiddling around. It is not a nice thing to do.


    You may want to assign a user ID to a certain user, but that user ID is taken by some other user already. And files and folders owned by that user here and there. That can mean you have to embark on an interesting multiple step chain of actions involving various utilities like chown, chattr, find and so on, somewhat similar to solving a sudoko puzzle, to fully resolve. I haven't had any reason to try it, yet...


    I prefer to nuke and reinstall.


    One example, that is nuke proof, is if you want to use the first user ID with OMV on a RPi4. By default there is a stupid user Pi that takes up the first user ID. I totally remove that user after installing Raspbian but before installing OMV. Just to be able to keep the first few user IDs as I want them. Otherwise Pi would take up the first user ID and my common sequence of user IDs would be out of whack. And I would have difficulties living with that...


    NFS at home is really like NFS inside a locked server room. It is NFS with all security removed. Just used for convenience and raw performance without any real concern for safety and control. All access to the server room is via armed security guards or routers and firewalls configured to protect the internal nfs network from any outside access, and perhaps routing it via special cabling/vpn to remote, equally well secured, server rooms.


    NFS used outside a server room depends on central login servers and use of many elaborate security features.


    NFS is a very big topic. NFS as we use it with OMV at home is just a tiny subset of what NFS can do.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

    Edited once, last by Adoby ().

  • Thank you for this explanation but right now I cannot add a share with the GUI, like the pic at beginning of the thread without crashing the whole thing.



    Edit

    Starting on new install this time NFS server running now the hard part the client

  • I think it is working, but not completely sure where am I suppose to see the remote share in the GUI?

    so far I just did on the client

    mkdir /mnt/movies

    mount -t nfs 192.168.2.30:/export /mnt/movies

  • I still cannot make it stick to a reboot although in fstab I put


    192.168.2.30:/mnt/user/movies/mnt/movies nfs defaults,noatime 0 0


    Also something else is not right on the client side mnt/movies/Media2 is empty ?

    also I am not able on the server side to put the IP 192.168.2.167.0/24

    so I leave the client iP otherwise I got the error from my post #2

  • What is "it"? What do you mean by "stick to a reboot"?


    You are doing several things wrong. That means that it can't work. You need to read the instructions carefully. Understand them. And follow them. Otherwise it will not work.


    I think your paths are wrong. The fstab line is wrong. The allowed ip is wrong. Possibly more things are wrong.


    Please read the OMV documentation link a few times more. Read it slowly. Make sure you understand every word. Do what it says. You are not following the instructions.


    You should remove 167 from the ip range. Otherwise it is an ip5 and not a valid ip4 range. And there is no ip5. I think it should be 192.168.2.0/24.


    The server and the client must be in the same network.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

    Edited 4 times, last by Adoby ().

  • I still cannot make it stick to a reboot although in fstab I put


    192.168.2.30:/mnt/user/movies/mnt/movies nfs defaults,noatime 0 0

    This is not a valid mount statement. There is no mount point specified.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • Well I thought I mastered but obviously no. I got this error trying to create a share?


    Code
    The configuration has been changed. You must apply the changes in order for them to take effect.
    localhost
    Page
    1
    of 1
    Displaying items 1 - 2 of 2
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; omv-salt deploy run fstab 2>&1' with exit code '1': rockpro64: ---------- ID: create_filesystem_mountpoint_272f2a96-d089-4547-b584-fcdd7207d335 Function: file.accumulated Result: True Comment: Accumulator create_filesystem_mountpoint_272f2a96-d089-4547-b584-fcdd7207d335 for file /etc/fstab was charged by text Started: 05:29:53.350541 Duration: 2.305 ms Changes: ---------- ID: mount_filesystem_mountpoint_272f2a96-d089-4547-b584-fcdd7207d335 Function: mount.mounted Name: /srv/dev-disk-by-label-WD_10TB_1 Result: True Comment: Target was already mounted Started: 05:29:53.355498 Duration: 837.19 ms Changes: ---------- umount: Forced remount because options (user_xattr) changed ---------- ID: create_filesystem_mountpoint_55cf4395-c1a1-43e9-aa39-55312067f47a Function: file.accumulated Result: True Comment: Accumulator create_filesystem_mountpoint_55cf4395-c1a1-43e9-aa39-55312067f47a for file /etc/fstab was charged by text Started: 05:29:54.193287 Duration: 5.237 ms Changes: ---------- ID: mount_filesystem_mountpoint_55cf4395-c1a1-43e9-aa39-55312067f47a Function: mount.mounted Name: /srv/dev-disk-by-label-WD-10TB_2 Result: True Comment: Target was already mounted Started: 05:29:54.199195 Duration: 212.885 ms Changes: ---------- umount: Forced remount because options (user_xattr) changed ---------- ID: create_filesystem_mountpoint_28b4759d-833e-4cab-947e-73ed79678e55 Function: file.accumulated Result: True Comment: Accumulator create_filesystem_mountpoint_28b4759d-833e-4cab-947e-73ed79678e55 for file /etc/fstab was charged by text Started: 05:29:54.413012 Duration: 3.073 ms Changes: ---------- ID: mount_filesystem_mountpoint_28b4759d-833e-4cab-947e-73ed79678e55 Function: mount.mounted Name: /srv/dev-disk-by-label-Segate Result: True Comment: Target was already mounted Started: 05:29:54.416542 Duration: 56.037 ms Changes: ---------- ID: create_filesystem_mountpoint_7e52cbac-db1f-42f1-a0ed-ee35ab0dfc09 Function: file.accumulated Result: True Comment: Accumulator create_filesystem_mountpoint_7e52cbac-db1f-42f1-a0ed-ee35ab0dfc09 for file /etc/fstab was charged by text Started: 05:29:54.473205 Duration: 3.337 ms Changes: ---------- ID: mount_filesystem_mountpoint_7e52cbac-db1f-42f1-a0ed-ee35ab0dfc09 Function: mount.mounted Name: /srv/dev-disk-by-label-Seagate_plus_5TB Result: True Comment: Target was already mounted Started: 05:29:54.477102 Duration: 207.548 ms Changes: ---------- umount: Forced remount because options (user_xattr) changed ---------- ID: create_filesystem_mountpoint_7e19c28a-7936-4049-83b6-047122c98a90 Function: file.accumulated Result: True Comment: Accumulator create_filesystem_mountpoint_7e19c28a-7936-4049-83b6-047122c98a90 for file /etc/fstab was charged by text Started: 05:29:54.685331 Duration: 3.092 ms Changes: ---------- ID: mount_filesystem_mountpoint_7e19c28a-7936-4049-83b6-047122c98a90 Function: mount.mounted Name: /srv/dev-disk-by-label-SSD_500 Result: True Comment: Target was already mounted Started: 05:29:54.688911 Duration: 229.222 ms Changes: ---------- umount: Forced remount because options (user_xattr) changed ---------- ID: create_filesystem_mountpoint_578d4ef8-2b0e-453a-a595-0c9d749f449f Function: file.accumulated Result: True Comment: Accumulator create_filesystem_mountpoint_578d4ef8-2b0e-453a-a595-0c9d749f449f for file /etc/fstab was charged by text Started: 05:29:54.918772 Duration: 2.702 ms Changes: ---------- ID: mount_filesystem_mountpoint_578d4ef8-2b0e-453a-a595-0c9d749f449f Function: mount.mounted Name: /srv/dev-disk-by-label-Elements Result: False Comment: ntfs-3g: Failed to access volume '/dev/disk/by-label/Elements': No such file or directory ntfs-3g 2017.3.23AR.3 integrated FUSE 28 - Third Generation NTFS Driver Configuration type 7, XATTRS are on, POSIX ACLS are on Copyright (C) 2005-2007 Yura Pakhuchiy Copyright (C) 2006-2009 Szabolcs Szakacsits Copyright (C) 2007-2017 Jean-Pierre Andre Copyright (C) 2009 Erik Larsson Usage: ntfs-3g [-o option[,...]] <device|image_file> <mount_point> Options: ro (read-only mount), windows_names, uid=, gid=, umask=, fmask=, dmask=, streams_interface=. Please see the details in the manual (type: man ntfs-3g). Example: ntfs-3g /dev/sda1 /mnt/windows News, support and information: http://tuxera.com Started: 05:29:54.921992 Duration: 109.49 ms Changes: ---------- ID: create_filesystem_mountpoint_c239644d-3530-4234-b94f-0f28de09c55e Function: file.accumulated Result: True Comment: Accumulator create_filesystem_mountpoint_c239644d-3530-4234-b94f-0f28de09c55e for file /etc/fstab was charged by text Started: 05:29:55.032244 Duration: 3.284 ms Changes: ---------- ID: mount_filesystem_mountpoint_c239644d-3530-4234-b94f-0f28de09c55e Function: mount.mounted Name: /srv/dev-disk-by-label-WD-10TB_6 Result: True Comment: Started: 05:29:55.036044 Duration: 124.919 ms Changes: ---------- ID: create_filesystem_mountpoint_1bdca3aa-12b2-4612-89b2-ca7f0d3fac69 Function: file.accumulated Result: True Comment: Accumulator create_filesystem_mountpoint_1bdca3aa-12b2-4612-89b2-ca7f0d3fac69 for file /etc/fstab was charged by text Started: 05:29:55.161930 Duration: 3.345 ms Changes: ---------- ID: mount_filesystem_mountpoint_1bdca3aa-12b2-4612-89b2-ca7f0d3fac69 Function: mount.mounted Name: /srv/dev-disk-by-label-WD-10TB_5 Result: True Comment: Started: 05:29:55.165850 Duration: 132.393 ms Changes: ---------- ID: create_filesystem_mountpoint_6a61e366-e47a-4726-a54c-3695cb13d662 Function: file.accumulated Result: True Comment: Accumulator create_filesystem_mountpoint_6a61e366-e47a-4726-a54c-3695cb13d662 for file /etc/fstab was charged by text Started: 05:29:55.299016 Duration: 3.278 ms Changes: ---------- ID: mount_filesystem_mountpoint_6a61e366-e47a-4726-a54c-3695cb13d662 Function: mount.mounted Name: /srv/dev-disk-by-label-WD_10TB_7 Result: True Comment: Started: 05:29:55.302801 Duration: 130.921 ms Changes: ---------- ID: create_bind_mountpoint_261c296f-406c-4117-8d87-3483128b3920 Function: file.accumulated Result: True Comment: Accumulator create_bind_mountpoint_261c296f-406c-4117-8d87-3483128b3920 for file /etc/fstab was charged by text Started: 05:29:55.434806 Duration: 4.093 ms Changes: ---------- ID: mount_bind_mountpoint_261c296f-406c-4117-8d87-3483128b3920 Function: mount.mounted Name: /export/Media2 Result: True Comment: Target was already mounted Started: 05:29:55.439403 Duration: 50.42 ms Changes: ---------- ID: create_bind_mountpoint_af9be69f-c5d8-449e-9264-a1b2f19d9208 Function: file.accumulated Result: True Comment: Accumulator create_bind_mountpoint_af9be69f-c5d8-449e-9264-a1b2f19d9208 for file /etc/fstab was charged by text Started: 05:29:55.490342 Duration: 2.155 ms Changes: ---------- ID: mount_bind_mountpoint_af9be69f-c5d8-449e-9264-a1b2f19d9208 Function: mount.mounted Name: /export/AppData Result: True Comment: Target was already mounted Started: 05:29:55.492863 Duration: 61.549 ms Changes: ---------- ID: append_fstab_entries Function: file.blockreplace Name: /etc/fstab Result: True Comment: No changes needed to be made Started: 05:29:55.567408 Duration: 8.76 ms Changes: Summary for rockpro64 ------------- Succeeded: 22 (changed=4) Failed: 1 ------------- Total states run: 23 Total run time: 2.197 s/usr/lib/python3/dist-packages/salt/utils/decorators/signature.py:31: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly *salt.utils.args.get_function_argspec(original_function)
  • Could it be that you are trying to share a NTFS filesystem using NFS?


    That is a hard no-no. Sorry...


    If you want to avoid strange problems and reduced performance, avoid using NTFS with OMV. The only exception might be transferring files to/from temporarily attached external drives. For backups and restores, for instance.


    NTFS is a closed filesystem from hell (Microsoft). It spreads chaos and corruption and should only be used in bright sunlight. With suitable precautions like garlic and holy water and some big pointy sticks, preferably with silver tips. This is my subjective opinion, based on personal experiences. It might be slightly biased.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

    Edited 3 times, last by Adoby ().

  • well the one with this issue was by instaling OMV on top of Armbian (clean install)

    with wget -O - https://github.com/OpenMediaVa…Script/raw/master/install | sudo bash

    but Not sure the issue come from it, since in this one I had missing USB drive in file system and I think my plugin was not properly configured this is probably why I got the error.

    the second one was an upgrade from Omv 4 to omv5 done according to this OMV 5.0 - finally out! :-) with a ayufan-rock64 release.

  • +/export 192.168.2.167.0/24(ro,fsid=0,root_squash,no_subtree_check,hide)

    Does 192.168.2.167.0/24 looks like a valid subnet ? I havent check in my setup if nfs would complain about that, but try change it to


    192.168.2.0/24 or leave it empty

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!