Add a Nas (QNAP TS-231) as a Storage Node (Fog v1.4)



  • Hi everyone,
    This tutorial is above all the fruit of the efforts made by all the helpers (special thanks @george1421 and @chris-dees).
    I will now explain how to add a Qnap TS-231 Nas as a node storage in a 1.4 Fog system.

    Step 1: Prepare the Nas
    First we will activate some necessary features:
    Activate the NFS service
    0_1508422007306_b408b236-43ce-46a8-bf96-97608f4e467e-image.png
    and the FTP service
    0_1508422079801_f1ef349e-b924-454d-82a9-d32f81ce58c9-image.png

    We will now create a user who will be known in the two systems, the Nas and the fog (I’ll talk about it later).
    Let’s call him foguser with the password … password (for this tutorial, I will not be creative ^_^). His password will be the same in the nas and in the fog system.
    0_1508421303433_a43b6f25-b69a-4019-be31-d492947e58c7-image.png

    Now let’s create the shared folders (this part is totally inspired by the Synology tutorial made by @george1421)
    We will create 3 folders: images, snapins and tftpboot as in the pic under
    0_1508421524500_694490c0-a070-4b95-bedd-aa97b5bddefa-image.png
    Now as we edit the access rights for the images and snapins folders, we will mark them as to be Read and Write with the foguser
    0_1508421751507_c596fd84-5ebb-4591-a4db-d2492ae60aa7-image.png
    The access rights for the tftpboot will be read only

    As the service is activated, we can manage the NFS rights for each folders. Expand the Select permission type menu to choose NFS host access and do as in the following pic for the three Folders:
    0_1508422480901_95f29811-2d0e-4d10-a2de-2b4be5ffe921-image.png
    and apply

    That’s it for the Nas part (that was the longest).

    Step 2: Testing the NFS shares (This step is entirely a copy/paste from the Synology NAS as FOG Storage node tutorial by @george1421, hope he won’t mind ^_^)

    In this part we will connect to the Synology NAS from the FOG server to ensure our NFS shares are setup correctly, with the proper permission, and can communicate with a linux remote device.

    On fog server do the following:

    Log into the FOG server as root
    Key in the following from the linux command prompt to test the /images share
    mount -t nfs <nas_ip>:/share/images /mnt
    mkdir /mnt/dev
    touch /mnt/.mntcheck
    umount /mnt

    Key in the following to test the /images/dev share (note: this is a bit slight of hand here since we didn’t specifically share the /images/dev path. This function works because we selected “Allow users to access mounted subfolders” in Step 1 of Part 1.
    mount -t nfs <nas_ip>:/share/images/dev /mnt
    touch /mnt/.mntcheck
    umount /mnt

    Next we will connect to the snapins share and create the ssl directory and copy the ssl keys from the FOG server to the Synology NAS
    mount -t nfs <nas_ip>:/share/snapins /mnt
    mkdir /mnt/ssl
    cp -R /opt/fog/snapins/ssl/
    * /mnt/ssl
    umount /mnt

    Next we will copy the PXE boot files from the FOG server to the NAS
    mount -t nfs <nas_ip>:/share/tftpboot /mnt
    cp -R /tftpboot/
    * /mnt
    umount /mnt

    The difficult part for me was to find the right NFS path with that kind of Nas. Some other Qnap tutorials are talking about different NFS path (I was very disappointed at this time 'cause I’ve never questioned the path I’ve seen in other tutorials but that was the key) and I’ve found the right way to put it in the settings by chance in a Qnap forum about a totally different problem.
    So to me more consise, as you can see, the right snapin path was /share/images.

    That completes the NAS setup quality check. To recap here. We confirmed that the shares are shared correctly with the proper permission to allow an external linux system to create files on the NAS. We’ve also created the required .mntcheck files the imaging code uses to identify its shares. And lastly we copied several required support files from the FOG server to the NAS. Just be aware that if you update the FOG server to a newer release, you will probably need to refresh the files in the /tftpboot share on the NAS to keep them insync with the FOG server.

    Step 3: Configure the fog server

    In the fog server, we go to the Storage management and choose Add a storage group and create the storage group named simply NAS(because I surely will add another Nas in the future so a group is the best way to organise that).
    In a second time we choose the Add storage node menu and as our Nas’s IP address is 172.16.0.249, we enter the following informations
    0_1508422963977_191fa443-be6f-4333-a9bb-c5c9d25fa82f-image.png

    In the Management Username and Management Password be attentive to enter the same user/password as created in the Nas. In our tutorial foguser with the password password.
    Apply all that and that’s it! You have done the job!

    When you create a new image, create it in the Nas node group (of course!) and just test a capture/deploy to be sure.

    ----End of the tutorial----

    I hope that was clear and I apologize for some grammatical mistakes I may have made (yes I’m french).

    Thanks again to those who helped me and thank to all those who have created and make the Fog system marvelous. You make me a great gift every working day: Time! So a big thank to you all guys.

    Have a nice day.


Log in to reply
 

394
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.