NFS not working between OMV and a VM on OMV.

  • Hello friends. I have OpenMediaVault running on my server. Within OMV I have a virtual machine, Ubuntu Server 14.04.1 with ownCloud. I'd like to set up NFS so the ownCloud data directory points to a share that pipes back to my RAID mirror on my server. I'm having difficulty in doing so as when I successfully mount it, the owner/group is nobody:4294967294. I've Googled high and low and all I can find are references that I need to change the idmapd setting, which I've done, yet I have no luck. Something a bit concerning is a lot of complaints are online about people having issues with NFS, these same issues, citing that the kernel memory is to blame as NFS's resource requirement is higher than the default kernel memory setting. Some people say just increase it, others say that's an issue as a DDoS or similar attack could fill the kernel's memory and cause it to take a nose dive. Well, I tested it, and I still haven't had any luck. Due to my level of exhaustion I figured I'd post here to see what you folks thought, as I admit NFS is not my strong point.


    The system named "vault" is OpenMediaVault, whereas the system named "owncloud" is the actual virtual machine. OMV's IP is .200, the VM is .202.


    How I'm mounting and the ownership/group issue I'm seeeing:

    Zitat


    root@owncloud:/mnt# mount -t nfs 192.168.1.200:/owncloud /mnt/OC_DATA_NFS/
    root@owncloud:/mnt# ls -l
    total 4
    drwxrwsr-x 2 nobody 4294967294 4096 Dec 24 11:22 OC_DATA_NFS


    The VM's /etc/default/idmapd.conf


    The VM's /etc/idmapd.conf


    OMV's /etc/default/nfs-common


    OMV's /etc/idmapd.conf


    [/quote]


    OMV's /etc/exports:


    If anybody has any idea as to what may be up, I'd love to hear it! Thank you in advance. :) Merry Christmas!


    Edit - side question... I've been reading about nothing but issues and bug reports with nfs. Kind of concerns me. Would mounting it via ssh be a more advisable approach?

  • Zitat

    root@owncloud:/mnt# mount -t nfs 192.168.1.200:/owncloud /mnt/OC_DATA_NFS/root@owncloud:/mnt# ls -ltotal 4drwxrwsr-x 2 nobody 4294967294 4096 Dec 24 11:22 OC_DATA_NFS


    Why are you mounting "/owncloud/mnt/..." instead of the correct nfs path "/export/..."?


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Hi there. I'm not sure I follow. I was just cd'd into that directory at the time. Can you give me an example of what it should look like? I'm on my phone now without access to the box but I'm having a hard time visualizing it any other way.

  • mount 192.168.1.200:/export/owncloud /mnt/OC_DATA_NFS


    And just like that, it works. See, I knew it was user error. ;)


    I added this entry to my fstab as well. It mounts and functions fine, but I wanted to paste it here in case anybody had any suggestions on whether or not the defaults I chose were logical or if there were some better options out there.


    Zitat

    192.168.1.200:/export/ownCloud /media/nfs-owncloud-data nfs rsize=8192,wsize=8192,timeo=14,intr,tcp defaults 0 0


    That was the last thing on the to-do list. I was pretty okay with having my ownCloud data in a virtual machine, but I liked the idea of it being local on my RAID array. That way my backup script, which sends a wakeonlan ping to my backup server, kicks it on, waits 5 minutes, rsyncs all my data, then turns off remotely, all flawlessly. With my data in a virtual disk/image, it gets a little trickier in terms of timing the shutdown, as I would then have to "time" it or else have the backup server kick on twice. Just easier to have it originating from one source, and all data on the RAID array, which is now possible thanks to this NFS point working, I can do that.


    So, we have OMV on the bare metal running beautifully, a simple Ubuntu Server VM with ownCloud, Apache, MariaDB, and Quassel Core IRC running substantially better than I thought it would with only 1GB of RAM (which is nice given the entire server only has 4GB of RAM), and all of my ownCloud data piping right in to my main RAID array over NFS. I dig this. :)

    • Offizieller Beitrag

    Yes i missed the syntax the other day in the IRC channel. Mounting the root of the export is allowed in nfs4, but at you see the exports indicate that the nfs4 export is root_squash. I quote here from the excellent reference guide from CentOS


    https://www.centos.org/docs/5/…erver-config-exports.html


    "root_squash — Prevents root users connected remotely from having root privileges and assigns them the user ID for the user nfsnobody. This effectively "squashes" the power of the remote root user to the lowest local user, preventing unauthorized alteration of files on the remote server"

  • Yes i missed the syntax the other day in the IRC channel. Mounting the root of the export is allowed in nfs4, but at you see the exports indicate that the nfs4 export is root_squash. I quote here from the excellent reference guide from CentOS


    https://www.centos.org/docs/5/…erver-config-exports.html


    "root_squash — Prevents root users connected remotely from having root privileges and assigns them the user ID for the user nfsnobody. This effectively "squashes" the power of the remote root user to the lowest local user, preventing unauthorized alteration of files on the remote server"


    Roughly translated, I *should* have root_squash? I do have root_squash in my /etc/exports file on my OMV server, so I'll take that as a good thing. :D

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!