n n n n
FreeNAS Install
Check Hardware Compatibility List
Don'tnmake the assumption that your hardware will work under FreeNAS. Takenthe time and verify all necessary components of your system arensupported.
First, check the HCL on the FreeNAS site:
http://www.freenas.org/index.php?option=com_openwiki&Itemid=30&id=freenas_users_hardware Secondly,nsearch around the forums for your specific piece of hardware you'renchecking and see if anybody else is having problems.
Lastly, search around Google the same way but with FreeBSD or FreeNAS attached at the end of the search string.
Taking this time will save you from potentially head wrenching headaches later on.
Install Points
Anninstall point is where the embedded OS will reside that hosts thenconfiguration file. Upon boot everything is loaded into a RAMdisk andnonly changes to the configuration file are written. This is ideal for anCF card as it minimizes writes and prolongs the life of the card. Therenare several choices for an install point. The following arenrecommendations.
Recommended:
HDD install is not recommended for the following reasons:
- Partitioning of data drives is messy
- HDD replacement is messy
- An install HDD requires another bay, which are limited in a slim PC case
Advantages/Disadvantages Of Install Points
USB Stick Pros:
- Cheapest solution
- Easiest install
USB Stick Cons:
- Potential loss of configuration due to loss of USB stick
- NOTE: This can be alleviated with the use of a USB pin header to Type A adapter for $15
CF Card Pros:
- Integrated and permanent
- Larger storage capacity
CF Card Cons:
- DMA adapters/cards are expensive
- Non DMA adapters/cards require complex install process
- Potential for adapter+card being taller than case
- Cheaper Non DMA cards are still more expensive than a USB adapter
Deployment Methods
- Install via LiveCD with CD/DVD drive
- If you don't have an existing internal/external CD/DVD drive this adds $20 to project total
Write image file to install point
- If you don't have a CF reader already, this can add around $10 to project total
USB Stick Installation
This is the easiest installation method, and the cheapest. However, loss of USB stick is a loss of the configuration file.
Firstly, determine the deployment method:
- Boot off of a LiveCD is the easiest and quickest way
- Requires an external CD/DVD drive
- Or your case has a full sized for a CD/DVD drive
- Or your case has a bay for a slim CD/DVD drive
- NOTE: Adding a drive may increase the cost, but it makes the install much easier now, and in the future.
Write image file to the USB stick
- Working method requires Windows machine or virtual install
LiveCD Install
- Select the Source CD drive (e.g. acd0)
Write Image File
NIC Support Install
Ifnyou manage to end up with a board with an embedded chipset notnsupported under FreeNAS, but is still supported by FreeBSD then you'llnhave to manually copy over the necessary kernel module and add anPostInit command to have it loaded.
When checking compatibilitynyou should check across the two available versions of FreeNAS; one isnbased on FreeBSD 6 and the other FreeBSD 7. In the instance of thenchipset on my Intel Atom (RTL8102EL) the driver worked under version 6nof FreeBSD, but not 7.
A compile version of the RealTek kernel module is available through this forum post:
http://sourceforge.net/apps/phpbb/freenas/viewtopic.php?f=9&t=192&hilit=realtek+kernel+module
Ifnin the situation there is no support for your embedded chipset innFreeBSD, you'll have to find/buy a supported NIC. If you purchased anmicro case then you'll have to make sure the NIC includes a low-heightnfaceplate. Options to transfer Kernel Module to Install Point.
- Upload via a service on the FreeNAS box (FTP, SMB, etc.)
- Transfer directly to the install point through a FreeBSD LiveCD
Upload via FreeNAS
NOTE: This requires a spare NIC on hand that is supported in FreeNAS.
Configure Network
- Plugnin the spare NIC. You may have to take off the faceplate of the card ifnyour case doesn't support a full-height faceplate. But don't worry,nit's only temporary!
- Start up FreeNAS
- Type 1 to select option "1", "Assign Interfaces"
- The NIC we just plugged in should be listed and highlighted, press Enter
- Select "none finish and exit configuration" as we don't need an optional name
- A summary screen will show the interface being assigned to the LAN, select Yes and press Enter
- Back at the menu type 2 to select option "2", "Set LAN IP address"
- If you have DHCP enabled on your network (most likely), select "Yes"
- Ifnnot, then you'll be guided through a few screens asking for basic IPninformation. If you're not running DHCP then I'll assume you know whatnthis is all about.
- The only "gotcha" is that the subnet mask isnasked for in bits. For a typical home network this is 255.255.255.0nwhich is 24 bits
Select "No" to skip configuration of IPv6
The network now has a basic configuration and the Web UI can now be accessed.
Configure Share Configure FreeNAS to Load Module at Run time The kernel module must be loaded at run time and this is done via the kldload nprogram on FreeBSD. FreeNAS can be configured (via WebUI) to runncommands prior to initializing; this is the "Post Init" process.
PostInit Command: kldload /cf/boot/kernel/if_rl.ko
FreeNAS System Configuration
- Access the WebUI using the IP address reported when the LAN interface was configured.
- The default username and password is: admin/freenas
- Thenleft hand side is the navigation for all the configuration options innFreeNAS. The right hand side is for viewing and updating the settingsnfor an option.
- Change the default username and password.
- Click the System->General link in the Navigation side of the WebUI
- Type in a new admin user name
- Type in a new password and verify
- Click the " Apply Changes " button
Set up a RAID array
- NOTE: BEFORE AN ARRAY CAN BE SETUP DISKS MUST FIRST BE ADDED TO MANAGE
- NOTE: TO KNOW WHICH DISK TO SELECT USE TABLE 1 ON FREEBSD DEVICE NAMING
- Add Disks
- Click the Disks->Management link in the Navigation side of the WebUI
- Click the " plus " graphic image to add a disk
- In the " Disk " drop-down box, select the first HDD (See above NOTE)
- Leave other options at their defaults
- Click the " Add " button
- Repeat steps 4 and 5 for the number of HDDs in the system, probably 2 or more.
- After all devices have been added, click the " Apply Changes " button at the top of the " Disks: Management " screen.
Format the disks
- Click the Disks->Format link in the Navigation side of the WebUI
- In the " Disk " drop-down box select the first HDD to format
- In the " File System " drop-down box select " Software RAID "
- Click the " Format disk " button
- Repeat this step for all disks to be added to the RAID array
Create the Software RAID Array
- Click the Disks->Software RAID link in the Navigation side of the WebUI
- Click a tab along the top to select a RAID configuration setup. In our instance, we're doing a RAID 1 (Mirror) so we click on Geom Mirror
- Click the " plus " graphic image to add an array
- In the " Raid name " textbox give the array a meaningful name
- Check the boxes next to each drive listed. It will only list the disks formatted as " Software RAID "
- Click the " Add " button
- The array has been added, click the " Apply Changes " button
- The array will now start to be initialized
- NOTE: DEPENDING ON THE SIZE AND TYPE OF RAID ARRAY, THIS CAN TAKE A WHILE. H-O-U-R-S
- NOTE: EVEN DURING A BUILD FREENAS DOCUMENTATION STATES THAT THE ARRAY CAN STILL BE USED. WTF?!
Format the RAID Array
- Make sure the status of the array is " Up " or " Rebulding "
- You can check this under the " Disks->Software RAID" link, the array will be listed with the status to the right.
- The page does not auto-refresh, so you'll have to manually refresh the page to get the latest status of the array
Click the Disks->Format link in the Navigation side of the WebUIThe RAID array should now be listed in the "Disks" drop-down menu, select it.Leave the "File System" option at the default of "UFS"Click the "Format Disk" buttonCreate a Mount Point: this mounts the volume within FreeBSD which will enable it to be visible to the system
- Click the Disks->Mount Point link in the Navigation side of the WebUI
- Click the " plus " graphic image to add a mount point
- In the " Disk " drop-down box select the RAID array
- In the " Partition " drop-down box select " EFI - GPT "
- In the " File System " select " UFS "
- In the "Share Name" text box give the mount point a meaningful name
- In the " Description " text box you can elaborate on the share name and purpose further’
- Click the " Add " button
- Click the " Apply Changes " button
Configure a Service: this will enable a mounted drive/array to be visible across the network
- Since SMB is lowest common denominator for a mixed environment, it's the safest one to setup
- Click the Services->CIFS/SMB link in the Navigation side of the WebUI
- If you have an existing NetBIOS network in place:
- Give a more meaningful NetBIOS name for your FreeNAS box if you wish to in the " NetBiosName " text box
- Change the " Workgroup " text box to match the name of your network
- Click the " Save and Restart CIFS " button
Click the "Shares" tab to go to the share management pageClick the "plus" graphic image to add a share
Table 1. Disk Naming Convention in FreeBSD
-
/dev/ad0 : Is the First ATA hard drive on the ATA channel 1
n -
/dev/ad1 : Is the Second ATA hard drive on the ATA channel 1
n -
/dev/ad2 : Is the First ATA hard drive on the ATA channel 2
n -
/dev/acd0: Is the first ATA CD/DVD drive detected
n -
/dev/da0: Is the first SCSInhard drive. USB key device under FreeBSD are using an SCSI driver, thennthis name can link to your USB key/drive too.
n -
/dev/da0p1: The ‘ p ’ represents an EFI/GPT partition type, and ‘ 1 ’ represents the first partition on the device. This is the new standard starting from version 0.684
n -
/dev/da0s1: The ‘ s ’ represents the old standard partition type. For any filesystem other that UFS you should look for an ‘s’ type partition.
n -
/dev/raid5/RAIDname: ‘RAID’ is only the array device.
n -
/dev/raid5/RAIDp1: This is the filesystem on the RAID device.
n
Episode Comments
Success! Your comment will be posted when the producer approves it.