Click here to Skip to main content
15,900,378 members
Articles / Operating Systems / Windows
Technical Blog

FreeNAS – Windows (CIFS) Shares on ZFS

Rate me:
Please Sign up or sign in to vote.
4.89/5 (3 votes)
5 Nov 2013CPOL1 min read 18.6K   2  
How 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.

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:

Image 1

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:

Image 2

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

Image 3

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:

Image 4

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

Image 5

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

Image 6

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:

Image 7

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

Image 8

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

Image 9

Indeed we got the first version of the text file:

Image 10

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.

This article was originally posted at http://blog.anichin.com/freenas-windows-cifs-shares

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Canada Canada
Angel Anichin is experienced .Net developer living in Canada.

Expertise: ASP.NET, C#, MS Content Management Server, MS SQL Server, Oracle, HTML, JavaScript, CSS

Hobbies: Digital Photography, Skiing

Comments and Discussions

 
-- There are no messages in this forum --