This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature: Storage

Configuring storage in FreeNAS

By Gary Sims on October 24, 2008 (7:00:00 PM)

Share    Print    Comments   

The essence of the FreeNAS server is to provide storage that is easily accessible from the network. To this end, it is important to understand how FreeNAS handles hard disks and how they can be configured and used to provide the best and most reliable storage for your network.

This article is excerpted from the newly published book Learning FreeNAS from Packt Publishing.

Adding storage to the FreeNAS server is done in four steps:

  1. The FreeNAS server is "told" about a physical hard disk.
  2. This disk is formatted.
  3. The resulting storage space is mounted and made available internally.
  4. The mounted storage space is made available on the network via services like CIFS and NFS.

Step one, telling the FreeNAS server about the disks at its disposal, is handled in Disks: Management. On opening this page, you will see a list of disks that are already configured. To add a disk, click the add circle and you will be taken to the Disks: Management: Disk: Add page. Use the Disk field to select which disk you want to add to the FreeNAS configuration.

If you are using a hardware RAID controller, for the disks attached it, don't use the standard device names for each disk. Instead, these RAID controllers present a virtual disk for each RAID set, using a device named after the RAID controller driver. For example, the amr driver (which supports controllers by MegaRAID and some Dell and Intel cards) presents its virtual disks as /dev/amrd*. Also, some RAID cards present their hard drives as /dev/da*devices.

Once you have selected the right disk from the drop down box, you can normally just go ahead and click Add. However, there are some parameters that you can tweak, and the field Preformatted FS needs to be set correctly if the disk is already formatted and has data on it. Apart from the native UFS format of the FreeBSD, FreeNAS supports FAT32, NTFS, and ext2.

Once you have selected the disk from the drop-down menu and set any of the optional parameters, you can click the Add button, then apply the changes. The Disks: Management page should now show your disk(s) in a table, including information about the disk name, size, and filesystem.

Formatting a newly added disk

Once a disk has been added to the FreeNAS server, it needs to be formatted. Go to the Disks: Format page and select which disk you wish to format. Choose the filesystem you want to use. The default will be UFS; unless you specifically need FAT32 or ext2, it is best to format the disk with UFS. UFS is the NATIVE file format for FreeBSD, the underlying OS of FreeNAS. Attempting to use other file formats can result in unpredictable results, file corruption, and loss of data.

You can also enter an optional volume label for the disk, but it isn't very useful, as it isn't used in the FreeNAS Web interface. Leave the minimum free space percentage at its default 8%, as lowering the threshold can adversely affect performance and auto-defragmentation. A final option allows you to tweak the way the disk is formatted, specifically to not replace the master boot record (MBR) with a new one during the format process. Normally, this shouldn't be needed, but some hardware RAID cards store information in the MBR. If you find that the drive doesn't format correctly and you are using a hardware RAID card, you can try formatting the disk with the option enabled.

Once you click Format Disk, you will asked if you are sure that you wish to format the disk. Click OK to proceed, then look for the Done! comment and the long list of superblock numbers before it. If you see that, everything is OK. If the formatting failed for some reason you will see an error message. For example, if spaces aren't permitted in the volume label, trying to format a disk like this will result in the last lines of the output reading:

newfs: bad volume label. Valid characters are alphanumerics. Done!

Once you have formatted the disk, you need to mount it internally in the FreeNAS server. Go to Disks: Mount Point and click the add circle. There are several important fields to fill in here: Type, Disk, Partition, File System, and Name.

  • Type: Here, you can select if you want to mount a disk or an ISO file. For new physical disks, you need to select disk. The ISO option is useful if you have an .isofile and you wish to make its contents available on your network.
  • Disk: Select the disk which you wish to mount. This will be the same disk as you used in Disks: Management and Disks: Format.
  • Partition: Under FreeNAS, if you install the server software on a hard disk, then two partitions are created, the first for the operating system software and the second for data. When mounting disks, you need to know which partitions you wish to mount.

    By default, FreeNAS doesn't use the legacy method to partition disks, which involved storing the partition data in the MBR; instead it used the GUID Partition Table (GPT), which is part of the Extensible Firmware Interface (EFI) standard proposed by Intel as a replacement for the soon-to-be-obsolescent PC BIOS.
    If you have just formatted this disk using FreeNAS, select EFI GPT here. If your disk has previous data on it, select which partition the data is on. If you have installed FreeNAS on a disk and you want to use the rest of the disk for data, select 2.

  • File System: For disks that have been formatted using FreeNAS, select UFS. If you have chosen to use another filesystem format or the disk already had data on it, select the appropriate file system type (FAT, NTFS, or ext2).
  • Name: Each mounted disk needs a name to distinguish it from other disks. It does seem possible to use spaces in the name but for safety I recommend using a simple single-word mount point name. The name specified will be used to mount the disk under the /mnt directory on the FreeNAS server, so if, for example, we used store2, then the disk will be mounted on /mnt/store2 and that would be the name used to share the disk on the network using CIFS.
  • Description: You can fill in an optional description for this mount point.
  • Read only: Tick this to mount the file system as read-only, and even the Administrator account (superuser/root) may not write it.

Once you have filled in all the data, click the Add button. You will be shown a table with a list of the mounted drives on the FreeNAS server. Their status will be listed as Configuring. Click Apply changes. Once the changes have been applied, the newly displayed table should include the new mount point with the status of OK.

Gary Sims has a degree in Business Information Systems from a British university. He worked for 10 years as a software engineer and is now a freelance Linux consultant and writer.

Share    Print    Comments   

Comments

on Configuring storage in FreeNAS

Note: Comments are owned by the poster. We are not responsible for their content.

Configuring storage in FreeNAS

Posted by: Anonymous [ip: 189.13.13.82] on October 24, 2008 07:41 PM
My computer is in short
t-shirt is mean is no class goods?

#

Re: Configuring storage in FreeNAS

Posted by: Anonymous [ip: 75.62.222.57] on October 25, 2008 02:46 AM
your a retard

#

Re(1): Configuring storage in FreeNAS

Posted by: Anonymous [ip: 189.13.26.208] on October 31, 2008 01:53 PM
Retard is your mother

#

Configuring storage in FreeNAS

Posted by: Anonymous [ip: 76.114.142.224] on October 25, 2008 09:02 PM
NASlite is superior. Software RAID is looking for trouble.... Go ahead and risk your data.

#

Re: Configuring storage in FreeNAS

Posted by: capitalistpiglet on October 26, 2008 01:02 AM
I agree software raid is risky, but having the ability to software raid does not stop somebody using hardware raid, its just a feature. Also briefly looking at naslite I see several features in freenas that naslite doesn't have such as being able to attach to a domain, iscsi, bonding several network cards together which is pretty useful when your talking about a nas device and the biggest feature of all which is that its free. This article was pretty good although I think it could have gone into more depth about the features of freenas and compared it to some other nas/san solutions. I use freenas at work. Actually it was the author of this article earlier article about openfiler that got me to look at freenas after I couldn't get openfiler to attach to my 2k3 domain.

#

Configuring storage in FreeNAS

Posted by: Anonymous [ip: 68.40.180.83] on November 01, 2008 03:01 PM
Is there a way to have BSD only format specific partition sizes or slices.
Say it has 1TB disk and want to partition it with 10x80GB partitions and a 20GB one. Is this possible with FreeNAS and BSD?

Thanks

#

Re: Configuring storage in FreeNAS

Posted by: Anonymous [ip: 84.53.75.17] on November 14, 2008 04:36 AM
Nope not possible to partition a disk in freenas. (Except 1st disk OS + DATA)

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya