Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Cross Platform, Low Powered Home Servers w/ RAID?

Cliff posted more than 8 years ago | from the energy-efficient-redundancy dept.

Data Storage 94

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?"

cancel ×

94 comments

Sorry! There are no comments related to the filter you selected.

Yep .. (3, Informative)

douggmc (571729) | more than 8 years ago | (#14116624)

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/ [clarkconnect.org] works wonderfully). Low power, quiet, cool ... ** But why NFS? Just use Samba.

Re:Yep .. (1)

Jeff DeMaagd (2015) | more than 8 years ago | (#14116770)

But why NFS? Just use Samba.

I think maybe because NFS uses the available bandwidth more efficiently? I'm not really sure. I don't do enough big data transfers to really care.

Re:Yep .. (1)

toddbu (748790) | more than 8 years ago | (#14116825)

I've used both NFS and Samba. NFS was slow, hard to get set up, and would lock up mounts on a regular basis. The only real trouble that I've run into with Samba is transfering files over 4GB, but I'm not 100% sure that that's a Samba problem.

Re:Yep .. (1)

jrockway (229604) | more than 8 years ago | (#14117718)

I've used both NFS and Samba. Samba was hard to setup, and never seemed to work quite right. NFS is comparatively easy to setup, just edit /etc/exports! Plus it preserves UNIX permissions and usernames, and is ultra-easy to mount on any UNIX (including OS X). Samba on OS X just plain doesn't work, but NFS is great.

If you're using Windows, then Samba is the only answer. But this is slashdot, so I assume that you don't use Windows. In that case, I prefer the 20+ years of testing that NFS has endured (over the Microsoft-designed, barely-documented, moving-target Samba format).

Re:Yep .. (0)

Anonymous Coward | more than 8 years ago | (#14117840)

If you're using Windows, then Samba is the only answer.

That's not true. If you install Microsoft Services for Unix, you can use and serve NFS as well.

Now if you have a large number of client machines running Windows, Samba is probably a better choice. Setting up and using SFU on many machines may be impractical.

Personally, I don't think either protocol is all that great, but I'm not aware of any reasonable alternatives.

Re:Yep .. (1)

jrockway (229604) | more than 8 years ago | (#14117959)

> Personally, I don't think either protocol is all that great, but I'm not aware of any reasonable alternatives.

There's AFS and Coda. Haven't used either, so I can't comment on anything other than their existence.

> That's not true. If you install Microsoft Services for Unix, you can use and serve NFS as well.

Sure, but that's like using Samba for Linux. Not the best solution. Windows file sharing for Windows machines and NFS for UNIX will cause you the least headaches.

Re:Yep .. (1)

mattyrobinson69 (751521) | more than 8 years ago | (#14131448)

there's also ssh as a filesystem using fuse (in 2.6.12 or later). sshfs iirc. That can obviously be used over the interweb much more securely than samba or nfs.

Its not that fast though

Re:Yep .. (1)

drinkypoo (153816) | more than 8 years ago | (#14140291)

While your points are valid, last time I checked, samba between Linux systems was faster than NFS between Linux systems. I'd rather put my effort into getting Coda to work all around.

Re:Yep .. (1)

budgenator (254554) | more than 7 years ago | (#14150461)

It was weird, but a while ago, I had my Linux box and a WinME box sharing files back and forth, and I'd swear that each OS would load file over the network from a foreign OS faster than they each would off their native hard-drive.

Re:Yep .. (1)

drinkypoo (153816) | more than 7 years ago | (#14150543)

I've had that experience on windows, but never on linux.

Re:Yep .. (1)

toddbu (748790) | more than 8 years ago | (#14120040)

In that case, I prefer the 20+ years of testing that NFS has endured...

I agree that NFS has been around longer, but that doesn't necessarily make it better. Have you never had a mount lock up on you that couldn't be recovered? It happened regularly to me. Doing research to fix the problem led me to the real reason that I selected Samba - the community behind it. Say what you will, but there sure seem to be a lot more people running Samba than NFS these days. There doesn't seem to be an equivalent to samba.org in the NFS world. The NFS site on sourceforge has had virtually no activity in a long time.

over the Microsoft-designed, barely-documented, moving-target Samba format

Is your problem that it does't work, or that Microsoft designed it? I don't think you should pick a protocol based on who built it. That samba.org team has done an excellent job of reverse-engineering the protocol, and I've been able to get Samba on Linux to do things that SMB in Windows has troubles with (like serving shares over the Internet). My biggest complaint with SMB (the protocol) is that once you open ports 137-139 then you're exposing a lot of other stuff like printer shares. I haven't tried port 445 yet, which I believe only serves up SMB.

Re:Yep .. (1)

tchuladdiass (174342) | more than 8 years ago | (#14126599)

>Have you never had a mount lock up on you that couldn't be recovered?

Here's a tip for NFS mounts. Use the option "-o intr,soft". This will allow you to kill processes that have a file open on a hung nfs mount, thereby allowing you to umount the filesystem. NFS uses "hard" mounts by default, in which case a process won't get a return from a read or write system call until that call is successfull, which has the side effect of causing processes to hang when the nfs server goes away. Soft mounts will allow a non-successful return from a read.

If you have a mounted NFS filesystem that is hung, you can also do a "mount -oremount,soft,intr /path/to/mount" to change mount options on the fly.

Re:Yep .. (1)

toddbu (748790) | more than 8 years ago | (#14127322)

Thanks for the tip. This is definitely preferable to rebooting the box, which is never the right solution. :-)

Re:Yep .. (1)

tverbeek (457094) | more than 8 years ago | (#14121506)

Samba on OS X just plain doesn't work

This is surprising news. I'll have to stop using it, then.

Re:Yep .. (1)

syrjala (139739) | more than 8 years ago | (#14118221)

In my experience Samba has really crappy performance.

Using 100 Mbps ethernet the transfer rate is ~4.5 MB/s with Samba and ~11 MB/s with NFS.

There are also the weird cases when transfer rate drops to ~200 kB/s with Samba. I've only seen that happen when transferring between Windows and Samba though. Between two Samba boxes the performance seems to be consistent.

Hardware RAID (2, Interesting)

darkjedi521 (744526) | more than 8 years ago | (#14116643)

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.

Re:Hardware RAID (1)

douggmc (571729) | more than 8 years ago | (#14116700)

I might get hammered for saying this .. but I would recommend using Software RAID if you are using a recent kernel (i.e. 2.6). FREE and has come along way. CPUs are plenty powerful to handle it. Don't bother w/ most onboard IDE or SATA so called "hardware" RAID controllers. They are troublesome in my experience.

With that said ... I agree w/ the above post IF you buy a decent hardware raid controller (general rule of thumb .. not good if 200 bucks or so).

Re:Hardware RAID (1)

toddbu (748790) | more than 8 years ago | (#14117214)

I might get hammered for saying this .. but I would recommend using Software RAID if you are using a recent kernel (i.e. 2.6).

We've been running software RAID for a while now and love it. The problem with hardware RAID is that in order to talk to the controller, you have to have special drivers. Why do you need to talk to the controller? Well, how are you going to tell if something goes wrong with a drive and it needs to be replaced? I once worked for a company that had all its RAID drives fail over time but no one knew it because they weren't getting notified. So it was just like having a single drive failure and they lost all of the data.

For our Linux boxes, we just run the following bash script every hour in cron:

#!/bin/bash
grep -A 100 -B 100 _ /proc/mdstat
if [ $? -eq 0 ]; then
uname -n
fi

Cron will spit out a log to root and you'll get notified of the trouble. Much easier than writing custom code.

What I don't understand is why people dual boot any more. Either virtualize the hardware or buy another box. For a couple hundred bucks you can get a great headless machine and then you just load it up with as much disk as you want. It would likely be much less money than buying a really good hardware RAID controller for an existing machine.

Re:Hardware RAID (1)

samjam (256347) | more than 8 years ago | (#14117772)

You can still run smartctl for S.M.A.R.T. drives to see whats up, or for hwardware raid, whatever program comes with your hardware raid controller

Sam

Re:Hardware RAID (2, Informative)

tzanger (1575) | more than 8 years ago | (#14118358)

For our Linux boxes, we just run the following bash script every hour in cron:

Why in the hell do you do that? Go look up mdadm's --monitor --scan and -ft modes, and then configure smartd to also email you out warnings. Beats the shit out of some manual process that relies on the /proc format not changing over time!

Re:Hardware RAID (1)

toddbu (748790) | more than 8 years ago | (#14120109)

We looked at using mdadm for monitoring and it's not that we're opposed to it. We chose the cron path more or less for the sake of simplicity. Rather than firing off yet another program to monitor something, we just rely on cron and link in a script to cron.hourly. We really like the fact that cron will notify us hourly so that we don't lose an email, forget about the problem, or just get complacent. There's nothing wrong with a little in-your-face action when you've got a failed drive.

I guess we could look at running mdadm with -1 in our cron script. That would address your concern about grep and format changes to /proc/mdstat.

Re:Hardware RAID (0)

Anonymous Coward | more than 8 years ago | (#14119129)

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.

The flip side is that, if your controller card dies two or three years down the road, and you can't replace it with the same or a compatible card, you're up the creek.

Skip RAID (1)

Theatetus (521747) | more than 8 years ago | (#14123342)

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.

Don't worry about CPU (3, Informative)

MerlynEmrys67 (583469) | more than 8 years ago | (#14116678)

Pick an old slow CPU, it really doesn't matter at 100Mbs speeds, if you were going multi gig - well then maybe. However don't skimp on RAM - put as many 1 GB sticks in it as you have memory slots (2 GB sticks are too expensive right now, but maybe)

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

Re:Don't worry about CPU (1)

Clover_Kicker (20761) | more than 8 years ago | (#14116923)

> Pick an old slow CPU, it really doesn't matter at 100Mbs speeds

Amen.

My home server is a Pentium 233MMX, and has no problem saturating my 100BaseT network.

If you're going for low power/low noise, there's a lot of room to underclock any modern CPU.

Re:Don't worry about CPU (1)

Thomas A. Anderson (114614) | more than 8 years ago | (#14120478)

"However you might want to look into RAID 15, so if you can get a system that will hold 6, even better."


Raid 5 will work with 3 or more drives and only 1 drives worth of data is unusable regardless of the number of drives in the raid. Raid 15, if I understand it right (I'm much more familiar with raid 5), would set aside 4 drives worth as unusable in a 6 drive array.

If I have a bunch of 100GB drives:

a 3 drive raid 5 gives me 200GB of usable space.
a 6 drive raid 5 gives me 500GB of usable space.
a 6 drive raid 15 gives me 200Gb of usable space (but protected by both parity *and* mirror and can survive up to 3 drives dying at the same time).

The catch to raid 5 is that data cannot be recovered if more than 1 drive fails (at a time). So, while one sees a nice decrease in the % of disk space used up by the system as one adds drives, the chance for simultaneous multiple disk failure increases. For most people, building a system for home data storage, this is not a huge concern (especially if there is 1 or more drives setup as automatic fallbacks).

I do agree wtih the poster, btw, that a slower cpu is fine. I run 3-200GB drives in a raid 5 on a 100mb network with decent nfs and samba traffic, and the cpu (1GHz AMD) hardly budges above 3-5% usage. Ram usage is at least 500mb however.

Hope this helps,

Greg

Re:Don't worry about CPU (1)

MerlynEmrys67 (583469) | more than 8 years ago | (#14120787)

No RAID 15 is simply a set of Mirrored (Raid 1) Raid 5's. So I guess you are correct in that 4 drives are redundant - but it really helps with redundancy are read performance (with the correct hardware of course). So as long as you don't loose 2 drives on EACH mirror set you are fine (you can loose all three of one mirror set, and one drive on the other and you are still fine)

Re:Don't worry about CPU (1)

dwater (72834) | more than 8 years ago | (#14123300)

I wonder if more CPU power might be useful on the occasion that a drive needs to be rebuilt - ie when a drive has failed and it switches to a spare. This period of time is one in which the whole array is vulnerable and can't survive another disk failure, so the faster the spare is reconstructed, the better....with s/w raid, CPU performance is not insignificant, I'd bet.

Some Ideas (3, Interesting)

Bios_Hakr (68586) | more than 8 years ago | (#14116682)

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.

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 /mnt/storage and then use samba to share that across your network.

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...

Re:Some Ideas (0)

Anonymous Coward | more than 8 years ago | (#14120618)

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.
I'm using a 2.6 kernel with software RAID 1, 5, and linear. It has no problems with the disks suspending (hdparm) - it just waits for them to spin up when you try to access the RAID. Another thing to try is CPU frequency stepping. My server is an original P4, which is conveniently supported by the kernel's cpufreq drivers. It automatically cuts back to 350MHz when unloaded, and scales up to 1.4GHz as demand increases.

Search.. (5, Informative)

Daxster (854610) | more than 8 years ago | (#14116688)

Re:Search.. (1, Funny)

Anonymous Coward | more than 8 years ago | (#14116760)

Slashdot has a search? What does it do?

Re:Search.. (2, Funny)

Seumas (6865) | more than 8 years ago | (#14117247)

Apparently the slashdot editors don't know, either.

Re:Search.. (3, Insightful)

egarland (120202) | more than 8 years ago | (#14117177)

The poster asks different questions than the articles linked raise and they are valid questions.

The objectives of large scale redundant and able to be put in a closet are needs unmet by todays storage designs and are likely to be as common tomorrow as wireless ethernet is today.

So.. basically.. snoo snoo off. :)

I'm using something like that... (5, Informative)

TheWanderingHermit (513872) | more than 8 years ago | (#14116696)

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.

Re:I'm using something like that... (4, Informative)

swillden (191260) | more than 8 years ago | (#14117414)

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).

Here's another tip: If you're using Linux software RAID, carve your drives into multiple partitions, build RAID arrays over those, then use LVM to weld them into a larger pool of storage. It may seem silly to break the drives up into paritions, just to put them back together again, but it buys you a great deal of flexibility down the road.

Suppose, for example, that you had three 500GB drives in a RAID-5 configuration, no hot spare. That gives you 1TB of usable storage. Now suppose you're just about out of space, and you want to add another drive. How do you do it? In order to construct a new, four-disk array, you have to destroy the current array. That means you need to back up your data so that you can restore it to the new array. If there were a cheap and convenient backup solution for storing nearly a terabyte, this topic wouldn't even come up.

If, instead, you had cut each 500GB drive into ten 50GB partitions, created ten RAID-5 arrays (each of three 50GB partitions) and then used LVM to place them all into a single volume group, when it comes time to upgrade, you will have another option. As long as you have free space at least equal in size to on of the individual RAID arrays, you can use 'pvmove' to instruct LVM to migrate all of the data off of one array, then take that array down, rebuild it with a fourth partition from the new disk, then add it back into the volume group. Do that for each array in turn and at the end of the process you'll have 1.5TB, and not only will all of your data be safely intact, your storage will have been fully available for reading and writing the whole time!

Note that this process isn't particularly fast. I did it when I added a fifth 200GB disk to my file server, and it took nearly a week to complete. A backup and restore would have been faster (assuing I had something to back up to!). But it only took about 30 minutes of my time to write the script that performed the process and then I just let it run, checking on it occasionally. And my kids could watch movies the whole time.

For anyone who's interested in trying it, the basic steps to reconstruct an array are as follows. This example will assume we're rebuilding /dev/md3, which is composed of /dev/hda3, /dev/hdc3 and /dev/hde3 and will be augmented with /dev/hdg3

  • pvmove /dev/md3 # Move all data off of /dev/md3
  • vgreduce vg /dev/md3 # Remove /dev/md3 from the volume group
  • pvremove /dev/md3 # Remove the LVM signature from /dev/md3
  • mdadm --stop /dev/md3 # Stop the array
  • mdadm --zero-superblock /dev/md3 # Remove the md signature from the disk
  • mdadm --create /dev/md3 --level=5 --raid-devices=4 /dev/hda3 /dev/hdc3 /dev/hde3 /dev/hdg3 # Create the new array
  • pvcreate /dev/md3 # Prepare /dev/md3 for LVM use
  • vgextend vg /dev/md3 # Add /dev/md3 into the array

In order to make this easy, you want to make sure that you have at least one array's worth of space not only unused, but unassigned to any logical volumes. I find it's a good idea to keep about about 1.5 times that much unallocated. Then, when I run out of room in some volume, I just add the 0.5 to the logical volume, and then set about getting more storage to add in.

Re:I'm using something like that... (1)

marc_gerges (561641) | more than 8 years ago | (#14118033)

This is a great idea.

I'm thinking about rebuilding my home server which mainly is a mythtv backend. Currently using LVM to get bigger partitions than I have drives (my tv partition is at 480GB right now) and was thinking about RAIDing them for added security, but was put off by the fact you can't easily extend a raid.

I'll follow your tip, but will probably add boot and swap partitions to every drive. Not because it's needed on every drive, just to keep the setup consistent over all drives.

Couple questions, probably related to my missing experience about raids:

  • This will work with those newfangled extended partitions, right? Didn't use those since the days we dual booted DOS and OS/2.
  • If a drive dies, essentially the 10 raids will go on degraded and once I pop in a new drive, I can go and rebuild them with the LVM rather uninterested in the whole process. However, what happens if the new drive is bigger than the old one? Can I extend the raids while rebuilding them, or do I have to rebuild and then extend one after the other? How does that work?
  • A raid can span ATA as well as SATA drives, right?

It's a very cool approach, definitely.

Re:I'm using something like that... (2, Informative)

swillden (191260) | more than 8 years ago | (#14118465)

I'll follow your tip, but will probably add boot and swap partitions to every drive. Not because it's needed on every drive, just to keep the setup consistent over all drives.

I did that too. I also had a couple of drives which were actually slightly bigger than 200GB, so I used the extra space for /root partitions (mirrored).

This will work with those newfangled extended partitions, right? Didn't use those since the days we dual booted DOS and OS/2.

Yep. In fact, to keep the numbering clean, it's a good idea to make all of your RAID partitions extended. That means they start at, eg., hda5 (1-4 are primary partitions). It's also a good idea to use RAID device numbers that correspond to the numbers of the drives they contain. So, put hda5 in md5.

If a drive dies, essentially the 10 raids will go on degraded and once I pop in a new drive, I can go and rebuild them with the LVM rather uninterested in the whole process.

Right. LVM has no idea anything has occurred unless the RAID goes beyond degraded mode and actually fails.

However, what happens if the new drive is bigger than the old one?

If you have a RAID-5 made of, say 50GB partitions, you lose one of them (because the drive died) and then you add a new partition back into it, that new partition must be at least 50GB, and if it's larger than 50GB the extra space will not be used.

However, just because you added a larger drive doesn't mean you need to make the partitions on the new drive larger. You could just make more of them. I recently added a 250G drive (the fifth in my box) and I used 200GB of it as hot-spare partitions for my RAID arrays and the other 50GB I just mounted for use as scratch space for stuff I don't care if I lose.

Can I extend the raids while rebuilding them, or do I have to rebuild and then extend one after the other? How does that work?

You can extend them while rebuilding, but it would make me (perhaps irrationally) nervous. To extend, the first thing you have to do is to get your data moved off of the array you want to extend. The array will have to continue running in degraded mode during that time, and it will take significantly longer to perform the pvmove operation than it would to resynchronize a new partition into the array. For my partitions, which are 20GB, it takes about 20 minutes to get an array back to full operational mode from degraded mode. It takes two to three hours to migrate that data to another partition, during which time losing another disk would be fatal to my data. It's unlikely that anything's going to happen in that time, but I prefer to get the RAID fixed first, then think about relocating data and rebuilding individual arrays.

In practice, I use RAID-5 over four disks plus a hot spare. So if I lose an active disk, chances are good that the RAID will already be rebuilt onto the spare before I even notice the e-mail warning me of the issue.

A raid can span ATA as well as SATA drives, right?

It's much better than that. The Linux software RAID system can use any block device. RAID devices (/dev/md*) are block devices. LVM also works on any block device, and LVM volumes are block devices. You could, if you wanted to, build an absolutely insane structure of RAIDs of RAIDs of LVM volumes of RAIDs... I like to say that the true measure of the power of a tool is how large a mess you can make if you misuse it, and by that definition Linux software RAID and LVM are powerful tools indeed. I've never come up with any reason to do anything other than LVM over RAID, but there may be one.

Another thing Linux can do is network block devices. Because my server is basically full -- I can't add disks, I have to replace them -- I've toyed with the idea of putting another big disk in my desktop machine and exporting it as a network block device, then adding that into my RAID arrays on the file server. The performance hit shouldn't be too bad, since I have Gig-E. The obvious downside is that my desktop machine will have to be up all of the time. It is anyway, but it's less reliable than the server since I occasionally want to reboot it, and it's not on a UPS (unlike the server). If I were to use the network block device as my hot spare the impact of that would be lessened, though there would be a greater chance that the spare is unavailable when needed.

Still thinking that one over. Your ideas and suggestions are welcome.

Re:I'm using something like that... (1)

marc_gerges (561641) | more than 8 years ago | (#14118819)

Your ideas and suggestions are welcome.

Bear with me - I'm still recollecting parts of my just exploded brain :-)

I can see you wouldn't want to extend a degraded raid though. OTOH, if one knows that one can reconfigure it later, no trouble just replacing the disk and then rework one partition after the other, at one's leisure.

What I'm trying to work out right now is this: I read the total size of a raid is (number of drives -1)*size of smallest drive. Right now there's 4 drives in that computer - 120, 160, 200 and 250GB. By slicing them up to partitions and taking one partition of each drive into a raid, I'd get the same size than doing a single raid over all drives - a maximum of 3*120=360GB. Losing over half my current diskspace for redundancy. But, a raid 5 needs only 3 disks, not 4. So I'm thinking about how many raids I need to span in what combination on those disks to get close to the 547.5 GB that were possible if all my drives where the same size.

Re:I'm using something like that... (2, Informative)

MacJedi (173) | more than 8 years ago | (#14119314)

I hope you excuse me for intruding in the thread, but I find this to be a quite interesting optimization problem. You ultimately want to optimize, T, the total size of the LVM of arrays, where:
T = Sum_{j=1}^{m}[(N_{j}-1) * S_{j}]
where Sum_{j=1}^{m} is the sum over m arrays, N_{j} is the number of partitions in the jth array and S_{j} is the size of a partition in the jth array. One thing that this equation shows us, is that each array in the LVM does not need to be the same size! The other constraint in this problem are:
N_{j} >= 3
which simply means that each array needs at least 3 partitions to be valid.

Now, there is another piece to this problem that I have not found a good way to express, which describes how to split a physical disk into partitions and then hand how to map each partition onto an array, j, since each disk does not have to contribute a partition to each array. This is needed to prove that a solution is optimal, but we should have enough intuition now to get a good solution.

For your specific example with 4 disks of 120, 160, 200 and 250 GB. I suggest an LVM made up of 3 arrays:

  1. 4 partitions of 60 GB coming from each disk for an 180 GB array. Free space is now 60, 100, 140 & 190 GB from disks 1 through 4 respectively.
  2. 4 partitions of 60 GB coming from each disk for an 180 GB array. 0, 40, 80 and 130 GB free.
  3. 3 partitions of 40 GB coming from disks 2, 3 and 4 for an 80 GB array. 0, 0, 40 and 90 GB left-over.
  4. each array made up of 3 partitions. The first, second and third arrays have S_{j} = 50 GB and comes from disks 2, 3 and 4. This yields 100 GB in each array for a total of 300 GB. At this point there is 120 GB free in disk 1, 10 GB free in disk 2, 50 GB free in disk 3, and 100 GB free in disk 4. Now you can make another array with 3, 50 GB partitions coming from disks 1, 3 and 4, for a total of 400 GB in the LVM. Finally, you can take 10 GB from disks 1, 2, and 4 to add an additional 20 GB to the raid for a total of 420 GB. This leaves 60 GB free in disk 1, 0 GB free in disk 2, 0 GB free in disk 3 and 40 GB free in disk 4.

Re:I'm using something like that... (1)

MacJedi (173) | more than 8 years ago | (#14119323)

Please ignore item 4; It was scratch work that I forgot to delete! In any rate, with the 3 array LVM I outline above you get a total of 180+180+80 = 440 GB array with 40 and 90 GB left-over on two of your disks.

Re:I'm using something like that... (1)

marc_gerges (561641) | more than 8 years ago | (#14119920)

Thanks for the lead. I started with 40GB as 'ideal' size because it'll fit best into my disc sizes. I realized that even a 2 drive raid is ok, because it can still work - the more partitions, the better, though.

I put 3 4-drive partitions at 120GB each, 1 3-drive partition at 80, and a 2-drive partition at 40, with 50 left. Gets me 480GB usable out of 730.

I could even scale down to 20GB partitions - not to optimize usage, but to allow for smaller partitions which will help in extending/moving to another drive.

Now let's find out if Debian can boot from this setup...

Re:I'm using something like that... (1)

XeresRazor (142207) | more than 8 years ago | (#14122084)

Seems a rather roundabout way of doing it. The easy answer is to simply have a number of small partitions on each disk and use multiple partitions to split thing evenly. Say you've got a 80GB drive, 2 120GB drives, and a 200GB drive. Let's say we want to make 4 RAID volumes and then group them all into a single LVM volume. Dividing by 4 tells us each partition needs 20GB on the first drive, 30GB on the second and third drive, and 50GB on the fourth drive. 10 multiplies evenly into all of those drives so we simply create 10GB partitions on all the drives and then create each RAID volume from 2 partitions on drive A, 3 each on B and C, and 5 partitions on drive D. Only downside is you might have thrashing issues when the RAID is trying to read from multiple location on each drive. The alternative is to have several different sized RAID volumes all chained into the LVM, have 2 40GB/drive volumes that span all 4 discs, another 40GB/drive across all but the first disc, and a spare 80GB sitting on the final drive, not quite as space efficient but probably better for thouroughput.

Re:I'm using something like that... (1)

marc_gerges (561641) | more than 8 years ago | (#14122974)

Can't do that. The idea of a raid 5 is that one partition is allowed to fail without data loss. Soon as you put 2 partitions onto the same drive, losing that drive will make your raid fail.

If you don't care about that, easiest is to forget about the raid and go with LVM directly on the drives.

Re:I'm using something like that... (1)

swillden (191260) | more than 8 years ago | (#14119402)

Right now there's 4 drives in that computer - 120, 160, 200 and 250GB. By slicing them up to partitions and taking one partition of each drive into a raid, I'd get the same size than doing a single raid over all drives - a maximum of 3*120=360GB. Losing over half my current diskspace for redundancy.

Not really. You'd have 360GB in the RAID array(s), but you'd still have the other 40+80+130 = 250GB available to use in other ways. If you wanted to maximize your space, but have redundancy on as much of it as possible, you could use:

  • Four-disk RAID-5 across 120GB = 360GB
  • Three-disk RAID-5 across 40GB = 80GB
  • Two-disk RAID-1 across 40GB = 40GB
  • 50GB non-RAID.

That gives you a total of 480GB of storage with redundancy, plus 50GB non-redundant. The cost of the redundancy is 120+40+40 = 200GB. That's without a hot spare, obviously. Since all of your disks but the big one (which is going to be partially "wasted" anyway) are multiples of 40GB, I'd slice each into as many 40GB partitions as will fit. So if the disks are hda (120GB), hdc (160GB), hde (200GB) and hdg (250GB), I'd create:

  • md5 as RAID-5 of hda5, hdc5, hde5, hdg5 = 120GB
  • md6 as RAID-5 of hda6, hdc6, hde6, hdg6 = 120GB
  • md7 as RAID-5 of hda7, hdc7, hde7, hdg7 = 120GB
  • md8 as RAID-5 of hdc8, hde8, hdg8 = 80GB
  • md9 as RAID-1 of hde9, hdg9 = 40GB

If you wanted to use the 250 as a hot spare, you'd have:

  • md5 as RAID-5 of hda5, hdc5, hde5 = 80GB + spare hdg5
  • md6 as RAID-5 of hda6, hdc6, hde6 = 80GB + spare hdg6
  • md7 as RAID-5 of hda7, hdc7, hde7 = 80GB + spare hdg7
  • md8 as RAID-1 of hdc8, hde8 = 80GB + spare hdg8
  • md9 as RAID-1 of hde9, hdg9 = 40GB, no spare

That's a total of only 360GB but gives you double redundancy across most of it. Plus you'd still have the 50GB of non-redundant storage.

On my system, I have four 200GB drives and one 250GB, and I split them into 20GB partitions. Most of the partition sets are four-disk RAID-5 plus a spare, but I have one partition set that is linear RAID (no redundancy) and one that is mirrored (fully duplicated across five disks). That gives me 480GB of RAID-5, 150GB of non-redundant (including the extra 50GB from the bigger drive), and 20GB of highly-redundant storage. I created three volume groups, one for each redudancy level, and then carved out logical volumes as needed.

Fun stuff!

Re:I'm using something like that... (1)

dirtyhippie (259852) | more than 8 years ago | (#14123304)

If you do something like this, be *VERY* careful how you cut partitions up on disk.

Essentially, you are doing RAID-0 (striping, no redundancy) of RAID-5 blocks. This means that if a single Raid-5 block goes out (not partity rebuild, but failed), so does all the rest of your data.

What I do is simple do software Raid5, and when I need to expand, bring my computer and a new disk in to work, dump my data onto a big frickin disk array we have there, reformat the Raid5 with an extra disk, restore, bring home, viola.

What's better than either of our solutions would be to simply get a RAID5 card that supports array expansion - they're not hard to find, and even though expanding is slow as molasses, you're guaranteed to have a recoverable state at each point in the expansion process.

Re:I'm using something like that... (1)

swillden (191260) | more than 8 years ago | (#14124702)

Essentially, you are doing RAID-0 (striping, no redundancy) of RAID-5 blocks. This means that if a single Raid-5 block goes out (not partity rebuild, but failed), so does all the rest of your data.

Maybe I'm missing something, but what you're saying doesn't make any sense. How would one of the partition-based RAID-5 arrays fail? The exact same way a RAID-5 array that uses whole disks would fail: two failed hard disk drives. In either case, if you're doing RAID-5 of complete disks or multiple parallel RAID-5 arrays of partitions, the failure modes are identical... they're using the same disks in essentially the same way.

In order for the scenario you describe to be a problem, there would have to ba a way for one of the partition-based RAID-5 arrays to fail without a failure of the underlying drives. I don't know of any such failure mode, short of bugs in the RAID software, and those would seem to affect whole-disk arrays just as much as arrays of partitions.

Hmmm. There is one way... if you were stupid and built a RAID-5 array of partitions that weren't all on separate disks. But that would just be dumb.

What's better than either of our solutions would be to simply get a RAID5 card that supports array expansion - they're not hard to find, and even though expanding is slow as molasses, you're guaranteed to have a recoverable state at each point in the expansion process.

And that is *precisely* the case with the software RAID solution that I described. It is both slow as molasses, and you're guaranteed to have a recoverable state at each point in the expansion process. The last is true because of how 'pvmove' works. What it does is create an LVM mirror of the LVM physical volume which the data is to be moved off of. While it's working, both the source and the destination partitions are kept fully in synch at all time. When the mirror copy has been completely constructed, the mirroring is broken, leaving the source volume unused and the destination volume playing the source volume's role in the volume group. If someone kicks out the plug, pvmove will actually resume automatically when the system restarts, but if somehow everything went to hell the move operation can simply be aborted because the source volume remains fully up to date.

Servers don't reboot (2, Insightful)

ka9dgx (72702) | more than 8 years ago | (#14116930)

A file server has one job, to serve files, reliably. You shouldn't care what OS it uses, as long as it's stable. You definitely shouldn't be trying to run more than one OS on it. Get it up and running, and leave it alone.

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--

There is something new here... (1)

perfectlynormalbeast (221743) | more than 8 years ago | (#14116985)

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.

1 Word.... (0)

Anonymous Coward | more than 8 years ago | (#14117108)

XSERVE

VIA C3 (3, Interesting)

metamatic (202216) | more than 8 years ago | (#14117244)

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?

Re:VIA C3 (1)

Guspaz (556486) | more than 8 years ago | (#14117426)

Why use a Via C3 when you can use a ULV 1.2GHz Pentium M? They have a TDP of 5W, and I bet they're faster too.

Of course, there is also the regular LV Pentium M, which hits 1.5GHz at a TDP of 10W.

Re:VIA C3 (1)

metamatic (202216) | more than 8 years ago | (#14120170)

There are a lot more Socket 370 motherboards than Pentium-M motherboards.

Plus, why pay Intel prices?

Re:VIA C3 (1)

Guspaz (556486) | more than 8 years ago | (#14124711)

There are a lot more Socket 370 motherboards than Pentium-M motherboards.

True, though there are still Pentium M mini ITX motherboards, and of course the Asus adapter lets you use it in any Asus board.

Plus, why pay Intel prices?

Because Pentium Ms have much higher performance while drawing less power. The 1GHz C3 is three or four years old, it can't compete because it is simply out of date. Plus I have a hard time trusting Cyrix derived cores ever since the horrible Cyrix M2.

Yes, the Pentium M costs more, but if you want a CPU that is faster and draws less power, it may be worth the cost.

Re:VIA C3 (1)

Clover_Kicker (20761) | more than 8 years ago | (#14126466)

It's a file server. Why does he need a faster CPU?

Re:VIA C3 (1)

Guspaz (556486) | more than 8 years ago | (#14127057)

Because software RAID-5 sucks CPU cycles. Because he might want other services on the box.

And because the Pentium-M draws HALF the power of the C3 while it is busy being faster, and he wants a low power solution. 5W is a nice improvement over 11W, or whatever the C3 was.

Re:VIA C3 (1)

Clover_Kicker (20761) | more than 8 years ago | (#14130578)

Software RAID isn't going to be noticeable on a Pentium II, much less anything you can buy today.

Pray tell, what other services are going to require extra CPU power?

Re:VIA C3 (1)

Guspaz (556486) | more than 8 years ago | (#14131963)

Perhaps one would want to run a BitTorrent client on a machine. Some of the better clients such as Azureus are notoriously demanding on the CPU (and memory) front. Perhaps one might use it as a media server, which sometimes involves transcoding the video to a format supported by the output device (MPEG-2 or WMV).

You're also mistaken about software RAID's CPU usage. Doing some googling, one user reported a 5-disk RAID-5 array used 80% of the processing power of an Athlon 700 to do writes. The Cyrix 3 core isn't exactly screaming fast...

Anyhow, I was going under the assumption that the 1.0GHz C3 was the fastest processor. It turns out they actually go up to 1.4GHz.

And so the more important issue, which you're ignoring. Power usage. The ULV Pentium M has a TPD of only 5W, while the C3 at the same speed (1.2GHz) uses 17W. Or if you go for the C3-M, 12W.

Either way the Pentium M uses a fraction of the power. Considering the OP wanted a low-power solution, I think this is a fairly important factor.

Re:VIA C3 (1)

Clover_Kicker (20761) | more than 8 years ago | (#14135044)

> Perhaps one would want to run a BitTorrent client on a
> machine. Some of the better clients such as Azureus are
> notoriously demanding on the CPU (and memory) front. Perhaps
> one might use it as a media server, which sometimes involves
> transcoding the video to a format supported by the output
> device (MPEG-2 or WMV).

The question was about a file server. File servers usually don't have a mouse, much less a bittorrent client.

> You're also mistaken about software RAID's CPU usage. Doing
> some googling, one user reported a 5-disk RAID-5 array used 80%
> of the processing power of an Athlon 700 to do writes. The
> Cyrix 3 core isn't exactly screaming fast...

Meh. I've never had a problem. I'm sure I could contrive to stress software RAID on a workstation, but we're talking about a file server, serving files across a 100BaseT LAN at most, maybe even wireless. The bottleneck is the wire, not the disk, not the CPU.

> And so the more important issue, which you're ignoring. Power
> usage.

The Via is low-power enough for most people. You're ignoring the price of CPUs and motherboards.

Re:VIA C3 (1)

metamatic (202216) | more than 8 years ago | (#14159024)

A VIA C3 1GHz on an EPIA-M board can happily run Azureus without significant CPU load. Been there, done that. As for video, it has hardware MPEG-2 acceleration and SSE. There's a reason why so many people use EPIA-Ms for MythTV.

I run Linux 2.6 software RAID-5 on systems with Pentium II 200MHz CPUs, and stick GB-sized databases on top, all on ReiserFS. The guy whose Athlon couldn't cope was clearly doing something wrong.

12W is low power in my book. Sure, maybe a Pentium-M can do it in 5W, but the price difference will buy an awful lot of electricity.

Re:VIA C3 (1)

metamatic (202216) | more than 8 years ago | (#14158949)

I'd rather buy from VIA, who provide open source drivers for their hardware, than Asus, who are disparaging about open source.

Given that a Pentium II 200MHz can handle RAID-5 without pulling a sweat (I have some seriously obsolete servers running at work), CPU speed really isn't much of an issue for me.

As for the C3 being out of date, well, yes, that's why there's the VIA C7, which looks like it may leapfrog the Pentium-M in CPU power per watt. http://www.viaarena.com/default.aspx?PageID=5&Arti cleID=402 [viaarena.com]

Cooling has been my biggest concern... (1)

RandomJoe (814420) | more than 8 years ago | (#14117423)

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.

If money is no object.... (1)

BeeazleBub (535448) | more than 8 years ago | (#14117526)

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 [littlepc.com] these guys have some interesting low voltage, and fanless systems that could serve the basis a good home server system.

go for hardware (1)

Sarin (112173) | more than 8 years ago | (#14117598)

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 [infrant.com]

Re:go for hardware (1)

ridefst (926012) | more than 8 years ago | (#14137241)

I've been looking for a readymade solution to this problem for a little while, the best I've found has been the Infrant products. They aren't the most attractive pieces, but check out some of the reviews on them!!

hmm (5, Informative)

GigsVT (208848) | more than 8 years ago | (#14117619)

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.

Re:hmm (1)

00110011 (917752) | more than 8 years ago | (#14117942)

It also helps to verify that the backups you made actually work. Some people tend to make backups and don't test if it works, until they need them, and end up finding out that their backups weren't any good.

Re:hmm (2, Informative)

Homology (639438) | more than 8 years ago | (#14118579)

I'm surprised no one has mentioned that RAID5 is no replacement for backups.

Indeed. In RAID options for OpenBSD [openbsd.org] you see the following warning:

While a full discussion of the benefits and risks of RAID are outside the scope of this article, there are a couple points that are important to make here:

* RAID has nothing to do with backup.
* By itself, RAID will not eliminate down-time.

If this is new information to you, this is not a good starting point for your exploration of RAID.

Re:hmm (1)

bill_mcgonigle (4333) | more than 8 years ago | (#14119243)

* By itself, RAID will not eliminate down-time.

That's simply misleading.

Nothing can eliminate downtime. Even if you have backups, restoring from backup means something is wrong, ergo, downtime.

RAID, by itself, does reduce downtime. It's simply not sufficient for error-proof data integrity.

Re:hmm (1)

Clover_Kicker (20761) | more than 8 years ago | (#14119397)

> That's simply misleading.

Maybe, but some people have a gigantic hard-on for RAID and think it magically solves all reliability problems. Skim any thread here about storage, you'll see a mystical faith in the awesome power of RAID.

Check LinkSys NSLU2 (2, Informative)

Frodo420024 (557006) | more than 8 years ago | (#14118233)

Given that low power and backup are the main purposes, I suggest you take a close look at the LinkSys NSLU2 [linksys.com] . It takes two external USB2 drives and provides Samba shares for them. It'll automatically pull backups from your network, then back up one of the drives to the other. If you use laptop (2½") drives with the unit, it can supply enough power to them, and the whole setup will use less than 10 watt total. Takes less space, too.

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 [nslu2-linux.org] . :)

LinkSys NSLU2 and EFG250? (1)

davecb (6526) | more than 8 years ago | (#14118993)

What about the EFG250, described at http://www1.linksys.com/products/product.asp?prid= 656&scid=43 [linksys.com]

I don't see it mentioned at nslu2-linux.org, is it based on the same hardware and firmware?

--dave

Re: LinkSys NSLU2 and EFG250? (1)

Strolls (641018) | more than 8 years ago | (#14120635)

It's certainly based on Linux, and is mentioned on at least one of the NSLU2 enthusiast websites. A customer of mine chose the EFG because it's a single box, and that appeared neater, but it's actually quite a chunky-sized box and its fan produces a surprising amount of noise. My customer chose to spend about £100 more on their EFG than they would have done on a NSLU and two USB drives, but they end up often turning it off because of the noise. As long as they remember most days to turn it on for their scheduled backup then that's fine & dandy, but I suspect they don't - I kinda think they would have done better with the NSLU.

Re: LinkSys NSLU2 and EFG250? (1)

davecb (6526) | more than 8 years ago | (#14120989)

Much appreciated!

--dave (who will avoid it) c-b

Get a Buffalo (2, Interesting)

eyepeepackets (33477) | more than 8 years ago | (#14118318)

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/ [buffalotech.com]

RAID vs NAS (1)

denissmith (31123) | more than 8 years ago | (#14118695)

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.

Synthesis from /. + new advice (2, Informative)

advid.net (595837) | more than 8 years ago | (#14118719)

See this journal [slashdot.org] for information about this topic, gathered on slashdot.

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 [sourceforge.net] 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 [slashdot.org] .

Re:Synthesis from /. + new advice (1)

Guy Harris (3803) | more than 8 years ago | (#14126000)

With journaled FS (recommended) disks will spin up every 10mn or so, after some tuning.

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?

Re:Synthesis from /. + new advice (1)

advid.net (595837) | more than 8 years ago | (#14131314)

Why? I still wonder.
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

/dev/hdd10 /mnt/src ext3 defaults,noatime,nodiratime,commit=600 1 2
(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!!!

Mini ITX + linux + software RAID (1)

xtal (49134) | more than 8 years ago | (#14119034)

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.

Backup (2, Insightful)

fjf33 (890896) | more than 8 years ago | (#14119078)

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.

What I Do (1)

finkployd (12902) | more than 8 years ago | (#14119584)

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

Re:What I Do (1)

Jose (15075) | more than 8 years ago | (#14120519)

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.

that is a pretty good solution..but it might not fit the submitters "low-power" constraint :P

Re:What I Do (1)

finkployd (12902) | more than 8 years ago | (#14121808)

I need to look in the manual how much wattage the e450 takes up in various configurations (it actually has a ton of tables and data on that). I can say that it has not noticeably affected my power bill.

Finkployd

Re:What I Do (1)

larien (5608) | more than 8 years ago | (#14123254)

I used to run an E450 at a previous job with software RAID-5 in it. With UFS logging enabled, it ran pretty well with a 10-way RAID-5 with 9GB disks. That was with Solaris 7; it should be better on later versions of the OS.

As for the other comments about power, from the handbook [sun.com] :
Maximum Power Consumption 832 Watts

So, fairly hefty power draw...

Why RAID5, just replicate data (1)

puhuri (701880) | more than 8 years ago | (#14119626)

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 [monoprice.com] , 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.

Re:Why RAID5, just replicate data (1)

bhiestand (157373) | more than 8 years ago | (#14123645)

Be careful with USB and firewire-attached hard drives. Find the controller chip in the product you're attempting to buy and make sure to do proper research into it. A lot of controllers, such as the Prolific Logic PL-3507, have terrible problems which include delayed write failure errors and eventual loss of file tables. There are firmware updates for some of these chips, but I'm still scared shitless of using them again. I've lost three hard drives on USB 2.0 and 1394 controllers, and I was never able to recover the data from the first one.

File server as a router (1)

eap (91469) | more than 8 years ago | (#14123874)

Since this is only going to be serving a few machines (and maybe doing router/gateway duty)

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.

Re:File server as a router (1)

nachoboy (107025) | more than 8 years ago | (#14126321)

For me, a low power, quiet, 486DX266 running OpenBSD has worked well for the past 5 years as a firewall.

Without sounding snarky or sarcastic, why do you do this? I bought a $40 wireless router a couple years ago and use its built-in firewall with great success. The thing is about the size of 2 packs of cards, has no moving parts, and the 4 LAN ports are perfectly suited to connect my home server, desktop, media PC, and printer. Granted, I only use about half a dozen firewall rules (in addition to a few individually forwarded ports for remote access to various services), but do you really do anything on that box that couldn't be accomplished with a cheap broadband router, or is it just the geek factor kicking in?

Re:File server as a router (2, Interesting)

cr0sh (43134) | more than 8 years ago | (#14133472)

I won't pretend to answer for the parent, but I have a similar system to his. My firewall is a Pentium 90 underclocked to 60 MHz with 8 meg (probably overkill), a floppy and no hard drive. Two NICs and a copy of FreeSCO. So far it has served me well. But your question is a common one. So, why do I use it, instead of a commercially available router/firewall thingie?

Well, I initially did it because I had the parts laying around, and those routers at the time (> 5 years ago) cost a tad more than they do now. So, it was a question of free vs. $$$, and free won the day (and $$$ went to groceries for my family). One could argue that the smaller box might have saved me money from electricity usage, but I doubt my box is using that much anyhow - probably less than 20 watts total, but I have no way to verify that currently. I do know that the switching power supply in it is more efficient than the cheapo iron-core saturated AC wall wart that comes with most commercial routers, but all in all they probably both consume the same wattage. I did have longevity and power considerations in mind when I built it though, which is why it was underclocked. I once opened it for cleaning, and noticed the fan had stopped turning, but it was still running fine, so it isn't pushing anything.

I also like the fact that I can easily modify it however I want. I can add more NICs, or alter the distribution to add other extras to it - or swap out the distribution altogether for another floppy-based distro if I want. I am not limited in the number of ports I can use - just slap a larger switch on the inside NIC. If I ever needed 802.11x, a wireless NIC could be set up as an AP.

Really, the only thing I don't like about it is its size. But, it would be in the junkyard if it wasn't being used as a firewall, so I spare it the fate. Also, I am lazy when it comes to changing something that just works and does its job (and does it extremely well, I might add - it has been a very reliable unit all these years). Finally, if I got a different router/firewall, I would need to have my broadband provider (COX) reprovision my cable modem, since the MAC address would be different (of course, if that outbound NIC ever failed, I would have to do this as well). They might want me to explain myself - who knows, they might even want to kick me in the nuts with the AUP (you are running a network instead of a single machine - you must buy extra static IPs to do so or move to a business account - I can see COX doing this - really).

So - I stick with what works and has worked over the past mumble years - why fix what isn't broken?

Re:File server as a router (1)

nachoboy (107025) | more than 8 years ago | (#14135460)

So, it comes down to a mixture:

because I had the parts laying around
those routers ... cost a tad more than they do now
I can add more NICs
alter the distribution to add other extras to it


I'm not really counting the following reasons, because they do not present any advantage or difference over a wireless broadband router:

I am not limited in the number of ports I can use - just slap a larger switch on the inside NIC (you could plug that same switch into a LAN port on a home router)
a wireless NIC could be set up as an AP (already included in most cases)
if I got a different router/firewall, I would need to have my broadband provider (COX) reprovision my cable modem, since the MAC address would be different (all the routers I've seen offer the ability to set the WAN MAC address to whatever value you want, for just such scenarios where you need to "pretend" you're using a different NIC).
They might even want to kick me in the nuts with the AUP (if you really are violating the AUP by networking machines, your choice of routing hardware is unlikely to mitigate that violation)

I'll conclude the answer is a little bit of geek factor and a lot of inertia. Thanks for replying!

Re:File server as a router (1)

cr0sh (43134) | more than 8 years ago | (#14143224)

Believe me, I have thought about getting a broadband router, especially since they are now so cheap. All of your points are valid. However, every time I almost decide to do so, I take a look at my box I built and say to myself "Why?". Partly because, as I have noted, I am lazy, but also partly because what I have works - it does the job I have it do, it does it effectively and well. Once again, why fix something that isn't broke? Buying a broadband router would entail spending extra money ($30 - $40 I could use for something else most likely - being a homeowner that could mean a lot of things), likely cause me some network downtime and maybe pulling of some hair (changing out the router should be a simple thing - but I have seen so many supposed simple things turn into nightmares quickly), and in the end, I would end up with the same exact setup, albeit in a smaller form factor, maybe using less power.

That just doesn't make sense to me. It is like going through the trouble and work changing a faucet that doesn't leak "just because the new one is new". Once again, why fix something that isn't broken?

I figure one of these days I will find something that makes me change it out. Likely, I will get tired of having to shut it down every 6 months to a year to clean it. Or, fixing/replacing fans (power supply and CPU). Maybe the floppy drive will die, and that will do it. But until then, I will likely keep my homebuilt box...

My setup... (1)

cr0sh (43134) | more than 8 years ago | (#14133708)

I currently have a setup, that while it doesn't meet your needs for low power, and isn't a RAID'ed system, has been fairly reliable, considering its location in my home.

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...

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?