Difference between revisions of "NAS Storage Node"

From FOG Project
Jump to: navigation, search
(Information not being displayed in Dashboard correctly)
m (Minor grammatical fixes (4))
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
*This is an option that has been successfully done on a few occasions and <u>'''NOT ALL'''</u> NAS devices work as a Storage node.
 
*This is an option that has been successfully done on a few occasions and <u>'''NOT ALL'''</u> NAS devices work as a Storage node.
 
**This is a generic setup for NAS devices
 
**This is a generic setup for NAS devices
 +
**[[Use_FOG_with_FreeNAS | FreeNAS]] has been reported to work as a storage node.
  
 
== Basic Idea ==
 
== Basic Idea ==
Line 18: Line 19:
 
*Unpack the FOG tar and navigate to fog/bin.
 
*Unpack the FOG tar and navigate to fog/bin.
  
*Figure out what operating system your NAS is using and try to figure out if it is closer to Red Hat, Ubuntu, or debian.
+
*Figure out what operating system your NAS is using and try to figure out if it is closer to Red Hat, Ubuntu, Centos, or debian.
  
 
* Run the installation script, ./installfog.sh
 
* Run the installation script, ./installfog.sh
Line 25: Line 26:
 
#Enter the IP address of the storage node.
 
#Enter the IP address of the storage node.
 
#Confirm your interface
 
#Confirm your interface
#Then you will need to enter the IP address or host name of the node running the FOG database (Fog Server IP)
+
#Then you will need to enter the IP address or host name of the node running the FOG database (FOG Server IP)
#Then you will be prompted for a username (typically fogstorage) and a password that is located on the FOG server, that will allow the storage node to access the main FOG server's database. This information is located in the FOG management portal for convenience (on the main for server). It can be accessed via Other Information -> FOG settings -> section FOG Storage Nodes.
+
#Then you will be prompted for a username (typically fogstorage) and a password that is located on the FOG server, that will allow the storage node to access the main FOG server's database. This information is located in the FOG management portal for convenience (on the main FOG server). It can be accessed via Other Information -> FOG settings -> section FOG Storage Nodes.
 
#You will then be prompted to confirm your installation settings, if they are correct press Y end hit Enter.
 
#You will then be prompted to confirm your installation settings, if they are correct press Y end hit Enter.
 
#When installation completes, the install will produce a username and password that will be needed to add the storage node to the FOG management portal. Username is "fog", password is in /opt/fog/.fogsettings
 
#When installation completes, the install will produce a username and password that will be needed to add the storage node to the FOG management portal. Username is "fog", password is in /opt/fog/.fogsettings
Line 39: Line 40:
 
#Enter the IP address of the storage node you are adding. This must be the IP address of the node, <u>'''DO NOT'''</u> use a hostname or the node will not function correctly.
 
#Enter the IP address of the storage node you are adding. This must be the IP address of the node, <u>'''DO NOT'''</u> use a hostname or the node will not function correctly.
 
#Enter the maximum number of unicast clients you would like this node to handle at one time. The value that we recommend is 10.
 
#Enter the maximum number of unicast clients you would like this node to handle at one time. The value that we recommend is 10.
#Is Master Node is a very dangerous settings, but for right now leave it unchecked, for more details please see: [[Managing_FOG#Master_Node_Status | Master Node Status]].
+
#Is Master Node is a very dangerous setting, but for right now leave it unchecked, for more details please see: [[Managing_FOG#Master_Node_Status | Master Node Status]].
 
#Next, select the storage group you would like this member to be a part of, in our example we will pick Default
 
#Next, select the storage group you would like this member to be a part of, in our example we will pick Default
 
#Next, specify the image location on the storage node, typically /images/, your image location should always end with a /.
 
#Next, specify the image location on the storage node, typically /images/, your image location should always end with a /.
Line 49: Line 50:
  
 
== Monitoring The Master Node ==
 
== Monitoring The Master Node ==
*On all storage nodes there is a new service (as of version 0.24) called FOGImageReplicator which is a very basic script which, if the node is the master, copies all of its images to all other nodes in the storage group. The coping is done every ten minutes by default, which means your images are NOT instantly duplicated to all nodes.
+
*On all storage nodes there is a new service (as of version 0.24) called FOGImageReplicator which is a very basic script which, if the node is the master, copies all of its images to all other nodes in the storage group. The copying is done every ten minutes by default, which means your images are NOT instantly duplicated to all nodes.
 
*If you would like to view the status of the image replication, you can do so on the storage node by switching to tty3, by typing ctl + alt + f3. Output is also logged to a file in the /opt/fog/log directory.
 
*If you would like to view the status of the image replication, you can do so on the storage node by switching to tty3, by typing ctl + alt + f3. Output is also logged to a file in the /opt/fog/log directory.
 
**FOGImageReplicator logs are also located in [[File:Config.png]] Fog Configuration --> Log Viewer --> FILE: [Select Image Replicator]
 
**FOGImageReplicator logs are also located in [[File:Config.png]] Fog Configuration --> Log Viewer --> FILE: [Select Image Replicator]
Line 57: Line 58:
 
*[[File:Bad_Node_info.png]]
 
*[[File:Bad_Node_info.png]]
 
*[[File:Bad_Node.png]]
 
*[[File:Bad_Node.png]]
* Information sited from
+
* Information sited from http://fogproject.org/forum/threads/create-nas-and-fog-1-1-2.12597/#post-44080
**http://fogproject.org/forum/threads/create-nas-and-fog-1-1-2.12597/#post-44080
 
  
 
*Check to see if your NAS device can connect to your FOG server's mysql.
 
*Check to see if your NAS device can connect to your FOG server's mysql.
Line 75: Line 75:
  
 
*Try again to access the server mysql database. If successful please go back to your webgui and see if your information is displaying correctly.
 
*Try again to access the server mysql database. If successful please go back to your webgui and see if your information is displaying correctly.
 +
[[File:Good_NAS.png]]

Latest revision as of 17:14, 1 November 2017

  • This is an option that has been successfully done on a few occasions and NOT ALL NAS devices work as a Storage node.
    • This is a generic setup for NAS devices
    • FreeNAS has been reported to work as a storage node.

Basic Idea

  • Install FOG storage node script on NAS and use it as a Storage node for your FOG server.
  • A few basic things will need to be installed by the install script ssh, ftp, nfs, and mysql.

Installation

NOTE: It is assumed that you already have a working FOG server at this point in time. If you do not please ask in the forum to get the server working first.

  • First you must obtain (enable) ssh on your NAS to be able to even work with it.
    • On some devices such as a "My Booklive" you will need to login to the web portal and enable it from there. See your device user manual for this.
  • Unpack the FOG tar and navigate to fog/bin.
  • Figure out what operating system your NAS is using and try to figure out if it is closer to Red Hat, Ubuntu, Centos, or debian.
  • Run the installation script, ./installfog.sh
  1. Select your operating system.
  2. When prompted for Server Installation Mode, select S, for storage node.
  3. Enter the IP address of the storage node.
  4. Confirm your interface
  5. Then you will need to enter the IP address or host name of the node running the FOG database (FOG Server IP)
  6. Then you will be prompted for a username (typically fogstorage) and a password that is located on the FOG server, that will allow the storage node to access the main FOG server's database. This information is located in the FOG management portal for convenience (on the main FOG server). It can be accessed via Other Information -> FOG settings -> section FOG Storage Nodes.
  7. You will then be prompted to confirm your installation settings, if they are correct press Y end hit Enter.
  8. When installation completes, the install will produce a username and password that will be needed to add the storage node to the FOG management portal. Username is "fog", password is in /opt/fog/.fogsettings
  • Go to your webgui of your FOG server and Add a Storage Node with the information shown in the installation script on the NAS.
    • If you lost or closed the interface before writing down the username and password it can be found in the install log located in /var/log/foginstall.log
  1. Log into the FOG Management Portal
  2. Navigate to the Storage Management section.
  3. Click on Add Storage Nodes.
  4. For the Storage Node Name, enter any alpha numeric string to represent the storage node.
  5. Enter any description you wish
  6. Enter the IP address of the storage node you are adding. This must be the IP address of the node, DO NOT use a hostname or the node will not function correctly.
  7. Enter the maximum number of unicast clients you would like this node to handle at one time. The value that we recommend is 10.
  8. Is Master Node is a very dangerous setting, but for right now leave it unchecked, for more details please see: Master Node Status.
  9. Next, select the storage group you would like this member to be a part of, in our example we will pick Default
  10. Next, specify the image location on the storage node, typically /images/, your image location should always end with a /.
  11. Next, you will want to check the box, to enable the node.
  12. The last two fields take the username and password that are generated during the installation of the storage node. username is "fog", password is in /opt/fog/.fogsettings
  13. Then click Add to have the node join the storage group.
  • You now should have a properly installed Storage node on a NAS device

Monitoring The Master Node

  • On all storage nodes there is a new service (as of version 0.24) called FOGImageReplicator which is a very basic script which, if the node is the master, copies all of its images to all other nodes in the storage group. The copying is done every ten minutes by default, which means your images are NOT instantly duplicated to all nodes.
  • If you would like to view the status of the image replication, you can do so on the storage node by switching to tty3, by typing ctl + alt + f3. Output is also logged to a file in the /opt/fog/log directory.
    • FOGImageReplicator logs are also located in Config.png Fog Configuration --> Log Viewer --> FILE: [Select Image Replicator]

Issues and Troubleshooting

Information not being displayed in Dashboard correctly

  • Check to see if your NAS device can connect to your FOG server's mysql.
#mysql -h <ipoffogserver> -u fogstorage <-p password> fog
  • If this fails you will need to check a few configuration settings.
  1. Open and edit file /etc/mysql/my.cnf
  2. Find the line bind-address and change 127.0.0.1 and change to the FOG server IP.
    • bind-address =127.0.0.1 --> bind-address =<ipoffogserver>
  3. Restart mysql
sudo service mysql restart
  • Try again to access the server mysql database. If successful please go back to your webgui and see if your information is displaying correctly.

Good NAS.png