Can't connect to NFS share on NAS storage

  • [COLOR=#333333][FONT=Arial]I’m trying to add external storage to a fog server on a Ubuntu 10.04 VM. I tried following instructions [URL=‘’][COLOR=#2080ad]a[/COLOR]t this link[/URL], but all I get is “Failed to connect to $MYSHARE.”[/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]The NAS is a Synology, and I’ve enabled NFS and added an NFS privilege with the IP address of my fog server. I can actually mount the share from the terminal on the fog server, but when I try to add it through the webui, it fails to connect.[/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]Maybe the problem is that I don’t completely understand the Management Username and Management Password fields on the Edit Storage Node Definition page. Is it looking for an account on the NAS with permission to view the share? Or the fog server webui credentials? [/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]I’ve poked around the forums and some other places, but most of the solutions I’ve found involve mounting the share to the fog server rather than what’s in the link above. [/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]Thanks for the help.[/FONT][/COLOR]

  • I’d recommend taking a look at the ftp server configuration on the NAS. It seems, to me, that the configuration of FTP is just making the FOG user’s Home directory as /volume1, so when the first login happens, the root of it is the root of volume1 which leads you to /images /images/dev.

    Maybe, if you can find the configuration and make the home for the fog user the / of the drive, this can be resolved. I can code in this stuff as well, but don’t think that that’s the solution proper. It’s much easier to make one change to a configuration file rather than make code changes to the core of how fog operates. While it can be done autonomously, it’s not the norm.

    As we found out earlier, you can’t nfs share an nfs shared volume. My solution was to use another mounting medium such as ceph or glusterfs, but don’t know if this would work in the case of NAS’.

  • Still no luck. [FONT=Arial][COLOR=#333333] I manged to get the webui to recognize the NAS share and even begin to replicate the images there, but I ran into the same NFS error when I try to upload.[/COLOR][/FONT]
    [COLOR=#333333][FONT=Arial]So I mounted the share as /images through this /etc/fstab:[/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial] /images nfs defaults 0 0[/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]/images *(rw,async,insecure,no_root_squash,subtree_check)[/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]/images/dev *(rw,async,insecure,no_root_squash,subtree_check)[/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]I chmodded and chowned the folders as follows:[/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]fog@GPFOG:~$ ls -l /images[/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]drwxrwxrwx 2 fog root 4096 2014-03-24 14:53 dev[/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]drwxrwxrwx 4 fog root 4096 2014-03-24 13:50 images[/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]I’m still getting the Permission denied, Fatal error:failed to mount NFS volume when I try to upload an image. The .mntcheck files are in place in /images and /images/dev. I’ve spent hours looking for a solution, but everything I find doesn’t work. I get that Synology NASes share as /volume1/SHARENAME but just /SHARENAME for FTP, but I don’t know if that’s the issue or what to do about it if it is.[/FONT][/COLOR]

  • Exports:
    /volume1/fogimages *(rw,async,no_wdelay,no_root_squash,insecure,sec=sys,anonuid=1025,anongid=100)

    ls -l /volume1/fogimages
    drwxrwxrwx 2 fog administ 4096 Mar 12 11:05 dev

    I changed to:

    drwxrwxrwx 2 root root 4096 Mar 12 11:05 dev

    But it’s still not working. I haven’t tried restarting the NAS yet, so I’ll do that next.

    Thanks for the help.

  • Nah,

    It’s a permissions set issue from the NAS itself
    make sure the Exports for the nfs allows rw

    Also make sure, on the nas, the chmod is: 777:
    [code]chmod 777 -R /images[/code]

    Owner ship should still be root:root. As the 777 perms allow read write execute to everybody, you should be okay. You may have to restart the nas box to ensure the changes take effect.

  • [FONT=Arial][COLOR=#333333]Just an update: [/COLOR][/FONT]
    [FONT=Arial][COLOR=#333333][FONT=Arial][COLOR=#000000]I’ve beat my head against this for two days.[/COLOR][/FONT][/COLOR][/FONT]
    [FONT=Arial][COLOR=#333333]I enabled NFS on the NAS, created a share and a user and gave the user permissions. I’ve set up NFS privileges on the share, but it still keeps failing to connect when I try to add the storage node through the webUI. [/COLOR][/FONT]
    [FONT=Arial][COLOR=#333333]I can mount the share from the terminal on the FOG server, so I know it’s working. I’ve tried messing around with /etc/exports files, changing UIDs and GIDs, deleting and recreating folders and users, reinstalling the fog server, etc. and nothing is working. [/COLOR][/FONT]
    [FONT=Arial][COLOR=#333333]I also tried mounting the share on the FOG server and just pointing the storage node there, and that sort of works, but I get all kinds of NFS permissions issues when I try to upload or deploy an image. It’s mounted RW in the /etc/fstab, but it still can’t write there for some reason. And I can’t chmod or chown the directory, even as root – it says operation not permitted.[/COLOR][/FONT]
    [FONT=Arial][COLOR=#333333] If it won’t work with the NAS I guess the other option is to make a VM (or physical box) with more storage and install fog as a storage node. [/COLOR][/FONT]

  • hello, The NAS Synology share the NFS with “/volumex/” before the name share, and the FTP share only the name.
    This is the problem because in the firts time the image was sent to “/volume1/images/dev/MACADRESSE” and after it is over the FTP must move to “/images”.
    Dont forget there is not “/volume1/” when you acces to the FTP share.

    if you would like to spend a Synology must modify PHP programs (FOGFTP.class.php, Post_Stage2.php) on the 0.33 beta release.