0% found this document useful (0 votes)
90 views

FreeNAS HOWTO - AJ's Data Storage Tutorials

This document provides a tutorial on installing and configuring FreeNAS for use as a network attached storage (NAS) device. It describes using FreeNAS version 8.2 in a virtual machine to create ZFS storage volumes from virtual disks, setting up Windows file sharing, modifying permissions, expanding volumes by adding additional disks, and creating a RAID-Z volume from four disks. It also briefly discusses enabling iSCSI support to provide block-level storage.

Uploaded by

sergiut
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views

FreeNAS HOWTO - AJ's Data Storage Tutorials

This document provides a tutorial on installing and configuring FreeNAS for use as a network attached storage (NAS) device. It describes using FreeNAS version 8.2 in a virtual machine to create ZFS storage volumes from virtual disks, setting up Windows file sharing, modifying permissions, expanding volumes by adding additional disks, and creating a RAID-Z volume from four disks. It also briefly discusses enabling iSCSI support to provide block-level storage.

Uploaded by

sergiut
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.

com/freenas-howto/

This installation was performed using VMware workstation,
however the principles are similar for a physical server. Using a
Virtual Machine allows the rapid creation of virtual components
such as disks and NICs and is therefore well suited to a tutorial.

1 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

FreeNAS is an excellent implementation of a robust file sharing
system. It is available from iXsystems or directly from
www.freeNAS.org (http://www.freeNAS.org)

In this tutorial Version 8.2 was used

Select the released version

2 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

Here the 64 bit version is used

Download the ISO image

Burn the ISO image to a CD and boot from the CD, The installer
should bring you to the following screen.

Select a location for the FreeNAS installation and select <OK>.

3 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

Select a fresh installation

Proceed by selecting <Yes>

After installation remove the CD and boot the newly installed
FreeNAS Operating System

The system should reboot and display the menu below:

4 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

Accept the default option and proceed to the Console setup screen:

The console presents minimal configuration options. At this stage it
should be possible to log in from a browser enabled client. Point the
browser to the IP address displayed (192.168.48.133).

5 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

The first step is to set up an admin password, select the <Account
Tab> then under <Admin Account> select <Change Password>.

The machine has two smaller SCSI emulated disks of 10 GB
capacity each and they will be used to create a volume on which to
house the shared NAS files. Under <Storage> select <Volumes> à
<View Disks>.

6 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

Edit the parameters (since these are actually virtual disks there is no
benefit in enabling power management. Give the disk a descriptive
name and select <OK>. Repeat for the second disk.

From the <Volume> branch select <Volume Manager>. In this case
the two disks will be set up using the ZFS file system. Select both
disks, then select the Filesystem type as <ZFS> and the Group type
as <Mirror>.

7 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

<Select Add Volume>

The volume is now shown as <Active>.

The volume will now be set up for shared access. From the
<Sharing> branch select <Windows (CIFS) Shares> à <Add
Windows (CIFS) Share>.

8 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

The path must be specified in the dialogue and this is obtained
from the previous screen (View Volumes) which shows the
mountpoint. Enable the service at the prompt.

After this the share should be accessible to CIFS clients –

9 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

Now that the share is accessible, the permissions
can be set to allow for write access. This can be
done by going to <Volumes> à <View Volumes>
and selecting the <Change Permissions> icon .

Note: Understanding permissions is key to file sharing. UNIX and
windows behave differently in how permissions are administered
and separate volumes should be created for each type of file
share. FreeNAS supports Apple, NFS and Windows shares.

The <Change permissions> dialogue shows a matrix grid allowing a
Windows or UNIX ACL to be set up for different groups and users.
THE ACLs are mutually exclusive and that is why a radio button
control is presented. After setting the permissions check to see if
files are read/writable to the share from a windows client.

10 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

If new disks are added to FreeNAS, then their capacity can be used
to extend a volume – here a third 10GB disk has been added.

This disk is not part of a volume and its capacity is available. To
add the volume to an existing volume select the volume name (here
ZFSMirror) from the drop down box, highlight disk da2 and then
select <Add Volume>

11 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

Note that the example above has added a non redundant volume
onto a redundant pair (not a good practice), but acceptable to
show how a volume would be extended) and now the capacity
has doubled since the first pair shows the capacity of a single disk
and the third disk is non redundant giving 2 x capacity of a single
disk.

Volumes can be removed by selecting the <Detach Volume> icon.

Recall that the volume has been previously set up as a CIFS share.
The correct way to remove the volume is to unwind the actions by
removing the CIFS share and then removing the volume.

12 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

If the user inadvertently forgets this step FreeNAS is aware that the
volume is part of a share and will issue a warning accordingly. So
to delete a volume the “lazy” way select <detach> as shown above
and then acknowledge the warning. Here the<Delete all shares>
option has been checked. In addition a data destructive option is
checked in order to put the disks into a clean state. Select <Yes> to
destroy the volume.

The Volume Manager now shows that no volumes exist.

13 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

To further demonstrate the capabilities of ZFS a four drive RAID‐Z
volume will be created. This option was not available to us earlier
since there were only two drives available and two drives can only
be used in a striped or mirrored configuration. Select the volume
Manager as before, highlight all drives and check ZFS and RAID‐Z.

The new volume was named RAIDZVolume and now shows up
with a capacity of 23.4 GiB. RAID‐Z makes better use of
redundancy in that more capacity is available and it can tolerate a
failure of any single disk.

Note if RAID‐Z2 was used fault tolerance is improved at the
expense of capacity. As a general rule of thumb, single disk fault
tolerance should be adequate for up to 5 disks, after this consider
using multi‐drive fault tolerance. In addition large capacity disks
can take a long time to rebuild so a volume is no longer protected
with RAID‐Z or mirrored redundancy schemes.

The volume manager now shows RAIDZvolume available on the
path /mnt/RAIDZVolume.

14 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

NAS is a file level protocol, however FreeNAS also supports block
oriented protocols such as iSCSI. To start first of select <services> à
<iSCSI> à <Portals> à <Add Portal>. From the drop down select
0.0.0.0 and use the standard iSCSI port of 3260.

The next stage is to set up an initiator. The SCSI protocol uses the
concept of Initiator/Target where the initiator will typically initiate
a data transfer to or form a target. This could be a read or write
operation. Initially all initiators will be allowed. Select <iSCSI> à
<Initiators> à <Add Initiator>.

15 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

The next part is to add an Extent, do this be selecting <iSCSI> à
<Extents> à <Add Extent>.

To create an iSCSI target, select <Services> à <iSCSI> à <Targets> à
<Add Target>. Specify the size and name the target.

16 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

The next stage is to associate the extent that we created with the
newly created target. With the iSCSI target selected, choose
<Associated Targets>.

Select <Add Extent to Target> and then select the target and the
extent from the drop down box. Select <OK>

The final stage is to enable the iSCSI service – do this be selecting
<Services> and the toggle the iSCSI service to ON.

17 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

In this example the Microsoft iSCSI initiator will be used to connect
to the target, Enter the IP address of the FreeNAS server into the
Target field in the iSCSI initiator dialogue and then select <Quick
Connect>.

When the target appears in the <Discovered Targets> box, select ,
<Connect> to take it out of the <Inactive> state.

18 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

Since iSCSI is a block protocol, the disk will require formatting and
partitioning just like a regular disk.

After this operation the iSCSI target is now ready for use.

www.ixsystems.com (http://www.ixsystems.com)

www.freenas.org (http://www.freenas.org)

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

BLOG AT WORDPRESS.COM.

19 of 20 09-May-20, 1:43 AM
FreeNAS HOWTO | AJ's Data Storage Tutorials https://alanxelsys.com/freenas-howto/

20 of 20 09-May-20, 1:43 AM

You might also like