Contents |
FreeNAS is an open source popular software appliance package that can turn a computer into a NAS appliance, or in easier terms: a file server. This guide shows the basic steps to prepare a server for use in a diskless LTSP environment.
This document is correct as of FreeNAS v0.67.1.
Full documentation on installing FreeNAS is available as a Setup and User Guide in PDF format at FreeNAS documents.
At a minimum a basic PC with 96MB system memory, one hard disk and a network card is required. For a production site it is recommended to have a backup process in place or at the minimum use disk mirroring, also known as RAID level 1. For this configuration FreeNAS requires 3 disks, although one of them can be a compact flash card with suitable IDE adapter, minimum size 32MB which is very cheap to purchase. Most systems have four IDE adapters, allowing two regular hard disks and one compact flash drive to be attached.
For installation purposes you will need a bootable CD-ROM drive or another computer in which to insert the compact flash or hard disk drive. Only very old CD-ROM drives do not support booting, speed is not important.
One disk:
You will need a regular PC with one hard disk drive.
Two mirrored disks + system on compact flash:
You will need a regular PC with two hard disk drives, a compact flash IDE adapter, and a compact flash card.
There are a few choices for the actual installation of the FreeNAS appliance software. The most convenient is to burn a CD with an ISO image, here are the options available:
This method requires a blank CD-R disk and a CD-ROM or DVD-ROM device in the target machine.
This method requires a media card reader in your desktop PC, either an external USB device similar to the picture or one in the computer case.
The IDE compact flash adapters do not support hot swap, therefore a slightly different set of steps is required.
This might work as an alternative to opening your desktop case.
Once installed FreeNAS needs to be configured for your network, the disk devices installed, and finally for the services to offer.
FreeNAS manages interfaces with logical names such as LAN, OPT1, OPT2, etc. via the console menu you need to configure which physical network adapter matches which logical name.
FreeNAS console setup ********************* 1) Interfaces: assign network ports 2) Set up LAN IP address 3) Reset webGUI password 4) Reset to factory defaults 5) Reboot system 6) Ping host 7) Install on HD/CF/USB Key 8) Shell 9) PowerOff system Enter a number: 1
Type in '1 to configure the physical adapter to use for the LAN interface. FreeNAS will display a list of the interfaces that are supported. Some newer gigabit network interface cards are not supported and will not be shown.
Valid interfaces are: lnc0 00:0c:29:86:03:e5 If you don't know the names of your interfaces, you may choose to use auto-detection. In that case, disconnect all interfaces before you begin, and reconnect each one when prompted to do so. Enter the LAN interface name or 'a' for auto-detection: lnc0
The interface name is the two or three letter code followed by a number in the interface list, the code is based on the FreeBSD driver name.
Enter the Optional 1 interface name or 'a' for auto-detection (or nothing if finished):
Extra interfaces can now be configured or it can be performed using the web interface. Hit the Enter key to continue.
The interfaces will be assigned as follows: LAN -> lnc0 FreeNAS will reboot after saving the changes. Do you want to proceed? (y/n)
Confirm the new configuration and reboot in order to assign an IP address to the LAN interface.
FreeNAS console setup ********************* 1) Interfaces: assign network ports 2) Set up LAN IP address 3) Reset webGUI password 4) Reset to factory defaults 5) Reboot system 6) Ping host 7) Install on HD/CF/USB Key 8) Shell 9) PowerOff system Enter a number: 2
The default FreeNAS LAN IP address is 192.168.1.250 if you have a different LAN subnet or wish to assign a different address menu option 2 is for you.
Enter the new LAN IP address: 10.82.6.3
There are a set of private network addresses you can use that will not be routed to the Internet, it is recommended you use one of these for your internal network. The number used here is used in the VMware demo of the みる directory server.
Subnet masks are entered as bit counts (as in CIDR notation) in FreeNAS.
e.g. 255.255.255.0 = 24
255.255.0.0 = 16
255.0.0.0 = 8
Enter the new LAN subnet bit count: 24
Unless you have unusual requirements it is common to use class C networks with a 24 network address bit count.
The LAN IP address has been set to 10.82.6.3/24. You can now access the webGUI by opening the following URL in your browser: http://10.82.6.3/ Press ENTER to continue.
The default login details for the webGUI are username: admin, password: freenas.
Visit the LAN interface page and enter a default gateway. The gateway provides access to the internet to allow DNS and time synchronisation.
Visit the general setup page and enter the IP addresses of your DNS server and local NTP server. Normally if you have a DSL or cable modem internet connection your gateway provides DNS service, check your desktop configuration for further details. A DNS configuration will allow name resolution of a time server such as the default pool.ntp.org.
FreeNAS is a file server, so we need to add some disks and sharing points. First visit the disk management page and add a new disk. This page concerns physical disks, the speed of the interface to the computer and various power management settings.
Once added the main management page should update with the disk details.
Now head over to the mount point page to define which disk partitions that need to be shared, add a new mount point and fill in the details. If you installed via the CD-ROM installer method you might have one or two disk partitions, on this screen the warning message indicates that the device ad0s1 contains the system image and so the second partition ad0s2 is available for data.
Saving brings you back to the mount point page which now shows the partition summary and status.
RAID FreeNAS requires a few steps in addition to the regular install. Each disk needs to be added to the FreeNAS system and then both need to be added to a RAID device and then that device formatted and added as a mount point for sharing. First visit the disk management page and add two new disks. The disk page concerns physical disks, the speed of the interface to the computer and various power management settings.
Once added the main management page should update with the disk details.
For each disk visit the format tab and select "Software RAID: Geom mirror" and format.
Once both disks have been formatted head over to the software RAID page, and the default screen should show "Geom mirror" and underneath "Manage RAID", select the add icon to create a RAID device using both disks.
Returning to the software RAID page should now show the new RAID device.
With the new RAID device we need to format for file usage, select the "Format RAID" tab and enter the volume name you previously entered for the RAID device.
Now head over to the mount point page to define which disk partitions that need to be shared, add a new mount point and fill in the details. The device will be the name you previously entered and the partition should be listed as "Software RAID - gmirror".
Saving brings you back to the mount point page which now shows the partition summary and status.
For diskless NFS operation you need to enable the NFS service, to allow Microsoft Windows desktops to access shared files you will also need to enable CIFS, Apple Mac OS X users can connect via either of the protocols or AFP.
In order to support NFS root you need to make one custom modification until it is supported in the mainstream release. Download a backup of the FreeNAS configuration file and edit in your favourite text editor, e.g. notepad or gedit. Add the following section inside the <system> stanza, replacing the network parameters as appropriate. Note that the ampersand and quotation marks are escaped in order to validate as correct XML.
<shellcmd>echo "/mnt/common -alldirs -network 10.82.6.0 -mask 255.255.255.0 -maproot=root" > /var/etc/exports && killall -hup mountd</shellcmd>
Restore the new configuration file and FreeNAS will reboot and use the new configuration which is now ready for a diskless LTSP deployment.
© 2008 Novell, Inc. All Rights Reserved.