• Re: [gentoo-user] NFS mounting

    From Peter Humphrey@21:1/5 to All on Tue Oct 22 14:10:01 2024
    On Tuesday 22 October 2024 10:14:48 BST Michael wrote:
    On Tuesday 22 October 2024 02:10:45 BST Peter Humphrey wrote:
    On Monday 21 October 2024 09:22:37 BST Michael wrote:
    Assuming all required directories are on the same fs, what happens if
    you
    *only* export the parent directory? Something like this:

    /mnt/nfs \ 192.168.178.7/32(rw,sync,insecure,no_subtree_check,all_squash,anonuid=25 0,
    an ongid=250)

    Actually, the converse turned out to be right. Removing the top-level /mnt/nfs spec from /etc/exports allowed the whole thing to spring into life.

    Go figure, as they say in the colonies. ;)

    I'm glad you 'figured' this, although puzzled by your solution. In my experience I only needed to export one directory only as the top directory, for each different partition.

    I followed the Gentoo NFS wiki page, which says "this article demonstrates a best-practice NFSv4 deployment using a virtual root".

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Tue Oct 22 14:36:17 2024
    On Tuesday 22 October 2024 13:00:14 BST Peter Humphrey wrote:
    On Tuesday 22 October 2024 10:14:48 BST Michael wrote:
    On Tuesday 22 October 2024 02:10:45 BST Peter Humphrey wrote:
    On Monday 21 October 2024 09:22:37 BST Michael wrote:
    Assuming all required directories are on the same fs, what happens if you
    *only* export the parent directory? Something like this:

    /mnt/nfs \ 192.168.178.7/32(rw,sync,insecure,no_subtree_check,all_squash,anonuid= 25
    0,
    an ongid=250)

    Actually, the converse turned out to be right. Removing the top-level /mnt/nfs spec from /etc/exports allowed the whole thing to spring into life.

    Go figure, as they say in the colonies. ;)

    I'm glad you 'figured' this, although puzzled by your solution. In my experience I only needed to export one directory only as the top
    directory,
    for each different partition.

    I followed the Gentoo NFS wiki page, which says "this article demonstrates a best-practice NFSv4 deployment using a virtual root".

    If you are referring to the NFS-utils wiki page:

    https://wiki.gentoo.org/wiki/Nfs-utils

    it provides an example of exporting two *different* partitions:

    Device Mount directory Description
    /dev/sdb1 /home Filesystem containing user home directories.
    /dev/sdc1 /data Filesystem containing user data.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmcXqlIACgkQseqq9sKV ZxmnhhAAuGJB4/cFgyaxwU/REzQarQpYsXhVVIrjHMB2vBN9vupGUJ764UQyuOZE UtmVGgd9HGjbW8a/M6QHZGwKIL3Sj26qL/b1t0W9J7c30ojgZuvgHvucb0Ol+gsf ww8gdwQmi0Whg0jWg4vP6VgEOAIV1Ug5NE5wQeGVJrCoTSXzdhx0JfZLNjC9yF9t miXNMSAbnjltZW0OdHaSJcGNHaNLDFhkeNNoOYYhSqhs3hRw7zqEagsBfl3wISPl MMaKfXcGJbRCls9mS2+k4Z+G6hLx8hzRg72NK3/VNHjes/rHqhET8jWvvP+44RHD YdgOlTAukvCnwwNgOu6MTnITVswQ2zO2rQNu+M8h8ZNTLVJcfu7QG2FnDTGT60J/ PwkWkXN9UAOcZ0ZF0Ob8wNAeWCm1mWFmuktthBKGVPxGr/vTVFc0PwDamxaIRho5 2y+WYpr1jnKgYND84hpPgtpWqHBCKvT6u2/br01+4tSE+Lk9x5N958Wxz8vt0hBQ dKdh5qwsi98QU2QwZI0hNh7/NmaeSzRwohSNAelCNxb/MZtMBJG+aOPFL3kTaUIK 9l7XQU+BoiTf/TrLaHbBDu8Y6vrfZ0E6lVyJiCpOtF/NQdE0rvUOK7R+cX9rgX0p lL2p4KiiN2ADwvW6u6DRGMf/srxpBEOHyOSAVxPqUmKn6Jl2rXg=
    =law6
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Tue Oct 22 20:29:14 2024
    On Tuesday 22 October 2024 18:01:55 BST Matt Jolly wrote:
    It should not matter; the virtual root involves bind mounting directories into a single location - that could be 4 different partitions, a bunch of subvolumes, or some directories scattered across a single partition, or
    some combination of those options.


    Cheers,


    Matt

    All good and fair, but then why Peter's reported error of duplicate exports?


    On 22 Oct 2024 23:36, Michael <confabulate@kintzios.com> wrote:

    On Tuesday 22 October 2024 13:00:14 BST Peter Humphrey wrote:
    On Tuesday 22 October 2024 10:14:48 BST Michael wrote:
    On Tuesday 22 October 2024 02:10:45 BST Peter Humphrey wrote:
    On Monday 21 October 2024 09:22:37 BST Michael wrote:
    Assuming all required directories are on the same fs, what happens
    if
    you
    *only* export the parent directory? Something like this:

    /mnt/nfs \ 192.168.178.7/32(rw,sync,insecure,no_subtree_check,all_squash,anonui d=
    25
    0,
    an ongid=250)

    Actually, the converse turned out to be right. Removing the top-level /mnt/nfs spec from /etc/exports allowed the whole thing to spring into life.

    Go figure, as they say in the colonies. ;)

    I'm glad you 'figured' this, although puzzled by your solution. In my experience I only needed to export one directory only as the top directory,
    for each different partition.

    I followed the Gentoo NFS wiki page, which says "this article demonstrates a best-practice NFSv4 deployment using a virtual root".

    If you are referring to the NFS-utils wiki page:

    https://wiki.gentoo.org/wiki/Nfs-utils

    it provides an example of exporting two *different* partitions:

    Device Mount directory Description
    /dev/sdb1 /home Filesystem containing user home
    directories. /dev/sdc1 /data Filesystem containing user data.


    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmcX/QoACgkQseqq9sKV Zxn8eQ//Sg3wIb6WdPV6tQFDMLmps3sdINCSFiMDBQb0ak79/RX7qGcVv2Di0HdF gb6wvjuTsUO/BZZW4wK1+YtlqUYF6sJ7nFBCDy4adkCcRmF7cJKaFjRk7RzN55cO TkPQKB18MP71cIMOqsWdNzxW6fU9JccSQHWBXkZMwlh0EMjEJlAoCOhGfPPDW705 e4LvH77ijzNByfM64tF+Uql9qQN9n3ehig7vnPJX78oLaUwZvFklIzocm4xntpLr p3dhFXGj8V3N3RYa+/Mp488KoOcTTynttRfb0BmiddfvKKM8og2eA3+W5rYotcjY Yon0d4hqgCCDMb+WArYMpf/T2mmFOQ5w23gFwlAmZNd/+MGw45sKMcseqdVxK/gU 1gkZ8GLnitZY3ZvEig196D5ckC0n8fZkLuQX2vlQKrsK9ddfPTnn0pUQ7LKIAy8p Qv5AFnm/3o+Icir4UWpWrYRqI+p6mSYUewm8q0aOCfYhzjs8gmObDZ5Ntg5dIsH7 mL3tldMAEhEc2ZtbVkX5ZPDQ0yTlmjp17cdXL0x4/0xQGwiRK7KtUBl1n3weaJ6z NZS7a2a/uTftziLxOc6AxBTR6fjsGZj9bDXJU3ccEd7v3W762CV5jY/d/46boaak m/B5OfUZ3FP1SeKmWmkRaebHzMjt33lGLCR+JsMhFD/1zExg0m0=
    =OWk3
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Tue Oct 22 23:10:01 2024
    On Tuesday 22 October 2024 20:29:14 BST Michael wrote:
    On Tuesday 22 October 2024 18:01:55 BST Matt Jolly wrote:
    It should not matter; the virtual root involves bind mounting directories into a single location - that could be 4 different partitions, a bunch of subvolumes, or some directories scattered across a single partition, or some combination of those options.

    All good and fair, but then why Peter's reported error of duplicate exports?

    I don't understand that either. Well, it's just one thing actually: it looks
    as though the remote mount still isn't right, so that some transfers just seem to vanish down a black hole.

    Now I have the NFS mounting working, apparently, with no reported errors, but
    I still can't get the combined system to behave. I mount the i5's portage tree and packages directory on a partition on the M9, chroot into it, 'env-update
    && . /etc/profile' and attempt to 'emerge --sync' (this is using the Git method).

    Everything starts to go well, and gkrellm on the i5 shows plausible network traffic on both machines - but no disk transfers. This goes on for a couple of minutes until I give up.

    Before starting any of that I recovered a backup of the i5 and untarred it
    into the chroot partition; not the whole thing, just the root FS and /var, which I've kept separate for many years. Oh, and /usr/local. The backup was just two days old.

    While bug-hunting, I created two new partitions on the i5: one each for the portage tree and the packages directory. That was to eliminate the possibility that the NFS mount was failing because it wasn't at a file-system root.

    Also while bug-hunting, I found an extra-long Ethernet cable and strung the i5 into the LAN that way. The M9 only ever sees the LAN, whereas I can now start and stop the LAN and WLAN at will on the i5. The Fritz!Box router sits at the junction. Eventually, of course, once I get this setup working, the cable will go back in the cupboard.

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Wed Oct 23 13:00:01 2024
    On Tuesday 22 October 2024 22:07:06 BST I wrote:

    Also while bug-hunting, I found an extra-long Ethernet cable and strung the i5 into the LAN that way. The M9 only ever sees the LAN, whereas I can now start and stop the LAN and WLAN at will on the i5. The Fritz!Box router
    sits at the junction. Eventually, of course, once I get this setup working, the cable will go back in the cupboard.

    I should have added that the remote compilation works well with the cable. I have found though that the linux-firmware ebuild requires the /boot partition to be mounted, which it shouldn't be on a foreign machine, so I say
    emerge -uaDvN --exclude="linux-firmware-20241017-*", only to find that it's emerged anyway. Dropping that last hyphen gives the required result.

    Is this a portage bug?

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Wed Oct 23 14:20:01 2024
    On Wednesday 23 October 2024 12:36:23 BST Arve Barsnes wrote:
    On Wed, 23 Oct 2024 at 12:56, Peter Humphrey <peter@prh.myzen.co.uk> wrote:
    I should have added that the remote compilation works well with the cable. I have found though that the linux-firmware ebuild requires the /boot partition to be mounted, which it shouldn't be on a foreign machine, so I say emerge -uaDvN --exclude="linux-firmware-20241017-*", only to find
    that it's emerged anyway. Dropping that last hyphen gives the required result.

    Is this a portage bug?

    It is definitely weird, but it is documented to be that way. From the
    manual ebuild(5):

    The version part that comes before the ’*’ must be a valid version in
    the absence of the ’*’. For example, ’2’ is a valid version and ’2.’
    is not. Therefore, ’2*’ is allowed and ’2.*’ is not.

    Ah! Thank you Arve. The subtleties of a complex system seem endless at times... :)

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Fri Oct 18 15:50:01 2024
    Greetings,

    Let me try this again.

    Why should an NFS server wait 15 seconds before reporting "No such file or directory"?

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Fri Oct 18 15:55:19 2024
    On Friday 18 October 2024 14:41:03 BST Peter Humphrey wrote:
    Greetings,

    Let me try this again.

    Why should an NFS server wait 15 seconds before reporting "No such file or directory"?

    I couldn't find anything conspicuously wrong in your setup, but I don't have much in depth experience working with NFS. A 15 second delay seems excessive to me. Even with resource constrained servers and powered down disks I don't see more than 5 seconds delay here.

    Whenever I had an error like yours, I traced it down to some typo, gratuitous use of space in the syntax, or some omission in my /etc/exports file. As I
    was reading your post I thought you could have missed using 'mount --bind' for your /mnt/nfs/portage to /var/ on i5, but you posted you are able to list your portage tree files within it. So this is not the cause of the problem.

    Differences I noticed compared to my typical setup are:

    1. I define a subnet, in addition to the single client's IP address - e.g. 192.168.178.7/255.255.255.254.
    2. I do not use 'nohide'. In your case you mount each directory explicitly and they are probably both on the same partition/fs(?), so what purpose does
    nohide serve?
    3. Will all requests come from sub-1024 port numbers, or will some strict/ obscure firewalling cause problems since you specify 'secure'? Some domestic routers try to be too clever by half in this respect. Try setting your
    exports with 'insecure' to see if it makes any difference.

    Whenever you change any settings in your exports file remember to run:

    exportfs -rav

    You could try tweaking the above options in case it makes a difference. However, if the *same* settings worked with a previous client, then I can't logically explain why they fail now. :-/

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmcSdtcACgkQseqq9sKV ZxnjTRAAwdi5yCau5dxCMnjeh6ri2Yqf7nL2a78ZpfVMw7qEL4dG+K5s/0Lc3mHi qs0Wuw93kVK875McKc12Qlpa2PlnY69HUb6uRxC5JmNVimcaW8i1Gfluol52iNjN 0iMYEfNWqu/jX7LjvE3BFUPLwxD9q7+xGcv1NHf9ZPZm2Cra0mcvGfQGxB8hnr1Q Bx+ysRyyElXRA7MtovKzYbXFYKHD3lQXEXJpyp0oG2oCG0OrwdDrpT+CISLJuTGV NgJedJu8wcbsxnOFAFhtPaIt7Iip6VkMLO8mMyUArKWzZx5yBl9w5vKme0PtQmQS RInmJTNW8OwiLmL75jYnGOc4ARqiLvxZ6Nci8cc+hR8OjspFLM0T/Uc1rUMCl9wK trYnXb1eX56tGxO+ZLcX0VGNJDqqJvj33MVAaYe/LCMntoQ+BtJtNi4L5cKBOmaG woO6oANsvVY7KlWxVnaSR8vAzNrJkjFWtx8lgD71ZQl2VtaD3pwBSfDV7M5oTmQV mLAdoh3Jzk1fk79pRH6DccqpbAdzD2uGAUcHVo6y/Ug2TAyvKc7YCa/q8SOz62Bu /W2nfvj3p+0K5aQAU0rmkedMW8P2OMyw4XKd6pc3pXLINbQvDVn9DjiWUhMvkG6j qtwp7dhDW9e1JRnSdN7tV58ytVKuGoV6J5u9q8LACjg2o5FZcMM=
    =hYtG
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jack Ostroff@21:1/5 to Peter Humphrey on Fri Oct 18 17:50:01 2024
    This is a multi-part message in MIME format.
    On 10/18/24 9:41 AM, Peter Humphrey wrote:
    Greetings,

    Let me try this again.

    Why should an NFS server wait 15 seconds before reporting "No such file or directory"?
    Are there any errors in the log on the server? Increasing the verbosity
    of the log there might be informative.
    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <div class="moz-cite-prefix">On 10/18/24 9:41 AM, Peter Humphrey
    wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:12539492.O9o76ZdvQC@cube">
    <pre wrap="" class="moz-quote-pre">Greetings,

    Let me try this again.

    Why should an NFS server wait 15 seconds before reporting "No such file or directory"?</pre>
    </blockquote>
    <span style="white-space: pre-wrap">Are there any errors in the log on the server? Increasing the verbosity of the log there might be informative.
    </span>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)