"Permission denied": another Nas Issue (Qnap TS-231)



  • Server
    • FOG Version: 1.3.5
    • OS: Ubuntu 14.04
    Client
    • Service Version: Any
    • OS: Mostly Win 7
    Description

    Issue to connect a Qnap NAS to capture and deploy fog’s images



  • This is probably out of the scope of your issue but since I set 2 qnaps I wanted to mentioned what I did. I tried exactly what you are doing but on a synology and it was not very pretty. So I went this way with it…

    1. purchased a qnap and setup the raid array giving me about 10TB of storage. (4x4TB WD Red)
    2. setup virtualization station on the qnap and installed Ubuntu 16 as a virtual machine (giving the VM the entire raid array as it’s hard drive)
    3. from there I just launched the Ubuntu VM and installed Fog 1.40 (haven’t updated yet)
    4. once that was done I setup a second qnap nas at a second facility and repeated the above steps except I set this one up as a storage node and pointed it to the first one
    5. I setup the location plugin and I have a main location (set as master) and a secondary location both in the same storage group.

    I am able to boot to the network from anywhere and upload to the master and it replicates to the secondary. I am able to take snapshots of the VM as I go so if I break something I can load up a previous snapshot and get back to it.

    This is as far as I have gotten so far. I have working this at my job for a couple months as a side project.


  • Moderator

    @Iarwayn OK next time we wait 24 hours before answering. <just kidding>

    For me the hardest part was getting the right permissions in NFS share itself. The FOS engine is based on linux and it connects to the NFS server as root. By default most NFS servers will block root from accessing its NFS share.

    The second difficulty was with the FTP service, getting the path right. The FOS engine will clone the disk to /images/dev/<mac_address> on the FOG server. Once the image has uploaded the FOS engine uses FTP to connect to the FOG server and moves the file to /images/<image_name> so the FTP server needs access to the NFS share.

    The synology NAS instructions will most likely give you the best answer on folder design.

    Good luck to you and let us know your success. We can always use good guides for others to follow.



  • @george1421 I didn’t expect a so fast answer! Thanks o/
    I was so close from the painting that I couldn’t see the whole picture!
    Mounting a mounted share Oo’ … I’m going to test the transformation of my Qnap into a fog storage node and we’ll see.
    I’ll tell you if that works and if so, I will try to make a clear modus operandi for the Qnap!
    Merci beaucoup ^_^


  • Moderator

    just so you are clear. You can not connect your qnap to your fog server and have your files saved to the qnap device. NFS does not like to share out a mounted share. The target computer uses nfs to connect the target computer to the fog server for imaging. So you can not reshare an nfs mounted share.

    You can (maybe) turn a qnap nas into a FOG storage node and then (maybe) turn that storage node into a master node.

    I’ve done two write ups on 1) using a synology NAS as a fog storage node and 2) using a windows 2012 server as a fog storage node.

    https://forums.fogproject.org/topic/9430/synology-nas-as-fog-storage-node
    https://forums.fogproject.org/topic/10097/setting-up-a-windows-2012-server-as-a-fog-storage-node

    It should be possible with the qnap as long as your qnap has the following services.

    1. NFS
    2. FTP
    3. TFTP


  • @Iarwayn said in “Permission denied”: another Nas Issue (Qnap TS-231):

    Server
    • FOG Version: 1.3.5
    • OS: Ubuntu 14.04
    Client
    • Service Version: Any
    • OS: Mostly Win 7
    Description

    Issue to connect a Qnap NAS to capture and deploy fog’s images

    Hi everyone (and maybe my saviors),

    First of all, I’ll do my best to write in good english but mine is not perfect so I apologize if I make mistakes.

    I’ve installed fog 1.3.5 on a VM and I try since 3 days to use and connect my NAS Qnap TS-231 to capture/deploy images from clients of my network (172.16.0.0/16).
    I’ve read carefully Sunks topic (https://forums.fogproject.org/topic/8668/qnap-nas-storage/17) and boeleke’s too (https://forums.fogproject.org/topic/6808/adding-nas-nfs-storage-to-fog) and a lot of others (qnap forums also) but anyway, I must do something wrong and I don’t know why.

    First, I’ve activated the NFS service on my Qnap and properly (I think) configure it with my shared folder /fog
    0_1496848794849_3bd03190-da97-485f-b5b7-936de3cf4d07-image.png
    And yes I’m french ^_^.
    Then I’ve created the same user/login on my NAS (with admin rights) than the Administrator of my fog server (@ch3i made me realise that the client connects himself directly to the nas)
    I’ve mounted on my Ubuntu server the appropriate folders with
    mount -o nolock,proto=tcp,rsize=32768,intr,noatime 172.16.0.249:/fog /images
    mount -o nolock,proto=tcp,rsize=32768,intr,noatime 172.16.0.249:/fog/dev/ /images/dev
    To test if my solution was going well so far, I’ve copied a text file created in /images to /images/dev -> OK
    My /etc/exports file is like that
    0_1496849605587_db5ce238-2820-4b77-97ea-b08b809012a8-image.png
    Finally I’ve created the .mntcheck files in my /images and /images/dev/ folders with
    touch /images/.mntcheck
    touch /images/dev/.mntcheck
    My fog interface shows me that
    0_1496850027437_a1c426b8-405b-4870-a622-94107f921e23-image.png
    and it makes me happy :D
    but when I try to capture an image from a client it shows me this
    0_1496850722801_5b27abee-91e3-4f03-85bf-aa2b684d02c6-image.png
    And I cry :’(

    I don’t know where is my mistake but when I wanted to check all the permissions, to the command line:
    chmod -R 777 /images
    I got the error that I don’t have the permission to do so.

    Oh and I almost forgot, I tried to add a node in the Fog server with those parameters
    0_1496852013747_71edcd0c-6308-4c0b-82d5-95182bf0ac39-image.png
    But it’s not working, I can’t even see it in the list of storage node.

    I begin to become bald by dint of scratching my skull.
    I’m the network administrator of a small school and it would be a real enhancement if that would work.

    I’m sorry for all the reading, but I want to be precise.

    thank you for your time and thank you more for helping me.


Log in to reply
 

336
Online

38727
Users

10554
Topics

99921
Posts

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