Showing posts with label FreeNAS. Show all posts
Showing posts with label FreeNAS. Show all posts

Wednesday, January 29, 2014

FreeNAS e-350 uptime

I just checked my FreeNAS RAID. This is a personal RAID I use to store backups, installers and VMs. Here is the original post : http://fortysomethinggeek.blogspot.com/2012/08/freenas-low-power-amd-e-350-lian-li-pc.html .

299 days uptime for a home box. Not bad. The last time it was rebooted, I needed to move it to a different location.



Monday, October 29, 2012

Old Hackintosh turned FreeNAS backup server

I like recycling old computers. I always find a great need for things like a firewall, an intrusion inspection device,squid proxy server,etc.

However, there comes a point when it isn't worth it to use old power hungry computers. It simply isn't feasible in the day and age where you can virtualize everything. In addition to energy consumption, space is a concern. Then again, there are some old computers suited for recycling today. The one I am about to discuss is perfectly suited for the task at hand.

I have an old MSI Wind Desktop PC lying around and it is perfect. This machine was popular in 2008 due to the easy hackintosh capability. It was the PC equivalent of the Dell Mini 9 of the time. All you needed was a special USB boot image to install a vanilla retail DVD of Mac OSX. It is a low power ATOM based PC that consumed a max 35W at full load. Basically, it is a netbook in a small enclosure for two drives. It is also very compact. It is about the size of a VHS player from the 90s.



By today's standards, it is pretty much useless as a desktop computer. It has 1GB of ram and a slow cpu. Linux distros run pitifully slow. The GMA 950 gpu make it unbearably slow to run anything past Snow Leopard if you want to use it as a mac. I bought it for 130ドル back in 2008 and it served me well as an iTune server.

After using FreeNAS for a while, I figured a new use for this ancient relic. A daily "mirror" contingency backup server. I like to keep 3-4 backups of everything and an extra backup isn't going to hurt. I figure I'd throw this into my backup mix.

My needs was very simple - a low-powered rsync backup server and this was the ideal solution.
My PogoPlugs would work but they do not have direct SATA. Connecting drives via USB isn't ideal. Furthermore, I really like FreeNAS over manually configuring /etc files and setting up a server from scratch. Newer barebones nettops tend to concentrate on micro size with 2.5" drive bays so I excluded them.

The MSI Wind has two drive bay but most importantly, a 5.25" CD bay. This meant I could get a swappable enclosure. Instead of using a CD-ROM, I'd use that bay to shuttle drives in-and-out.
This Kingwin only cost me 18ドル and is completely tray-less (no screws or backs for HDD). This is pretty important because I can continually swap out drives.
Well, I have had it running for 2 months and it has been perfect. As you can see below, 60 day uptime.
FreeNAS 8.2.0 installs without a hitch. Since this machine only has 1GB of RAM, I don't use it for anything heavy duty. I store ISO disk images but mostly, it is used as a Rsync backup server for over 20 web servers. The web servers dump their web files along with daily/weekly/monthly MySQL backups. They all backup in the middle of the night and fill up whatever drive I have parked in the 5.25" remove-able bay. When the drive fills up, I simply remove it and dock a new drive in.

Since I am using FreeNAS, setting up rsync backups to another FreeNAS box is also pretty straightforward. This box also backs itself up and duplicate itself to an off-site remote "full" server.






Overall, I am pretty happy with this set-up. My only out-of-pocket cost was the 18ドル remove-able drive bay. Installation was pretty much plug-n-play to a bootable USB stick. I'll run it till the day it dies.

Some specs:

Intel® Atom™ 230 1.6GHz CPU
Atom w/ 4W thermal power.
At full operation, it consumes 35W.
2 Bays a 3.5" HDD bay and a 5" CD Bay.


Thursday, October 4, 2012

iPad / iPhone connect with FreeNAS (or any *NIX)


I've been asked how I connect an iOS device (iPad/iPhone) to a FreeNAS box. Well I'll answer that question in this post.

There are many apps in the app store that will allow you to connect to FreeNAS (or any NAS/*Nix) box and I'll share some of the apps I use.

Mounting and Remote Server File Access.

The main app I use to connect to a FreeNAS is Files Connect. I pretty much use it to connect to all my servers because it supports pretty much everything I need - CIF/SAMBA, AFP (Appletalk/Netatalk), and SFTP (SSH). It is a great AFP client for iOS!




It also supports the usual Dropbox, Google Drive, Box, FTP, and WebDAV.
I am able to copy files from and to the iPad/iPhone. I can transfer videos/photos from my camera roll to a network share. I can pull PDF and Photoshop .PSD files and view them remotely. I can pull in spreadsheets and other files and work with them remotely.

The other apps in the app store only support SAMBA so AFP and SFTP is a pretty big deal for me. It also supports SSH keys. The only thing it doesn't support is NFS and Rsync. However, for most people, Files Connect covers most of the bases.

It comes in handy when you want to make a new share mount. Instead of using the Web app ajax's terminal to make a folder, I log in as root and can easily make my share folders like you see below.




A few things that are cool:

You can zip and compress files. So if you want to send an email with a zip attachment, this works great. Collect a bunch of files into a folder. Compress, Send to Email.



You can add movie/video files to your camera roll. I was able to add random h.264 videos from my video share and import them into the camera roll which then allowed me to edit videos directly in iMovie. In fact, the other day, I was able to edit old VHS digitized videos on my iPhone 5 from my FreeNAS in this blog post.







If you have video files on your NAS, you can stream whatever iOS supports. This includes streaming H.264 MP4 files and I've had some luck with some AVI files. If they don't stream, you can copy to the local iPad and open in another app. I will go into streaming some more later in this post. I was able to stream 1080p 6GB files with no problem whatsoever.


Terminal Access.

There are a lot of SSH clients but the only one I use is iSSH. In my opinion, it is the best app out there for any mobile device. It also supports VNC and X11.
For an SSH client, it trumps everything else out there because it knows most mobile keyboards are limited and uses the touch screen multi gestures to make up for it.


(iPad above & iPhone screenshot below)



You can set transparency on the keyboard and there is a touch gesture that pulls up special keyboard control keys. On the iPhone, it is absolutely fantastic. Despite the fact other phones have 4-5" larger screens, the original 3.5" iPhone's SSH experience was by far more pleasant because you had more visible area while typing. I use the tab and arrow up/down quite a bit and the fact it is easily accessible makes it highly intuitive compared to an on Android like Connectbot.


Other apps.

An alternative to Files Connect is File Browser. I used this app quite a bit before Files Connect came out. It is strictly a SAMBA/CIF file explorer. It works for the most part and the GUI is more Windows like whereas Files Connect is more mac-like. In previous versions, you could not stream .AVI files. This newer one supports more streaming video format and has a new trick up it sleeve called QuickStream which will allow 3rd party video players to intercept the stream. Some video players already support this. This app also supports Airplay.






The last app I will cover in this post is O Player HD.

Out of all the apps I've mentioned, this is the only one that requires a separate purchase/download for iPad and iPhone. The others, you buy once and can use on both phone and tablet.


O Player is a 3rd party video player that supports XVID/DIVX AVI, WMV, RMVB, ASF, H264, MKV, TS, M2TS. It is a so-so video player. It works but there are many others I would recommend over this one.
The only reason I got it was because of the SAMBA streaming functionality for non iOS default video codecs. If all of your video is H.264, you won't need this app.
This app also supports TV-out and Airplay. So in essence, you can stream from your NAS and stream back to your TV via airplay.






The only thing missing from this post is some sort of synchronization app. I haven't found one I liked and I pretty much use PogoPlug to automatically synch/backup my camera photos from my iOS and Android phones.

There you have it. Some good apps on connecting to your FreeNAS (or any *NIX computer) using your iOS device. When your Android friends brag about their external SD card, you can show them your 10TB FreeNAS box full of streamable videos and music on your iOS device.

Links:


iSSH
http://itunes.apple.com/us/app/issh-ssh-vnc-console/id287765826?mt=8

Files Connect
http://itunes.apple.com/us/app/files-connect/id404324302?mt=8

File Browser
http://itunes.apple.com/us/app/filebrowser-access-files-on/id364738545?mt=8

O Player
http://itunes.apple.com/us/app/oplayer-hd-best-video-music/id373236724?mt=8

and last but not least, FreeNAS
http://www.freenas.org/


Saturday, September 22, 2012

Legacy Windows Rsync Backup to FreeNAS

I have some old Windows servers (10 years and counting) and I have been using rsync to back them up to my FreeNAS box. It has been working great for me.

First of all, I do have my Windows servers backup in virtualized format. However, those are only one-time snapshops that I run once in a while. These are classic ASP IIS web servers that I can easily put up on a new VM. However, many of these legacy servers generate gigabytes of data a day in their repositories. Running VM conversion daily is not ideal.

My solution was to use some sort of rsync solution just for the data repos. I've tried some applications that didn't work too well with Samba shares and these old servers have slow I/O. Copying files to external sata or usb drive was not ideal. We've moved on from Windows to Linux and do not have any Windows file servers of capacity to provide network backups. Hence, I decided to use Delta Copy with FreeNAS. So here is a little write up on how to set it up. I have 4 Windows 2000 servers backing up daily with this method.

First, download Delta Copy and install it. It is open-source and pretty much free. It is basically a wrapper for cygwin's rsync. When you install it, it will ask you to install the Server services which allows you to run it as a Rsync server on Windows. You don't need to do this. Instead, you will be just using the Delat Copy Client application. But before we do that, we will need to configure our Rsync service for our Windows Clients on FreeNAS.

In FreeNAS, go under Services , Select Rsync > Rsync Modules > Add Rsync Module.



Then fill out the form; giving the module a name and set the path. In my example, I simply called it WIN and linked it to a user called backupuser.



This process is much easier than trying to configure the daemon rsyncd.conf file by hand.

Now, on the Windows Client, start the DeltaCopy Client. You will create a new Profile.
You will need to enter the IP of the Rsync server (FreeNAS) and specify the module name which will be called "Virtual Directory Name." When you pull the select menu, the list of Rsync Modules you created earlier in FreeNAS will populate.





You can set authentication. On the server, you can restrict by IP and do other things to lock down your rsync.


Next, you will add folders (and/or files) you want to synchronize.



Once the paths are set up, you can run a sync by right clicking the profile name.



Here, I made a test sync to a home folder of a virtualized windows box. As you can see, I mounted the rsync volume on my mac to see the progress. The rsync worked beautifully. DeltaCopy did what it was told.


Once you get everything working. The next thing to do is set schedules. If you done tasks schedules in Windows before, it is pretty straightforward. DeltaCopy has a link in the application to directly create a new task for you. I set my backups to run nightly and it has been working great.



There you have it. Windows rsync to FreeNAS using DeltaCopy.
The nice thing about FreeNAS is you don't have to modify /etc/rsyncd.conf files. Everything can be done in the web admin.



Thursday, August 16, 2012

FreeNAS Mini-ITX AMD E-350 Lian Li PC-Q25 build



I recently built a FreeNAS ZFS RAIDZ box for my personal backup archives. I wanted something elegant and low powered with the ability to run ZFS. FreeNAS is a NAS appliance built on FreeBSD. It supports the ability to run the ZFS filesystem and can be booted off a small flash storage like USB or Compact Flash.

I selected the following components:
  • 6 X Hitachi 2TB 7200rpm Desktars 3.5 " drives
  • ASUS E35M1-I Mini-ITX Motherboard with an AMD dual core E-350 and 8GB of RAM.
  • LIAN LI Silver Aluminum PC-Q25A Mini case
  • FreeNAS-8.2.0-RELEASE-p1-x64 (r11950)
  • 8GB internal Patriot USB stick as OS boot
A few notes on my setup:
The ASUS E35M1 is a low voltage netbook AMD Fusion CPU (same one found in the Thinkpad X120E) and supports six SATA 3 6Gb/s ports. The LIAN LI PC-Q25 case can hold up to seven 3.5" hard drives. Five of those seven drives can be hot-swappable.

Here are some pictures of my build.The fit-n-finish on the LIAN LI is pretty impressive. The machined aluminium is well made. This case was clearly designed to be a HTPC or NAS box. It fits well in my Apple - Macintosh environment. Except for the logo up front, it is one slick looking piece of gear.



The Asus motherboard has everything I needed. 6 SATA ports for 6 HDD drives! All the data drives are connected to the motherboard while an internal USB stick boots the FreeNAS OS.
It also has a passive cooling heatsink.

This is where the AMD solution shines. I could not find an Intel based Mini-ITX mobo/cpu with 6 SATA III 6Gb/s ports nor one with a passive heatsink. Moreover, none of the Atom boards officially support 8GB of RAM necessary to run ZFS. This is the perfect small form factor board for FreeNAS!



Internal USB header attaches to the motherboard and hides the USB inside the case.

Picture below depicts drives loaded up. There are five hot-swappable bays. I had to put this to real world practice by taking out drives while the OS was running and without rebooting! The backplane is pretty interesting since it uses molex connectors for power.





With 8GB of ram, I have enough to run ZFS and RAIDZ; giving me roughly 9TB useable space.




After my build, I started to notice some degraded RAIDZ errors on my 3rd disk. Disk #3 seemed fine. I zeroed out the data and booted a different OS (Linux Mint) and copied files with no integrity issues. I tried the drive in different computers and everything checked out fine (S.M.A.R.T) and other scans. However ZFS zpool was giving me checksum errors. Well, it turned out to be a case of "silent data corruption." Linux Mint and Ubuntu did not see any problems but FreeNAS was able to give me a good heads up. It turned out to be a bad SATA cable. Once replaced, everything was fine.


In terms of performance:

Running a short DD benchmark,I was getting 263-268 Megabytes per second on the internal bus. This is pretty decent considering it is a RAIDZ disk array.


 [root@RAIDZ] /# dd if=/dev/zero of=/mnt/RAIDZ/test.dd bs=2048k count=10000 
 10000+0 records in 
 10000+0 records out 
 20971520000 bytes transferred in 74.518446 secs (281427232 bytes/sec) 
 [root@RAIDZ] /# 
 [root@RAIDZ] /mnt/RAIDZ# dd if=/dev/zero of=/mnt/RAIDZ/test.dd bs=2048k count=10000 
 10000+0 records in 
 10000+0 records out 
 20971520000 bytes transferred in 76.008326 secs (275910826 bytes/sec) 
 [root@RAIDZ] /mnt/RAIDZ# 
 

In short,

268.3899230957 megabytes

263.1290683746 megabytes


Through the network, I was getting 60-80 MB/s. This may be due to the Realtek 8111E gigabit controller on-board or the fact I was testing during the middle of the day with 60 other people on the network. I was hoping to get closer to Gigabit's theoretical limit of 125 MB/s so I may experiment with a dual NIC Intel card in the future..


Overall, I am very happy with this NAS build. It supports AFP, CIFs, NFS, iSCSI, Rsync and works surprisingly well. I also like the fact I have other FreeNAS boxes that easily sync to this one with just a few click of a mouse.

The only thing I wish for is a motherboard with 7-8 SATA ports so I can use a SSD as a cache accelerator drive.




The NAS even works surprisingly well serving files to my iPad using AFP, Samba or SFTP.









Monday, August 6, 2012

Cool 4ドル gadget: internal usb motherboard dongle

Here is something you don't see too often. An internal USB dongle with header pins that connect directly to your motherboard that has spare 4 pin USB headers. Now, what can you do with this? A hidden internal USB boot disk!



This 3ドル.75 gadget is extremely handy for custom low foot print server builds like FreeNAS or ESXi. You install your small foot print OS onto a USB stick and hide it away. In fact, FreeNAS recommends installing onto a flash drive. Instead of having a USB pen drive sticking out the back of you server, you can simply hide it away inside the chassis like this:



Here, I have it in my Fujitsu MX 130 taped to the side of the drive caddy. I can free up the SATA ports for drives and my OS boots from the USB stick. Cool indeed.

Other uses included setting up an internal usb wifi. This is great for those who hackintosh and need to use a specific wifi dongle.


Link: Amazon StarTech USB A to USB Motherboard 4-Pin Header F/F 2.0 Cable


Subscribe to: Comments (Atom)

AltStyle によって変換されたページ (->オリジナル) /