FreeNAS – Windows (CIFS) Shares on ZFS

In the previous article we talked about Setting up ZFS.

Here we are going to create a Windows (CIFS) share that will be accessible on the local network and will demostrate how to use the ZFS snapshots to restore lost data.

Let’s Add Windows (CIFS) Share from Sharing -> Windows (CIFS) Shares:

Creating a CIFS share will automatically start the service if it is not running already. Alternatively you can manually start or stop the service from Services -> Control Services.

We also have to configure the CIFS service (Services -> CIFS) by providing the NetBIOS name, Workgroup, etc:

Now we can try to access the newly created share by typing \\freenas2\Backup in Windows Explorer:

We have to provide username and password in order access the share. The username is freenas2\john and the password is the one you set up when creating the user:

If you look at the security settings for the share you can see something similar like this:

Now let’s create a simple text file in the share, type some text and save it:

We are going to manually create a snapshot because we do not want to wait an hour for the periodic one to just demonstrate how it works:

We are going to add some more text to the file we created earlier:

Now let’s roll back the snapshot we created – this should bring back the first version of the text file:

Indeed we got the first version of the text file:

This is really a simplistic look at the ZFS snapshots but it at least gives you some idea about how things work. I would personally experiment with bigger files (movies, pictures, etc.) to see how fast snapshots will eat up the disk space.

Leave a Reply