Follow this tutorial step by step, and you will have everything configured, I spent a lot of hours to understand where my mistakes were and I make this tutorial to help the maximum number of people.
To begin, let’s configure the NAS - Synology DiskStation:
First, go to --> Control Panel --> File services --> SMB/AFP/NFS, scroll down:
-Check “Activer NFS” = “Enable NFS”.
-Check “Activer la prise en charge de NFSv4.1” = “Enable support for NFSv4.1”.
Go to --> Control Panel --> File services --> FTP:
-Check “Activer le service FTP (pas de chiffrage)” = “Enable FTP service (no encryption)”.
-Check “Utiliser la plage de ports par défaut (55536-55567)” = “Use the default port range (55536-55567)”
Go to Control Panel --> User --> Select the advanced window:
-Check “Activer le service d’accueil de l’utilisateur” = “Enable the user’s home service”.
-Let’s create the folders to share.
-Go to Control Panel --> shared folders --> create and follow the pictures below:
-Click “Suivant” = “Next”.
-
-Click “Suivant” = “Next”.
-Click “Suivant” = “Next”.
-Click “Appliquer” = “Apply”.
-Click “Ok”.
Create two more shared folders with the name “tftpboot” and “snapins”, with the same configuration as the shared folder that we create together “images”
Go to --> Control Panel --> File services – TFTP:
-Check “Activer le service TFTP” = “Enable TFTP Service”.
-Dossier racine TFTP = “TFTP root folder” : tftpboot (choose the tftpboot folder you created).
After doing that, you have to create a user.
-Go to Control Panel --> User --> Create and follow the pictures below:
-Here the username = userFOG and password = FOGuser.
-Check --> “Ne pas autoriser l’utilisateur à changer le mot de passe du compte” = “Do not allow the user to change the password of the account”.
-Click “Next”.
-Check only --> users.
-Click “Next”.
-Folder “images” --> Reading/writing.
-Folder “snapins” --> Reading/writing.
-Folder “tftpboot” --> Reading/writing.
-Click “Next”.
-Click “Next”.
-Click “Next”.
-Click “Next”.
-Click “Apply”.
Go to Control Panel --> Shared folders --> select the folder “images” you created before --> Right click on folder --> edit --> NFS permissions --> “Créer” = “Create”:
-Privilege: R/W
-Squash: no mapping
-Security: sys
-Check “Activer le mode asynchrone” = “Enable asynchronous mode”.
-Check “Permettre à des utilisateurs d’accéder aux sous-dossiers montés” = “Allow users to access mounted subfolders”.
-Click “Ok”.
DO THE SAME THINGS ON THE OTHER TWO FOLDERS: “tftpboot” and “snapins”.
DO NOT ACTIVATE THIS IN FOLDERS:
NAS is now configured.
Let’s move on the FOG server. (I host the server fog on ubuntu):
CREATE THE SAME USER THAT WE CREATED ON THE NAS ON THE FOG SERVER
Connect to your FOG server and open the terminal and enter these lines:
sudo -s
mount -t nfs "Your_NAS_IP":/volume1/images /mnt
mkdir /mnt/dev
touch /mnt/.mntcheck
umount /mnt
mount -t nfs <syno_nas_ip>:/volume1/images/dev /mnt
touch /mnt/.mntcheck
umount /mnt
mount -t nfs <syno_nas_ip>:/volume1/snapins /mnt
mkdir /mnt/ssl
cp -R /opt/fog/ssl/* /mnt/ssl
umount /mnt
mount -t nfs <syno_nas_ip>:/volume1/tftpboot /mnt
cp -R /tftpboot/* /mnt
umount /mnt
When you have done that, you have nothing to do on the FOG server.
Go to the FOG Management GUI, select Storage --> Add storage Node:
-Management Username it’s the user we created before on NAS.
-Management Password it’s the same password of the user we created on the NAS.
-Check master node.
-Storage Group: default.
-Click on ADD.
Go to Storage --> All storage nodes --> Click on DefaultMember:
-Uncheck “Master Node”.
-Click “Update”.
Now create a new image and try to capture a image:
Go to hosts --> List all hosts --> Click on your host:
-Click “Update”.
And now capture the image:
YOU CAN DEPLOY IMAGE TOO
There is already a very good tutorial on this subject, but I wanted to enhance it with images that it is more understandable.
https://forums.fogproject.org/topic/9430/synology-nas-as-fog-storage-node?page=1