Openfiler, Freenas and RSYNC

Openfiler, Freenas and RSYNC

Openfiler, Freenas and RSYNC 150 150 Roderick Derks

To Openfiler From Another Machine (a Freenas server)

  1. In Freenas run the RSYNC service
  2. Goto Services > RSYNC > Server > Modules and create a module from the right directory
  3. Use ssh to log into your Openfiler box
  4. To query which modules are available (notice the double colon):
    # rsync freenas.yourdomain.com::
    DATA            MY DATA
  5. To rsync from the module (notice the double colon again)
    # rsync -avu freenas.yourdomain.com::DATA/* /mnt/vg_data01/data01/data/
  6. This one worked for me too(create the user first in Freenas)
    # rsync -avu username@freenas.yourdomain.com:/mnt/DATA/* /mnt/vg_data01/data01/data

To a Freenas Server From Openfiler

  1. First create a module on Openfiler:
    # vi /etc/rsync.conf

    # PLEASE DO NOT MODIFY THIS CONFIGURATION FILE!
    #       This configuration file was autogenerated
    #       by Openfiler. Any manual changes will be overwritten
    #       Generated at: Sat Jun 6 0:32:09 CEST 2009

    port = 873
    motd file = /opt/openfiler/etc/rsync.motd
    address = 192.168.0.10

    # End of Openfiler configuration
    [data]
            comment = data
            path = /mnt/vg_data01/data01/data
            read only = no
            list = yes
            hosts allow = 192.168.0.0/24
            secrets file = /etc/rsyncd.secrets
            uid = nobody
            gid = nobody

    And then reload rsync:
    # service rsync reload

  2. Now you can schedule a RSYNC job in Freenas:
    Services > RSYNC > Client and create the job using the module name.
  3. Check the Freenas logs by going to:
    Diagnostics > Logs > RSYNC > Client

    So remember that this is for getting data TO freenas, not From Freenas to Openfiler. I thought it was the other way around and I lost 50GB of data before I was able to stop the process (by shutting down Freenas). Damn.

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message