Cross Platform, Low Powered Home Servers w/ RAID?
Milo_Mindbender asks: "At home I've collected too much data to easily backup, so I've been thinking about RAID5 for a little extra data security. I multiboot my computers for both Linux and Windows so I really need a RAID solution that will make the data at least readable by both OS's. I don't think this can be done on a single machine (can it?) so I'm looking to put together a Linux home server with RAID5 serving both SAMBA and NFS. Aside from the usual questions (software/hardware RAID, types of disk to use...etc) because I live by myself in an apartment I have a few tricky requirements I hope the Slashdot crowd can help me with." How would you set up a RAID5 server to perform Samba/NFS sharing duties without it wasting a lot of wattage, while it idles?
"I hate to waste electricity, so how can a Linux RAID5 server be setup to automatically spin down to the lowest possible standby power use, then spin back up when a computer accesses it? I don't have a basement, garage or other remote place to put the thing, so it needs to be quiet or at least not die a thermal death if I lock it in a closet. What's the sweet spot for choosing CPU type/speed, hardware/software RAID controller, motherboard and memory to make a home server? Since this is only going to be serving a few machines (and maybe doing router/gateway duty), I'm sure there's a point where adding more CPU horsepower doesn't improve performance much. Any suggestions on motherboards, cases or even complete systems that work particularly well for this kind of small headless home server?"
I use an AOpen i855 motherboard w/ a Pentium M proc. There is a newer one from Aopen called i915 also. I use it as a gateway/firewall/server (use a distro called clarkconnect .. http://www.clarkconnect.org/ works wonderfully).
Low power, quiet, cool ...
** But why NFS? Just use Samba.
If you have a true hardware controller, the RAID will be platform agnostic and neither know nor care what OS is accessing it. Anything software based (most onboard stuff) is going to be tied to a specific platform.
Go with slower hard drives, ie 7200 RPM drives, maybe slower - and you won't have the heat problems. However you might want to look into RAID 15, so if you can get a system that will hold 6, even better.
Now remember, to drop back CPU power, and raw disk speed for the thermal/power savings
I have mod points and I am not afraid to use them
Grab one of the Via MoBos. They'll have at least one PCI slot, onboard video and NIC, and maybe even sound if you look around.
/mnt/storage and then use samba to share that across your network.
Then grab a PCI SATA card. It won't need RAID capability, just a ton of SATA ports.
Attach a smallish hard drive to the master onboard PATA port and set a CDROM on the slave on the same channel. Install your SATA card and attach some big-assed SATA drives.
Install Debian to the PATA drive and then remove the CDROM. Disable, in BIOS, everything you won't be using.
Once you are in Debian and everything works, use 'mkraid' to initalize the SATA drives in a RAID5 config. Mount that under
Some might say that RAID5 will be too slow. But, across a network, chances are the wire will be saturated before the hard drives hit the sustained transfer rate. If you are concerned about performance, throw a Gig-E NIC in there and use RAID0+1 or RAID3.
I'm not sure how well Linux can deal with suspending the hard drives in a RAID controller during inactivity. If the kernel can handle it, use something like 'hdparm' to sleep the drives when they aren't in use.
Good luck, man...
I'd rather you do it wrong, than for me to have to do it at all.
Have you even searched Slashdot, let alone google?!2 59222&tid=198&tid=4 3 1223&tid=198&tid=230&tid=98&tid=4 2 0242&tid=232&tid=198&tid=126&tid=4 5 20246&tid=222&tid=198&tid=230&tid=4
http://ask.slashdot.org/article.pl?sid=05/09/25/0
http://ask.slashdot.org/article.pl?sid=05/10/07/2
http://ask.slashdot.org/article.pl?sid=05/11/09/0
http://ask.slashdot.org/article.pl?sid=05/04/27/1
*cough*
Death by snoo-snoo!
First, I have to say I'm truly awed that you have that much data. You must really love collecting pr0n -- er, have a lot of sound and video files.
I recently had to set up two new servers. One is for business, and one is for personal data. For both, I used RAID 5. They run NFS and Samba, with different directories shared as needed to other systems. RAID 5 is EXTREMELY simple to set up (it's a one line command, once you install mdadm, which, on Debian, installed like a dream), and I'd just suggest Googling for mdadm and tutorial. You'll get several tutorials. There's really no need to pay for hardware RAID cards on Linux (unless you're using an old, slow system). Besides, until you get into the range of something like $300, the RAID cards all do the work through drivers anyway, so you might as well just get a cheap ($10-$20) PCI IDE Controller card to add to your existing IDE channels. Just make sure it works on Linux and is NOT Adaptec (they fsck with the drive order).
On both my systems, all the drives are the same size and model number. I figure you can't always tell if a 160GB drive is 160GB or 140GB, and I didn't want to mess with that. RAID 5 takes 3 drives, but with mdadm, you can add a spare for failover (and the monitoring daemon will e-mail an account on that system in case of failure, so you have a warning to replace the bad drive). My only concern about using the same model for all drives is that there may be a flaw in that model. I found drives that were given a large number of good reviews at NewEgg.
You can also add more spares and more devices with mdadm, or replace faulty devices (not hot swappable, unless you have special hardware, and I don't even know if Linux supports that).
One last note on mdadm: when you first set up a RAID 5 array with it, you'll get an immediate warning of something like a degraded event. This is normal. I think (can't remember details) mdadm and the kernel (mdadm is by the person who wrote the RAID code for the Linux kernel) don't do an exact version of RAID 5 and, instead, use something that lets it rebuild on a new drive faster than it would otherwise.
http://www.mini-itx.com/projects/tera-itx/
However, you've then got all your eggs in one basket... not a good long term situation... you're going to need off-site backup... which is yet another Ask Slashdot question.
--Mike--
The biggest problem with these things is no longer the cost of the hardware, but the cost of running this stuff. Why can't these things just go to sleep when they're idle and wake up when they're needed? I probably use my server 20 or 30 minutes a day, and the rest of the time it just costs me money. If it were a mac, maybe it would work, but it would cost an arm and a leg. Why is linux power management so touch and go?
Has anyone used solaris 10? ZFS is looking nice; I just wonder about the power management.
XSERVE
VIA C3 processor. Socket 370, up to 1GHz. Runs on 11W of electricity. If you get a VIA motherboard, you'll probably find that everything has open source Linux drivers. (I know the EPIA M-series do.)
Now, anyone know of a socket 370 motherboard that'll take 4 or more SATA drives?
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
As others have mentioned, the CPU is definitely unimportant. I bought a Dell Poweredge server a few years back with a 2GHz P4. I set up p4-clockmod, and the thing has never come off the 300MHz minimum speed during normal operation.
The most trouble I've had is keeping it all cool. Between the P4 and all the drives, a fair bit of heat is generated. Stopping the drives when not in use would help there, but then I've always been concerned that the extra starts would increase the failure rate. The way I figure, if they are left running everything stablizes and should live longer than repeated powering on of the motor and the heating/cooling of the drive. So I've never tried setting up power-down. Perhaps that's an inaccurate assumption on my part.
When I lived in an apartment, I put the server in a closet that had the sliding doors. Set it sideways, then left the doors open about 3-4" on both ends. The fans caused enough of a draft to pull cool air in one door and exhaust it out the other. Here in my house I have everything set up in a walk-in closet and things stay cool enough just by leaving the door open most of the time. During the summer, I do have a mini A/C unit in there so I don't have to cool the whole house.
I have been using NFS for a long time, and on the 100Mbps network I never really noticed any problems, although it was slower than other transfer methods. But now that I have 1Gbps to my desktop, it's really lousy. I've tried some tuning tricks, but so far no luck. Especially when writing to the server, NFS is abysmally slow compared to anything else, such as scp. I've considered trying some other filesystems, but haven't gotten around to it yet.
I've had a similar problem and I'm using a shuttleX as but the fan noise of 4 computers in my office is about to drive me crazy.
you may want to take a look at www.littlepc.com these guys have some interesting low voltage, and fanless systems that could serve the basis a good home server system.
If you don't want/have time to tinker it yourself, you should consider one of the infrant readynas models. It's very easy to setup, reliable and has a lot of interesting features.
http://www.infrant.com/products_ReadyNAS600.htm
I'm surprised no one has mentioned that RAID5 is no replacement for backups.
I guess if it's just porn you got for free or whatever it doesn't matter, but if the data is important you still need some sort of backups.
RAID protects against:
Disk Failure
Backups protect against:
Disk Failure
Accidental Deletion
Malicious users
Malicious programs
Filesystem corruption
Errant program causing file corruption
RAID won't protect you from any of those other things one bit.
I've had enough abrasive sigs. Kittens are cute and fuzzy.
Having the backup done by normal file copying rather than RAID is not a problem in my view - after all, backup is the purpose, and that's done by the firmware. RAID ain't always ideal: A friend of mine had a nice RAID5 setup in his computer. Then the primary drive got corrupted - and that was immediately mirrored to the second drive! He lost all his data...
No mention of the NSLU2 is complete without noting that it's eminently hackable. :)
I'm in a Unix state of mind.
Buffalo technologies makes some really nice products, including RAID storage devices.
I recently bought a single drive NAS unit with a 300 GB hard drive, use it for backup/storage for both Linux and WinXP (uh oh.) I also has additional tricks like built-in Gigabit ethernet, ftp server, printer server, backup of itself to attached USB 2.0 drive and misc. other tricks. Very nice device.
The main advantage of doing your backups onto a device such as this is the power savings -- this thing uses very little power compared to running an additional PC/server. Doesn't make much noise and generates very little heat. You can get up to 1.5 TB of storage out of one of these for a pretty price.
Check out the handsome little Buffalos at:
http://www.buffalotech.com/
Everything in the Universe sucks: It's the law!
If you investigate Network Attached Storage you will find some solutions that are truly agnostic about the computer you connect with ( NAS solutions appear over tcp as a storage volume, without the need of a separate host computer) - if you get just a RAID enclosure you will need to attach it to a host computer. If you use a separate host computer you are better off with Linux as the OS (though you could use a Mac and still get the open-source advantages of SAMBA, NFS, what have you) and connect the Win box with SAMBA. NFS used to have a performance advantage over SAMBA, but that evaporated about four - five years ago.
I have nothing to hide. So, why are you spying on me?
I've set up a fileserver in my garage, Linux mandriva 2005, serving NFS and SaMBa shares. Running since 3-4 months
I use EVMS as professional LVM. Raid 0 or 1 available, and bad blocs relocation too. Also SMART monitoring is running as daemon.
Your main problem for spinning down drives is the filesystem:
With journaled FS (recommended) disks will spin up every 10mn or so, after some tuning. For me too it's still too much and I'd like to stop them for hours if I don't use the shares...
I plan to study this: remount read only and then turn read-write access automatically on serving files. As nothing happen on RO journaled FS, discs will remain down when not in use - I hope.
I'll will gather all good advice on this thread later to update the fileserver entry.
I don't see it mentioned at nslu2-linux.org, is it based on the same hardware and firmware?
--dave
davecb@spamcop.net
I run a mini-ITX setup with software RAID. RAID isn't really a backup solution as other people have mentioned. My theory is that having the two files in one place are better than one. I have a script that copies my critical files over at midnight to a new folder on the server, in addition to storing media.
Once every month or two, or with the completion of a project, I'll burn a incremental DVD with data.
Once a year or ~18 months, I swap out the drives for newer ones. I then move the old drives into storage for archival backup. This works great for large piles of data that don't change much. (mp3s).
A key component in this is to put your server on a UPS. You can pick up an old UPS cheap off Ebay and swap out the batteries, for around 1/7th the cost of buying new.
I've used this system for a few years now and haven't had a problem. Since I switched to having all my systems on a UPS, I haven't seen a component failure after burn in, either. Something to think about.
..don't panic
I have three computers at home, plus a KuroBox running my mail server, and LDAP for centralized accounts. I was going to set it up as an NFS server for homes but I haven't been able to use AMANDA to back it up. For some reason it hangs xinetd. Anyway, the Kuro takes no power whatsoever and the other machines can be up and running as needed. For backups what I did is buy the biggest IDE drive I could find and set it up on my machine. I run AMANDA and set it up to backup to that drive, it does compression and it tries to keep at least one full backup of every drive so it doesn't really follow a set schedule of backups which I like since sometimes the machines are off or booted into Windows. AMANDA sees the big drive as a set of 8 100GB tapes and it uses an autochanger routine to move. Since I don't use / as the whole drive but break things down with LVM it has never ran out of space for backups, plus sparse files take no room. I probably could haveee gotten away with smaller tapes and have more allowing me to keep a longer backup history but so far it's been good. VERY HANDS OFF.
This is not for everyone, but I am very pleased with it.
I have a Sun E450 (these can be gotten cheap on eBay, but you really have to find the right deal). Upped it to 2GB ram and 4x400MHz Ultra2 CPUs. It holds 20 SCSI disks, so getting a bunch in there and RAIDing them is not a problem at all.
I personally prefer OpenAFS for my filesystem needs (I actually prefer DCE/DFS but that is not an option anymore and OpenAFS is slowly catching up with where DFS was), but NFS will run just fine as well. I intended to do this with Linux but found Solaris 10 to be a much better solution. I'm not religious about OSs. Linux, AIX, Solaris, and BSDs all have their valid strengths and weaknesses.
Add KerberosV and you have a nice, robust authentication/filesystem that will work on every PC in the house. I have OS X, Windows, and Linux desktops all sharing the same home directory and storage space.
Be sure to consider some kind of offsite backup as well. Either via tapes or over the Internet
Finkployd
Ok, RAID5 is c00l, but I rather work simple. For important data, I store it to two different disks (on different computers) and offline. For really important data, fourth, fifth location is that far away to protect from about else that direct hit by a large asteroid.
I have EPIA PD10000 motherboard on my server (Debian, of course). Currently, there are 3 PATA disks (one old 60G from desktop and two quite new 250G) thus I have internal capacity to add more disks on PATA channel. Disks are configured to spin down after a period of inactivity. The PCI slot is reserved by DVB card, so I cannot add more [SP]ATA disk.
However, there are many USB2.0 connectors and I'm thinking adding arhcive disks with USB. Those disks would be powered on-demand (using array of relays controlled by parallel port), thus in theory I could have tens of disks. USB2 transfer speed is sufficient for that kind of usage.
I found an inexpensive USB to ATA adapter, but it is unclear how it works if the disk is powered down. Does anyone have experience on that?
Of course, you must organise your data so that you will know which parts must be replicated and what data you allow to lose.
Don't use RAID to begin with. It's needlessly expensive for a home server and introduces an unneccesary point of failure. Maybe I have bad luck, but I have experienced many more RAID controller failures than I have hard drive failures. I even once got redundant RAID controllers, and the controller-controller failed. Let's say you were willing to spend $500 on this RAID solution: rather than do that, spend $250 on improving your backups and pocket the difference.
All's true that is mistrusted
You may not want your file server doing firewall duty. If it gets rooted, all your files are compromised. In addition, if it fails for any reason, you've lost all your files, and your Internet connectivity. It makes google searching to fix the problem that much harder.
Consider having a dedicated machine serve as the firewall/gateway/router. If it gets compromised, the intruder will still have another layer to get through before reaching your data, assuming the firewall and file server aren't the same platform. For me, a low power, quiet, 486DX266 running OpenBSD has worked well for the past 5 years as a firewall.
If a file system hasn't been written to since the last syncing of the journal to disk, why would a journaled file system bother writing to (or reading from) the disks, thus causing them to be spun up?
But it seems to me that it's what happen with ext3 journal... as a kind of periodic checkpoint - no matter the activity.
To minimize access and spin up my fstab entries look like
(that's 600s = 10mn)I hope I'm wrong, maybe I've overlooked something that keep the drive spinning. If course I won't use a noflush patch for such a fileserver!!!
The system is a P2-300 with 256 MB and a 40 gig drive, running Debian Woody. It currently serves the files via SAMBA, and it also has Apache, PHP, MySQL, and PostgreSQL installed (for web app dev work). I have things set up so that cron jobs (and in the case of the one 'doze box, a task manager run DOS batch file) copy various files from the workstations in my house to it periodically late at night. Later in the night, these files and others (the dev files on the server mainly - I intended the server to hold MP3s and other media files, things that I already would have other copies of, so I only cared about my dev work and the home directories on the server) are aggregated and a daily "backup" copy is made. Once a week, the last "backed up" version is copied to an ISO which I can then burn at my leisure (or via another cron job) to a CD-R.
This system has been up and running stable for over 2 years now, in my workshop, here in Phoenix, Arizona. The workshop is not air conditioned (though it is attached to the house and insulated) - so it gets a tad hot in the summer, and nice and "chilly" (for Phoenix, that is) in the winter. Also, my workshop is a workshop - all manner of crap and work happens in there, from woodwork to light welding at times - whatever is needed to be done. So, plenty of dirt and other crap. Even in this relatively harsh environment (for a desktop machine), it has worked wonderfully and serves my needs well.
I would step away from the RAID bandwagon unless you really need it. Look into what your needs are: what really needs to be backed up? You should only back up those things that you need to back up: MP3's that can be re-ripped (or are already on CD/DVD-R archive disks), video files you have from other sources stored elsewhere, and other media files - probably don't need to be backed up. Things you are working on - like development work or media processing work (like images, custom 3D models, video editing, sound editing, your thesis, etc) - things which you are actively working on and don't want to lose - those are the things to back up. You will find many cheap tape-based backup systems out there for this (DLT is one of them) - or in a pinch a DVD-R (or even - like in my case - CD-R) will work (you may need to implement a disk-spanning system if things get too large). Only if you are backing up huge amounts of data do you need to worry about spending a lot of cash for backup (like if you are a professional video editor, for instance), and you may need to think that if that data is that valuable, you should spend the cash.
If you stay away from the RAID, and use an older CPU (like I use a P2-300), your power requirements and heat output will drop off significantly, and putting it in a closet should not be an issue for heat (but realize that if the thing catches fire, your renter's/homeowner's insurance may not cover it because a closet isn't meant to hold running equipment). Set up properly, such a system should be cheap to build and relatively trouble free. Oh, and by the way - don't ever combine the duties of a fileserver with that of a server (router or web server) exposed to the internet. Doing so is just asking to have all of your data exposed to the greater world - either unintentionally or via malice...
Reason is the Path to God - Anon