Storing Images on NAS/Network Share
We have been using fog for a few years. We currently have fog virtualized on a small pc. We would like to move it to our primary Esxi host and store the images outside of the VM. I see there is very little success with mapping a network share and storing images there. Does anyone have any documentation for doing this. Fog is currently running on Ubuntu Server 12.0.4.
Thanks for any help that is given.
If you wanted to try the esxi route
I found this info on unRaid NFS
Then in vcenter for esxi add a datastore with the network file system option
give esxi the unraid servers nfs address
tell it where to mount it on esxi
and give the datastore a name, like images
Then on your fog vm, shutdown, edit settings, and then add a new virtual disk from that data store.
Then mount that as /images in your /etc/fstab. You might have to format it before you can mount it with mkfs ext4 or something of that sort.
If that overview isn’t helpful and you want to try this method, I’ll test it out a little and document the process more thoroughly when I get a chance.
@drose807 nfs mounting at the command is as simple as:
mount x.x.x.x:/my/nfs/share /my/local/directory
for instance, to mount my home fog server’s /images directory locally to a directory called /tempMount it’d be:
mount 192.168.1.10:/images /tempMount
But that’s just at the command line. You would want something permanent, that’s where /etc/fstab comes in.
However, an already-remote directory cannot be re-exported in Linux.
You’re best off creating a node of some sort, like what @Arrowhead-IT and I have suggested.
Of course I’m more than willing to help with this - feel free to shoot me messages.
Thanks for the quick responses guys!
I currently am running unRAID for my “NAS”. I have a Ubuntu 12.0.4 LAMP Server (Virtualized) running on unRAID. The size of this VM is only 10GB. I can create an NFS share in unRAID but I am unable to get it to mount. I think the question is, how do I go about getting the path to the share.
unRAID has an IP of 126.96.36.199.
Fog has an IP of 188.8.131.52.
If I browse using a Windows box to \184.108.40.206\images I can get there fine. However I am not able to get fog to connect using the path “/mnt/user/images”
I think this is where it’s failing authentication. The share is completely open.
There are a few different options that oughta work, just off the top of my head, haven’t tested these yet but probably will eventually.
You can have a seperate linux server set up as a storage node with the fog installer in storage node mode and link to it in the gui with the fog storage management settings.
It would require a little research, but you could utilize esxi’s datastores and clusters and map a NAS there. And then link it to the vm through esxi mounting it like a local drive. Then choose to mount that drive to /images with /etc/fstab, mount it elsewhere and point to it in the fog settings and /etc/exports, or mount else where and make /images a symlink to the mount point
There are some other options too, but I think the most important thing to consider is that where-ever you choose to put it, you want it to be an nfs share. I imagine it’s possible to get other types to work, but nfs is what fog uses natively and for good reason. Most NAS’s have some setting in their gui to enable nfs settings.
It’s possible to create a storage node on a windows machine. You can create an NFS share on a windows server. You’ll also need to allow total FTP access to this directory.
There is a wiki article on this, and some have been successful, and others haven’t. I think most of the issues are permissions related on the directory you create.
I’ll post back in a minute with links.