• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

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

    Scheduled Pinned Locked Moved
    Tutorials
    3
    3
    3.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      Iarwayn
      last edited by Iarwayn

      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

      Then activate the TFTP server and input the right Root like the pic after (sorry for the french in the pic):
      0_1513249536331_66c0d9b3-46c5-4265-a7d4-8c21f989df2a-image.png

      Last thing to do (and I think it’s exclusive to the QNAP Nas) is to activate the advanced authorizations like in the pic after because in some case, if not activated, you will have access right problems to the /images/dev folder stored in the qnap and you will have in consequence a message at the end of the capture operation a “Updating database failed” message (thanks to the “Troubleshoot FTP” page in the wiki.fogproject.org).
      This may take a while.

      0_1513594945702_d2be7a5e-f007-464e-a308-fd5180177dec-image.png

      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.

      1 Reply Last reply Reply Quote 3
      • ?
        A Former User
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • S
          sysadmin
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • george1421G george1421 referenced this topic on
          • 1 / 1
          • First post
            Last post

          154

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project