Fog storage node on mounted NAS
-
@george1421 So I don’t need to mount it on the server then? So where to I tell the server where to connect to the NAS?
-
@shad0wguy ok let me turn the question around. Why are you using a nas with FOG? And what NAS manufacturer do you have?
-
@shad0wguy I’d recommend making the nas have a user and password for ftp write access, for uploads. Then create your storage node.
IP address would be the ip of your nas. Management user/pass would be whatever you setup.
Image path would likely be:
/IT-Files/Images
FTP path would be the same I’d imagine.Snapin and ssl can probably be left default as they wouldn’t be used in this layout.
-
@george1421
I don’t have enough available storage on my vmware host to house the images on it. The nas is a Netgear ReadyNAS. -
@shad0wguy Ok that explains why. So what you can do is turn your readynas into a FOG storage node. Would that work for you?
-
@george1421 I could give that a shot. I had tried running the entirety of Fog on the nas directly, but the web interface overwrote the NAS’s web interface, which is why I am going this route.
Does the FOG storage node create a web interface as well?
-
@shad0wguy if you install yes it would, though going to the web page would tell you to go to the main.
-
@shad0wguy Well what I’m proposing is to only create the services that FOG uses on your NAS and not install it using the fog installer.
I thought we had a tutorial for the readnas, but all I can find is the qnap and the synology. I can get you started but you will have to carry the configuration home (and hopefully document it for the next guy).
Here is the tutorial I created for the synology NAS: https://forums.fogproject.org/topic/9430/synology-nas-as-fog-storage-node
Here is the tutorial @Iarwayn created for the QNAP: https://forums.fogproject.org/topic/10973/add-a-nas-qnap-ts-231-as-a-storage-node-fog-v1-4
Basically to turn a nas into a FOG storage node you need 4 services.
- FTP
- NFS
- TFTP
- The ability to create a fog user.
I also wrote a PoC on turning a windows server into a fog storage node. https://forums.fogproject.org/topic/10097/setting-up-a-windows-2012-server-as-a-fog-storage-node
The purpose of providing all of these documents is you can see what is in common with each variant.
The only thing that you won’t be able to do is install the fog storage node management code, because of course it will take over the management interface on your fog server. The nas will work well as a storage node.
-
@tom-elliott said in Fog storage node on mounted NAS:
@shad0wguy I’d recommend making the nas have a user and password for ftp write access, for uploads. Then create your storage node.
IP address would be the ip of your nas. Management user/pass would be whatever you setup.
Image path would likely be:
/IT-Files/Images
FTP path would be the same I’d imagine.Snapin and ssl can probably be left default as they wouldn’t be used in this layout.
I tried this method, and confirmed I could log into the NAS via ftp using filezilla and create/edit/delete files but when I tried to upload the image I got permission denied again. Do I need to create specific folders inside the share? It looks like it was looking for a Dev folder. The images folder created by the fog installer has a dev and postdownloadscripts folder. Do they need to be copied?
-
Yes it needs to exist, and postdownload wouldn’t hurt either.
-
@shad0wguy If you scroll all the way to the bottom of my synology tutorial the post titled Part 2: testing the nfs share. There is a process of populating the /images and /images/dev directories from the master FOG server.
-
@george1421 said in Fog storage node on mounted NAS:
@shad0wguy If you scroll all the way to the bottom of my synology tutorial the post titled Part 2: testing the nfs share. There is a process of populating the /images and /images/dev directories from the master FOG server.
I’m going through your steps and am getting stuck at the first step. NFS is returning permission denied when trying to mount the nas. Any ideas why this could be happening? Here are my NFS settings.
-
@shad0wguy I can tell you setting up nfs was the hardest bit of getting the nas to work as a storage node. I need to look back at my post to find what was the key to make it work. It was simple once I learned what was needed.
For testing I can give you some tips.
Login to your fog server. Then run this command.
sudo su -
Then find out who you are
whoami
If you are root then good. You can test your nfs mounting by
mount -t nfs <nas_ip>:/IT-Files/Images /mnt
When that mount command works then you know you have the nas nfs setup correctly. Also watch your case, you are dealing with linux which is case aware.On the nas you need to have nfs v3 enabled. FOG doesn’t support nfs v4 yet.
-
@george1421 said in Fog storage node on mounted NAS:
@shad0wguy I can tell you setting up nfs was the hardest bit of getting the nas to work as a storage node. I need to look back at my post to find what was the key to make it work. It was simple once I learned what was needed.
For testing I can give you some tips.
Login to your fog server. Then run this command.
sudo su -
Then find out who you are
whoami
If you are root then good. You can test your nfs mounting by
mount -t nfs <nas_ip>:/IT-Files/Images /mnt
When that mount command works then you know you have the nas nfs setup correctly. Also watch your case, you are dealing with linux which is case aware.On the nas you need to have nfs v3 enabled. FOG doesn’t support nfs v4 yet.
I found the issue. I needed the full path of the nfs location from root rather than just the root of the share.