FreeNAS [Archive] - Glock Talk

PDA

View Full Version : FreeNAS


JimmyN
07-20-2010, 12:31
I thought we should start a FreeNAS thread, since there will likely be more posts about it, and we definitely highjacked 'ICARRY2's' thread.

Sorry about that ICARRY2, it wasn't intentional, just drifted off topic.


I've been using FreeNAS since the .6.x versions which were based on FreeBSD 6. The FreeNAS versions .7.x are based on FreeBSD 7. The new version .8 series is the beginning of a Linux based system, it is supposedly very similar but some things like the FreeBSD7 128 bit ZFS file system will not be available in the .8 series.

I tried OpenFiler and some others but liked FreeNAS better, and since I have two webservers running FreeBSD plus a FreeBSD box here on my LAN it was a natural for me.

I had petitioned the boss for a ReadyNAS box, but it was denied as it would be at least $450 depending on the drives, and as was pointed out I already bought two wide screen monitors for my desk that fiscal period. Bean counters have no imagination or tolerance for goodies. So I said to myself OK, I'll just build one from all this old crap I have sitting around. You know, the stuff that's too good to throw out, but not really good enough to use for anything. Even though they wouldn't spring for a ReadyNAS box they didn't mind asking for a FreeNAS if I had enough stuff to build them one as well. I managed to scrounge up enough stuff to build two more for them, and that opened the door so I could buy some more drives, since they needed some too. I can be devious at times.......

Being such a minimal system FreeNAS doesn't have any 'man' pages for reference, but you can use the online FreeBSD handbook. It doesn't have some of the features of the full system, like jails, but what it does have uses standard FreeBSD convention.
http://www.freebsd.org/doc/en/books/handbook/

IndyGunFreak
07-20-2010, 13:13
I thought we should start a FreeNAS thread, since there will likely be more posts about it, and we definitely highjacked 'ICARRY2's' thread.

Sorry about that ICARRY2, it wasn't intentional, just drifted off topic.


I've been using FreeNAS since the .6.x versions which were based on FreeBSD 6. The FreeNAS versions .7.x are based on FreeBSD 7. The new version .8 series is the beginning of a Linux based system, it is supposedly very similar but some things like the FreeBSD7 128 bit ZFS file system will not be available in the .8 series.

I tried OpenFiler and some others but liked FreeNAS better, and since I have two webservers running FreeBSD plus a FreeBSD box here on my LAN it was a natural for me.

I had petitioned the boss for a ReadyNAS box, but it was denied as it would be at least $450 depending on the drives, and as was pointed out I already bought two wide screen monitors for my desk that fiscal period. Bean counters have no imagination or tolerance for goodies. So I said to myself OK, I'll just build one from all this old crap I have sitting around. You know, the stuff that's too good to throw out, but not really good enough to use for anything. Even though they wouldn't spring for a ReadyNAS box they didn't mind asking for a FreeNAS if I had enough stuff to build them one as well. I managed to scrounge up enough stuff to build two more for them, and that opened the door so I could buy some more drives, since they needed some too. I can be devious at times.......

Being such a minimal system FreeNAS doesn't have any 'man' pages for reference, but you can use the online FreeBSD handbook. It doesn't have some of the features of the full system, like jails, but what it does have uses standard FreeBSD convention.
http://www.freebsd.org/doc/en/books/handbook/

I just wrote up a very long tutorial on setting up FreeNas w/ Vbox.. since it's really not covered very well in the Setup Guide(there's some subtle differences, that will leave you ripping your hair out). I really did it just for my personal notes.. but if anyone wants it posted here, feel free.. I just need to do some final editing on it.

JimmyN
07-20-2010, 13:39
That's excellent Indy. You may want to post it on the sourceforge FreeNAS forum as well, I'm sure there will be some visitors there that will appreciate it. Information can be a little sparse when you do something a little different, since it's a typical open source project and all volunteers.

https://sourceforge.net/apps/phpbb/freenas/

AmericanGunWorks
07-21-2010, 08:32
I may have to retry freenas. I could never get it to work reliably in the past. The speeds I was getting was pretty crappy. At the time I was using a hardware raid card and it didnt seem like it recognized it correctly.

Its been a long time though. Nowadays I get by just fine with an external hooked up to my imac for backups and then dropbox for offsite crucial backup and document sharing.

IndyGunFreak
07-21-2010, 09:22
This FreeNas is the cat's meow... an Enclosure is good if you don't need to move stuff between 2 PC's, or if you don't want "always on" access.

with FreeNas, hide a box in a closet or somewhere out of site, and you always have access to it.

Like I said, I still have it running in Vbox right now, but it's pretty dang awesome.

IGF

JimmyN
07-21-2010, 14:52
I'm running FreeNAS version .7.1 and it's about the same speed as a shared folder PC to PC transfer.

Here are some Lan Speed Tests I just ran on mine, which is not really a true test of LAN speed since it writes a file then reads it back, therefore it's actually showing drive access rather than the true speed of the network. But for practical purposes that's what is important if we are testing FreeNAS to see how it compares, since it's a file server and writing/reading is what it does.

I can compare a test copying a file from a PC to FreeNAS, to a identical test copying the file from PC to PC and see how FreeNAS compares. If it's noticeably slower then a PC to PC transfer that would be apparent in the results.

LAN test from the first XP system to FreeNAS, using a 5meg file size:
Write: .187 seconds 213.9Mbps
Read: .172 seconds 232.5Mbps

LAN test from one XP system to another XP, using the 5 meg file:
Write: .188 seconds 212.7Mbps
Read: .157 seconds 254.7Mbps

So the write time to FreeNAS was actually a little better than PC to PC in this instance, though the read time was slower. Each test run will give slightly different results. And we also have Samba involved on the FreeNAS to provide the Windows share, so FreeNAS actually has a little more overhead.

LAN test from the second XP system to FreeNAS, using the same 5 meg file:
Write: .187 seconds 213.9Mbps
Read: .187 seconds 213.9Mbps

Read and write times are identical in this case. Those are pretty typical rates, however they will fluctuate up and down depending on which drives I'm writing to and from on FreeNAS and the PC. My FreeNAS is using all IDE drives plugged into the Primary and Secondary controllers right now, so I have a slave and master on each controller.

I also did a screen cap of the FreeNAS LAN graph for a 1gig file transfer from the first XP system to FreeNAS. You can see an initial burst to almost 400Mbps, then it levels off at around 200Mbps. I have seen initial bursts over 500Mbps, but usually none at all. It's probably related to the drive having info in the buffer when it starts.

So it seems that FreeNAS is just as quick as any drive to drive transfer on my LAN here. With a 100Mbps network my LAN was the bottleneck, when I went to a 1000Mbps network then my drives became the issue.

Being able to copy a 5 meg file to the NAS in less than .2 of a second, or a 1gig file in about 40 seconds is probably nothing to be ashamed of.... it will certainly do for now.

201117

JimmyN
07-21-2010, 15:04
There is a status page for FreeNAS that is not available through the webgui. I found it in with the gui php scripts, don't know why it wasn't made available through the webgui.

It's very complete and lists everything you'd need or want to know.

http://192.168.0.XX/status.php

Just edit it for your FreeNAS IP

IndyGunFreak
07-21-2010, 15:14
I'm more and more amazed by this the further I look into it... I nuked the 7.1 I setup Monday, and installed 7.2 just a bit ago. 7.2 is still technically beta, but I haven't found any serious errors with it.

Once you know how to set it up, it sets up in no time flat.

JimmyN
07-23-2010, 11:41
I ordered two more drives for my FreeNAS box this morning.

In case anyone is interested Newegg has Seagate Barracuda 1.5TB SATA II drives for 89.99, plus a $10 off promo code good till 7/29, and free shipping as another bonus. So I got two of them for only 159.98 delivered to my door. That's a pretty good total price for 3TB of storage.

Since my FreeNAS is using an old P4 1.8gHz motherboard it of course doesn't have SATA, or PCI-X. And I have already loaded the primary and secondary IDE controllers with extra drives I had on hand. But since they were 'leftovers' from other upgrades I still had less than a TB of total storage.

I needed a SATA adapter in PCI rather than PCI-X so I could expand. Fortunately Newegg had a Rosewill SATA II 4 port card, which uses the SiliconImage chip, on sale for 44.99 plus shipping. The SiliconImage chips are supported in FreeBSD so it should install with no issues. Just plug it in and boot up.

All together I got the SATA adapter and 3TB of storage for a total of $210.96 which fit within the $250 budget I had been allocated, and I can still add two more SATA drives later if I need to, so I'm a happy camper now.

IndyGunFreak
07-23-2010, 12:40
I ordered two more drives for my FreeNAS box this morning.

In case anyone is interested Newegg has Seagate Barracuda 1.5TB SATA II drives for 89.99, plus a $10 off promo code good till 7/29, and free shipping as another bonus. So I got two of them for only 159.98 delivered to my door. That's a pretty good total price for 3TB of storage.

Since my FreeNAS is using an old P4 1.8gHz motherboard it of course doesn't have SATA, or PCI-X. And I have already loaded the primary and secondary IDE controllers with extra drives I had on hand. But since they were 'leftovers' from other upgrades I still had less than a TB of total storage.

I needed a SATA adapter in PCI rather than PCI-X so I could expand. Fortunately Newegg had a Rosewill SATA II 4 port card, which uses the SiliconImage chip, on sale for 44.99 plus shipping. The SiliconImage chips are supported in FreeBSD so it should install with no issues. Just plug it in and boot up.

All together I got the SATA adapter and 3TB of storage for a total of $210.96 which fit within the $250 budget I had been allocated, and I can still add two more SATA drives later if I need to, so I'm a happy camper now.

I'm putting the stuff together for mine... The old PC I have, would be perfect, except the case is a huge, full tower. and this is something i'm considering putting on a shelf so that it's out of sight, out of mind.

So I'm thinking I'll get a MicroATX case/motherboard to go w/ my current processor (a Sempron). I have a NIB 450w Antec Power supply that I picked up cheap last year. Pull my 500gig SATA out of the enclosure, and 2 of those drives.

The case/motherboard isn't really required, so I could save it if I wanted to, but I like the idea of small/simple for this project.

IGF

JimmyN
07-23-2010, 14:31
I agree, small and out of the way is good since you seldom need to do anything to it. Sort of like a router, it just sits there and works and you forget about it. I haven't shut mine down or rebooted it since the day I set it up with 7.1. That was back around April. The ones the Pres and VP have are still running 6.9 they probably have an uptime of over 300 days now, I'll have to check uptime on the status report tomorrow morning and see.

But it's FreeBSD so that's normal and why it's popular for webservers. I have one FreeBSD 6 system with an uptime of over 1200 days now.

FreeNAS will email you a status report, it's already set up during the install. Just go to Status>Email Report in the menu and click enable, put in your email address and what you want in the report. All three FreeNAS boxes send me an email at 7am every morning (while I'm drinking my coffee) so I can look over it and check load levels, disk usage, SMART drive results, system log, etc so I can see if there are any problems.

My desk is an 8' long white Formica flat countertop that sits across two 2-drawer file cabinets. So I screwed shelf brackets to the side of the file cabinet and it sits on those. It's about 8" off the floor and all the way back, so it's tucked out of the way. Being off the floor it doesn't collect crud around or behind it, nor does it seem to vacuum in as much dust. I'm thinking about painting it with some semi-gloss black when I open it to put the new drives in, so that it will match the black filing cabinets.

IndyGunFreak
07-23-2010, 17:25
If you didn't want to leave it on all the time, and your motherboard allows WOL, that would be an easy way to turn it on when you need it. Since the system is easily shutdown from the GUI.. that's not an issue.

IGF

JimmyN
07-24-2010, 08:29
It draws so little power I don't worry about shutting it down, plus it's always on line if anyone needs to access it.

I have all the drives set to power down after 20 minutes. It causes a few seconds delay when you first access something, since that drive has to spin up, but I accept that little delay for the sake of wear on the drives and lower power consumption overall. It functions similar to a laptop power scheme.

I have checked wattage after 25 minutes when everything is idle. Amperage varies between .54 and .58 which is likely the processor fluctuating in it's power needs as it runs various background processess. More modern processors will probably do better as they have better power management and even decrease clock speed when demand is low. That's a P4 Northwood CPU and it will draw half it's rated power even when it's not doing anything.

Using an average of .56 amps and actual line voltage measured at 120.6 that is 67 watts at idle. And I have two 120mm cases fans running at full speed since they are only two wire fans and run wide open. They are .8 amps each, at 12V, so that's 19 watts of the load plus the CPU fan. If I used speed control fans for the case I could probably get the idle wattage down to 55 or less and I'll probably end up doing that eventually.

Accessing one drive increased wattage to 79, access another and having two spinning increased it to 90 watts, a third brought it to 102, and having all four spinning it was drawing an average of around 114. It varies because of the processor, but my DataQ measuring equipment gave those as averages on the graph. Having the drives shut down cuts power consumption almost in half with four drives, and more than four would make an even bigger difference.

Since you are usually only working in one filesystem or share at a time, only that one drive will actually be spinning and the rest are still shut down. Even with four or more drives, in most cases only one will be active, so it's very power efficient. It doesn't produce nearly as much heat, and the whole box runs pretty cool since the drives are usually around room temp. You heat one up when you use it, but after you're done it shuts back off.

Right now Process status shows there are only 18 processes, 1 is running the other 17 are sleeping. CPU load shows load averages of 0.01 0.01 0.00 It's not a very busy system unless you give it something to do. It's currently using 8% of 371megs of ram, so that's only 30 megs. The highest usage I've ever noticed was 30%. I created a 275 meg swap partition on the drive when I installed it, just in case, but I've never seen it use it. A 'df' query always shows 0% in use.

JimmyN
07-28-2010, 09:56
My two drives and SATA card arrived from Newegg yesterday afternoon, right on schedule.

I shut down the NAS and plugged in the SATA PCI card and the two drives, then booted it back up and everything was recognized, so I was done with hardware. No driver installation required.

I shut it back down, put the cover back on the case, and shoved the FreeNAS box back into it's nook and booted it again. I added the two drives to the system using the webgui disk management, and then formatted them. Formatting only took about 30 seconds each. I set a mount point for each one, and then went into CIFS/Samba and added some shares.

The whole process took less than 30 minutes from the time I opened the Newegg package, and I had another 3TB of storage. However, copying all those gigs of files to the new drive is taking considerably longer, I still have more to do. I haven't put anything on the second drive yet so I have plenty of space for now.

A note on partitions and mount points in FreeNAS. If you do a full install of FreeNAS the installation program will create separate partitions for system, swap, and data on the boot drive. But once the system is up and running the webgui will only create one partition on a drive when you add it, thus the only option when creating a mount point is to use the whole drive. But if you create multiple partitions on the drive manually, using a command line, then each partition (it's called a 'slice' in UNIX) will show up in the webgui dropdown list when creating a mount point. The webgui can't create slices, but it recognizes and will use individual slices on a drive.

In Windows I usually partition really large drives, mainly due to defraging times with one huge partition. We all know how long that can take. But the UFS file system doesn't have fragmentation problems, and defrags itself automatically as needed, so a huge partition isn't a problem since you'll never have to defrag it.

So rather than use multiple slices and mount each I mount the whole drive and use the shares in Samba (Windows) or NFS (*NIX) to divvy it up. You'll have to go to the drive and create the directories (folders) manually, and then they will show up when creating a new share. If it's an ftp folder for outside access you can also chroot the folder in the ftp setup, so they can't go any higher in the file tree.

I'm off to copying files again, the iTunes and CD music files are next....

IndyGunFreak
07-28-2010, 18:03
Awesome...

IGF

Specks
09-02-2010, 07:29
Sorry to bring up an older thread, but it was linked to from an active thread in GNG.

I see on the FreeNAS wiki that it supports software Raid 0, 1 and 5. Are any of you using this or do you have hardware raid on the motherboard?

Just curious what you guys are using to backup the massive amount of data that a NAS can have.

IndyGunFreak
09-02-2010, 09:10
Sorry to bring up an older thread, but it was linked to from an active thread in GNG.

I see on the FreeNAS wiki that it supports software Raid 0, 1 and 5. Are any of you using this or do you have hardware raid on the motherboard?

Just curious what you guys are using to backup the massive amount of data that a NAS can have.

Right now, mine is setup as separate drives. I'm seriously considering trying Raid 1, so it will copy the drives w/o my input.. but right now, the way I have it is working great.

JimmyN
09-02-2010, 09:53
I have three FreeNAS boxes running at three different locations, but I'm not using RAID on any of them, so I haven't been down that road yet. Either hardware or software would work, but some folks have complained in the FreeNAS forums about software RAID 5 being kind of slow on FreeNAS. Software RAID 0 and 1 seem to work just fine. If I wanted to use RAID 5 I'd probably go the hardware route.

Backing up large amounts of data is problematic. I just use another 1.5TB drive as a dedicated 'backup' drive, that's about the best solution unless you want to go to the expense of tape drives. Each night FreeNAS uses a local rsync and backs up changed data to the 'backup' drive.

The backup drive(s) can be internal, or you could use an external USB connected drive.

There is only one file you need to back up for FreeNAS itself. That is config.xml located at /conf/config.xml. It contains all the setup and configuration for FreeNAS, including drives, mount points, shares, accounts, etc. So you can re-install FreeNAS in about 10~15 minutes, then copy the config.xml file to it and reboot and you're back where you were. Put config.xml on a thumb drive to save it. Otherwise when you re-install FreeNAS you'll have to set up a drive and mount point in order to copy the config.xml file if it's saved on one of the drives. With the thumbdrive just do the installation, then plug in the thumbdrive and it will mount it automatically, then copy the config.xml file over to "/conf" and reboot. That was a nice touch having all the configuration for FreeNAS in one file.