FreeNAS: Network Attached Storage
What is FreeNAS ? FreeNAS is an operating system based on FreeBSD with a web interface for management, and all the protocols you need to share files between Windows, Mac and Linux.
Free NAS is a free and open-source software network-attached storage (NAS) system based on FreeBSD and the ZFS file system. It is licensed under the terms of the BSD License and runs on commodity 32 and 64-bit x86 hardware. FreeNAS supports Windows, OS X and Unix clients and various virtualization hosts such as XenServer and VMware using the CIFS, AFP, NFS, iSCSI, SSH,rsync and FTP/TFTP protocols. Advanced features include full-disk cryptography and a plug-in architecture for 3rd party software.
FreeNAS supports the legacy Unix File System and the ZFS filesystem which provides data integrity checking to prevent data corruption, enable point in time snapshotting, replication and several levels of redundancy including striping, mirroring, mirrored striping (RAID 1+0), and three levels of RAID-Z.
FreeNAS is managed through a comprehensive web interface that is supplemented by a minimalistic shell console that handles essential administrative functions. The web interface supports storage array configuration, user management, sharing configuration and system maintenance.
As an embedded system appliance, system boots from a 2GB image that typically resides on a USB Flash device or SATA DOM. This image can be configured using a bootable CD-ROM installer or by flashing the image directly using a utility like ‘dd‘. The operating system is fully independent of its storage arrays, allowing its configuration database and encryption keys to be backed up and restored to a fresh installation of the OS. This separation also allows for system upgrades to be performed though the web interface.
- FreeBSD 9.1 operating system
- Easy-to-use web interface with optional SSL encryption
- Localized into over 20 languages
- Plug-in Architecture
- Included Transmission, MiniDLNA and FireFly plug-ins
- Performance graphing
- Email log and reporting notification
- Downloadable configuration file and encryption keys
- OpenZFS v5000 file system with Feature Flags
- Theoretical storage limit of 16 Exabytes
- File system snapshotting and replication
- Six levels of file system compression including lz4 and gzip
- Disk encryption with GELI and AESNI hardware acceleration
- Disk deduplication
- S.M.A.R.T. disk diagnostics
- UFS2, NTFS and FAT file system support
- CIFS, AFP, NFS, iSCSI, SSH, FTP/TFTP protocols
- LDAP and Active Directory client support with Windows ACLs
- Apple Time Machine support
- rsync replication
- Link aggregation and failover
- VLAN networking
- Dynamic DNS client
- Remote syslogd forwarding
- SNMP monitoring
- UPS (Uninterruptible power supply) support
- iozone, netperf, OpenVPN, tmux and other utilities
- A 64-bit Intel or AMD processor.
- A system board with a decent amount of SATA ports.
- At least 4GB of RAM.
- X number of SATA hard drives.
- One CAT5 cable.
- One USB thumb drive to install the FreeNAS OS image or
- One blank CD-R / CD-RW for writing the FreeNAS ISO in preparation for the installation.
- Oh yeah, the 64-bit FreeNAS ISO image itself, which you can snag here.
FreeNAS hardware requirements.
- FreeNAS needs to be installed on a USB drive separate from the disks (or a small drive) since FreeNAS can not utilize the drive on which it’s installed for storage.
- You can manage the configuration using the web interface
- Forget about WiFi ( for now )
1. The very first step is to download the FreeNAS ISO image and burn it to a blank CD-R/CD-RW. You can get the file here.
2. Place the USB stick into a USB port that’s attached directly to your system board.
3. Power up your machine and head directly to your BIOS config. Boot Order: CD/DVD drive, USB HDD, disable all other devices
4. You’ll see some text scrolling like:
After Booting You will be welcomed by :
5. All the options are self explanatory. Choose Option 1 or just wait for the timer to finish and boot into default installer
Select fist option:”Install / Upgrade to hard drive/flash device, etc”
6. You should select your USB key
7. All data will be wiped from your drive for installation
8. Installation is very fast due to the size of the OS image
9. Reboot your System and remove the CD from your drive. Once your computer reboots, you’ll be inside the Free NAS OS.
Congratulations, you’ve now got Free NAS installed.
CREATE DISC VOLUMES
1. Get the IP of the box < in this case: http://192.168.11.48/ > That’s telling us the URL through which we can access the system management interface.
note: This address can ( and should ) be controlled from your router box. Check your DHCP settings and make this box ‘static’ – you don’t want this address changed every time you restart the box
2.Open up the management (from another computer – you can now unplug your keyboard and monitor from your FreeNAS and move the box to some more ‘convenient’ place )
3. First thing you NEED to do is ‘change default’ password. Select “Account” -> “My Account” -> “Change Password”
CREATE A USER
Next, create a regular, non-administrator user. “Account” -> “Users” -> “Add User.”
FreeNAS supports two types of file systems and three sharing protocols.
- UFS. An old stand-by, the Unix File System. ( It lacks the volume management, RAID and pooling options )
- ZFS. supports ‘ZFS’ data integrity
- CIFS/SAMBA. Open-source implementation of Microsoft’s SMB (Now mainly referred to as CIFS)
- AFP. Apple Filing Protocol
- NFS. Network File System
All three of these have their advantages and trade-offs. For simplicity’s sake, we’re going to show you how to set up a CIFS share. This is because Windows, OS X and your favorite GNU/Linux distro all offer support for this protocol out of the box.
1. First, we have to set up our disk volumes.”Storage,” -> “Volumes” -> “Create Volume.”
Before you check any disks, give the volume a name and click “ZFS.” This will show the ZFS Extra section. Notice iyou can select None, Log, Cache or Spare for each disk listed. You would use these options if you wished to host your ZFS Log data or cache on a separate drive, like an SSD, to increase performance. The spare option would allow the drive to operate as a backup in the event one of the other drives failed. For the purpose of this guide, we’ll leave them all set to “None.”
2. Check all of the disks in the “Member disks” section.
- Notice the “Group Type” there? FreeNAS is asking us what type of volume we want. Since we only have three disks, our available options are: ZFS Mirror, ZFS Stripe or RAID-Z.
- A ZFS mirrored volume would create a volume of the three drives above limited to the space of the smallest drive. So, we’d get a 71.4GB volume that had a one-to-one copy on our 250GB drive and 160GB drive. In case one of the drives died, we’d still have a backup copy on the other. This would be a poor choice with the combination of drives we’re using, since we’d lose so much available storage. Also not a wise choice with the availability of RAID-Z.
- A striped volume creates a volume which has an available size of all disks combined. So in this case we’d get 442.5GB of storage available, with no redundancy. Not the best setup for redundancy, because if a drive fails, your volume goes offline and you’ll have possible data loss. Always remember: it’s never a question of if a hard drive will fail, but when. This is, however, the best setup for providing the maximum amount of storage space.
- A RAID-Z1 Volume, in the most basic of terms, is an advanced mirror.
In our case, we’ll go with ZFS Stripe. If you have a better disk setup than us — say, three 1TB drives — you’ll want to choose RAID-Z or ZFS Stripe with two drives and configure the third drive as a spare in the ZFS Extra settings.
At last, we click “Add volume” and the volume is created. Next, change the permissions on that volume so that anyone can read and write to it.
1. On the left, under Storage > Volumes, you should now see it listed as /mnt/myvolname, where “myvolname” is the name you gave to your newly minted volume. In our case, it’s /mnt/data. Expand that menu and click “Change Permissions.”
2. Under the “Mode” section, select both unchecked boxes beside “Write” and select “Set permission recursively.”
3. Click the “Change” button to set the permissions.
Now it’s time to share that volume and get on with the exciting business of saving your data.
The very first thing we need to do is enable the services required to share our files. Since we’re using CIFS specifically, we want to enable the service required for that particular protocol. So, click on the “Services” button with the gears icon at the top of the page, and you should see this:
Hit the “OFF” button to enable CIFS. Here, you can also enable any other protocol you’d like, such as SSH, NFS, AFP, et cetera. The slider should be flipped to “ON” when you’re done.
Next, click the wrench icon to bring up the CIFS service options. We want to check the “Allow guest access” checkbox and click OK.
Now, let’s create our CIFS share. On the left menu, expand “Sharing”, then “CIFS Shares” and click “Add CIFS Share.”
Give your CIFS share a name, and select the path to the volume you just created. In our case /mnt/data not /mnt/vol1. Basically prepend “/mnt/” to the name you gave your volume. Make sure to check “Browsable to Network Clients,” “Allow Guest Access.” Scroll down and click “OK.”
Now you can enjoy your Network Storage storage. Start copying over your music, pictures and movies. And hey, now you can enable UPnP in FreeNAS and pickup a media player that supports DLNA. There’s really so much you can do with a home NAS. Exploring is half the fun.
TnX && Credit: 0xFFFF
- Ease of Management
You will need to know some basic technical information about your home network