How To Enable Time Machine On FreeNAS (Video)

Leopard Time Machine Ad

Leopard Time Machine Ad (Photo credit: Feras Hares)

I know, I keep on making boring videos, but here is another one…  The video right after the break will show you how to configure AFP so you can enable a Time Machine with FreeNAS.  With Time Machine on FreeNAS, you don’t have to backup your Mac laptop such as MacBook Air to an external hard drive any longer, because it’s very inconvenient if you have to carry both the laptop and the external hard drive around.  Just remember though, my method in the video is to enable one user per one Time Machine virtual volume.  This means, if you have two Mac laptops, you have to create two Time Machine virtual volumes (i.e., ZFS datasets).  You can configure the permissions for each Time Machine volume.  You can either give full access of the volume to everyone or just the user, but I suggest you should set 755 permission for the volume as user would have full access to the volume and the everyone else will only have read and execute permissions.  Enjoy the video right after the break…

Advertisements

Free Up Some Hard Drive (Or SSD) Space For Your Mac By Having Spotify Stores Offline Playlists On A NAS Volume

Vinh Nguyen's Spotify Offline Playlist Poppings

Vinh Nguyen’s Spotify Offline Playlist Poppings

Did you know that you can configure Spotify to save all offline playlists on a network attached storage volume?  In my case, I used FreeNAS to create a ZFS dataset volume; turning ZFS dataset volume into AFP share which had allowed Spotify on Mac OS X to save the offline playlists onto this very volume.  This way, I can free up some storage space on my MacBook Pro’s hard drive for other things.  I can also see this idea might be useful for Mac users who happen to save Spotify offline playlists on a small SSD (Solid State Drive), because Mac users can free up a lot of storage space for their small SSD by saving Spotify offline playlists on a network attached storage volume.

Configuring Spotify on Mac OS X to save offline playlists onto NAS is easy.  Just open up Spotify, go to Spotify > Preferences, scroll down till you see where it says Cache, click on Browse button to locate your NAS’s volume, and that is all.  Here is the example of my NAS (FreeNAS) volume’s path on MacBook Pro, [/Volumes/AppleShareVolume/Spotify-offline-playlists].  A Mac need to be connected (i.e., authenticated and logged in) to a NAS first before Spotify can successfully locate a NAS volume.

Mac users who are on the road a lot and need to play Spotify offline playlists on their NAS volume, they can basically configure their router to do a port forwarding of port 548 (AFP port) for the NAS server’s local IP address.  Furthermore, to securely authenticate with NAS server, Mac users can use VPN to connect to their NAS server.  If Mac users don’t know how to set up a VPN server, they can easily use either TunnelBear or Private Tunnel VPN service.  Both TunnelBear and Private Tunnel support Mac OS X and allow Mac users to quickly connect to a VPN server so the public network connection such as a coffee shop’s WiFi connection can be encrypted.

I almost forget to tell you this!  Mac users need to make sure the home Internet connection has a decent upload speed.  Without a decent upload speed, the home network will not be able to transfer the data from NAS to Spotify app fast enough, therefore defeating the purpose of having Spotify offline playlists to be saved onto a NAS.  After all, what is the point of saving Spotify offline playlists onto a NAS if the home network is too slow in delivering the playback for the Spotify offline playlists, right?  Of course, Mac users can always rent a premium server that stays awake 24/7 and turn it into a NAS server, but this solution is overkilled and too expensive for home using purpose.  Obviously, even a NAS server is overkilled for home using purpose, but FreeNAS is Free and it can be installed onto any cheaply built computer that has adequate RAM and storage space.  Besides using NAS to store Spotify offline playlists, Mac users can go as far as to save iTunes music, movies, PDF files, and so much more onto a NAS too.

Using FreeNAS’s CIFS Service To Allow Local Computers (e.g., Mac, Windows, Linux) To Share Data Within A Local Network

As I’m getting to know FreeNAS better, I begin to like it more than ever before.  FreeNAS has allowed me to set up CIFS share (Common Internet File System share) so I don’t have to rely on Pogoplug software to share data between my local computers.  Why is FreeNAS’s CIFS share is better than Pogoplug solution?  Well, I like how my data don’t have to travel through Pogoplug’s servers that host outside of my local network in order for me to be able to share data between my local computers.  With this piece of information, we can acknowledge that data travel locally are always faster (i.e., not making a trip to the Internet first and so save time and bandwidth) and more secure if the local network is being secured correctly.  Of course, I’m still going to use Pogoplug when I travel abroad, because Pogoplug is great in allowing you to connect to local computers without opening up any port within your router (this means you don’t have to sacrifice your network security when sharing files between local network and the Internet).  Still, you must trust Pogoplug’s network security in order for you to access your local computer through Pogoplug software, because ultimately your data will travel through Pogoplug’s network before they reach the devices that you use outside of your local network.

Steps to create CIFS Share in FreeNAS (the instructions at the bottom are tailored for FreeNAS 8).

  1. The first thing you want to set up a CIFS within FreeNAS is to go ahead and make sure you have created a ZFS Dataset.  What on earth is ZFS Dataset?  Within FreeNAS, you can create separate ZFS Datasets within a ZFS volume so each ZFS Dataset acts like a partition within a partition.  You can view each ZFS Dataset as a partition within a ZFS volume, but we know a ZFS volume can also be viewed as a partition itself.  Anyhow, why on earth one wants to create a partition within a partition?  Simple!  FreeNAS allows the creation of ZFS Datasets for one reason, and this reason is to enhance data security.  Each ZFS Dataset can be configured with specific permissions that not necessary to be the same as the global permissions of a particular ZFS volume.  This means if you have the access to a specific ZFS volume, you might not have access to a ZFS Dataset (i.e., partition) within — only the user who has correct permission can actually access to a specific ZFS Dataset.  In my case, I named my ZFS Dataset for CIFS Share as windows_share.  (Creating a ZFS Dataset by go to Storage > Create ZFS Dataset.)
  2. Now you need to go to Services and click on the wrench icon next to the on/off switch of CIFS label.  A CIFS settings window would pop up.  In this CIFS settings window, you might want to,
    •  enable Authentication Model for Local User (better security this way)
    • name NetBIOS Name to simply freenas
    • leave Workgroup as WORKGROUP
    • set log level to minimum (so your FreeNAS server/box won’t be overload with extremely large log files)
    • check the box which labels as Local Master
    • check the box which labels as Time Server for Domain
    • leave Guest account drop down box as nobody
    • do not check the box that labels as Allow guest access (for security purpose)
    • check the box that labels as Large RW support
    • check the box that labels as Send files with sendfile(2) (make Samba faster if Samba software/protocol has to be used to access this CIFS share)
    • check the box that labels as EA Support (to enable extended attributes support)
    • check the box that labels as Support DOS File Attributes
    • check the box that labels as Zeroconf share discovery (to allow Mac OS X clients to access CIFS share)
    • click OK button to save all the settings of CIFS settings
  3. Now, under Services again, switch the CIFS’s OFF button to ON.
  4. Click on Sharing > Windows > Add Windows Share.
    • Inside the Name’s text box, enter windows_share
    • For the path, try to either enter the path of the ZFS Dataset we had created earlier or just browse to it using the Browse button
    • Check the box that labels as Browsable to Network Clients
    • Enter the local IP addresses of local computers that you want to allow access to ZFS Dataset (i.e., CIFS share) into the text box which labels as Hosts Allow
    • Enter ALL into the text box which labels as Hosts Deny (to deny all other computers that don’t have the IP addresses that list inside the Hosts Allow text box)
    • Click OK button to save everything and exit this Windows Share window

Now you should be able to connect to this particular FreeNAS’s ZFS Dataset.  From a normal user’s standpoint who uses Mac or Linux or Windows to connect to this ZFS Dataset, all the user sees would be just another local network folder (or you can say local network destination).  Basically, any local computer which has permission to connect to this specific ZFS Dataset will see it as a Windows Share folder, therefore the data within this ZFS Dataset suddenly makes available to other Windows, Mac, and Linux machines.  How come Mac and Linux can see the data within CIFS Share folder (i.e., ZFS Dataset of CIFS Share)?  I think it’s that Mac and Linux are supporting the reading and writing to Windows file system.

Using a Windows computer to connect to FreeNAS Windows Share is easy!  All you have to do is to go to Computer > Network.  Once the Network locates FreeNAS Windows Share volume (i.e., ZFS Dataset of CIFS Share), you can browse to it and use it as if it’s just another network folder — allowing local computers to share the same data (i.e., read and write to the same data).

You can also use Mac machine to connect to FreeNAS Windows Share!  How?  Open up finder and go to Go > Connect to Server.  Inside Connect to Server box, enter cifs://192.168.0.101/ (please replace the local IP address to the one that runs your FreeNAS server).  Click Connect button to connect to FreeNAS windows share.  If it asks for user credential (i.e., username and password), please enter the username and the password that you allow to have access to this particular FreeNAS Windows Share (i.e., ZFS Dataset of CIFS share).  Once you can browse the FreeNAS Windows Share, you can read and write data to this ZFS Dataset, consequently allowing Windows computers to share data with Mac machines within a local network.

I’ve not used Linux to access FreeNAS Windows Share, therefore I don’t know the exact process of how doing it just yet.  You know?  Please share your knowledge on this in your comment.  Thank you!

Setting Up iSCSI With FreeNAS So Any Computer Can Have Additional Virtual Internal Hard Drives

Six hard disk drives with cases opened showing...

Six hard disk drives with cases opened showing platters and heads; 8, 5.25, 3.5, 2.5, 1.8 and 1 inch disk diameters are represented. (Photo credit: Wikipedia)

Did you know you can use FreeNAS to host iSCSI service?  OK, what is this service anyway?  To tell the truth, I’m so new to this that I’m scared to talk of it, because I don’t want to have this wrong and steer you wrong.  Anyhow, I think I know how this service works inside FreeNAS.  Let me sum this up, it’s like using FreeNAS’s storage volumes to act as hard drives on different computers.  So, to make this clearer, let say you have a FreeNAS server with plenty of ZFS disk space and you had already created the necessary ZFS Datasets to act as if these ZFS Datasets are different partitions (i.e., ZFS volumes or hard disks); you can basically set up iSCSI service through FreeNAS to make these ZFS Datasets to act as if they are internal hard drives of any other computer you have access.  Once you set a computer to connect to iSCSI service’s volumes (i.e., extents) and with appropriate permissions, the users who log onto this specific computer will be able to use FreeNAS’s ZFS Datasets (i.e., ZFS volumes) as if there are additional internal hard drives on the computer.  How neat, right?  Unfortunately, I think the setup for iSCSI is rather confusing, and you have to really understand iSCSI to not make mistakes when setting up iSCSI service in FreeNAS.  I’m myself not exactly sure of how setting up iSCSI, therefore I can’t really make a video about iSCSI.  Luckily, I’ve found an instructive video of teaching you how to setup iSCSI in FreeNAS.  Please enjoy the video out right after the break!