PDA

View Full Version : Which raid?



marinoni
2009-03-13, 15:17
Anyone have any thoughts regarding number of drives and which raid to use?
I am currently using 1 x 1Tb drive...thinking of switching to either 2x 1Tb drive and raid 1 ..or 4 x 750 Gb drives and raid 5..
All drives are sata 2, computer is core 2 duo @ 3.1 Ghz/core, 4 gig ram.

SuperQ
2009-03-13, 16:46
2x 1T raid 1 is probably a better solution. Mirroring is much easier to deal with. But for a home server, it might be better to just use an external USB drive and do drive to drive backups.

agillis
2009-03-13, 18:05
RAID is not a good backup solution. If you need more space you can span your music storage partition access several drives. Backups should always be done to another box or a USB disk that can be powered off and disconnected to prevent damage from power hits.

95% of failures to PCs are caused by excess heat buildup or electrical surges. Both of these will take out more than one disk in your RAID array.

pfarrell
2009-03-13, 18:24
agillis wrote:
> RAID is not a good backup solution.

Sorry, I have to change this:

RAID is not backup. Period.
When you have valuable media or data on your disks, you have to have
backup. And RAID is not backup.

I've never seen any value to RAID for a SqueezeCenter server. I find it
easier to just buy a $100 disk at my local computer store, connect it,
copy the music, and disconnect it. Do this every six months or so.

RAID solves some problems, but none that a typical SqueezeCenter server has.



--
Pat Farrell
http://www.pfarrell.com/

marinoni
2009-03-14, 08:12
The problem is exacerbated by the size of the music collection...630 Gb at present. I used to have it spread over several 500 Gb drives - then 1Tb drives became cheap enough..so I have one internal and one in a usb external as backup..but its a pain to copy new music to external on a regular basis. Copying to dual layer DVD's is not reasonable...thats how I arrived at raid 1 or 5 as being solutions to both issues - adequate storage and backup..and I still have another 100 or so CD's to rip to flac and tag.

jsprag
2009-03-14, 08:51
I'm in agreement that RAID 1 or 5 is not the right answer. These technologies are intended to provide high availability of data. Relying on them for protection against data loss and as a substitute for backups is a mistake.

I maintain two backups. The first is the weekly backup to an external drive that I pull out of the safe, plug into the computer, and then place back in the safe.

But because I'm doing daily changes to tags, artwork, ratings, playlists, etc... I also want to mitigate the chance I'll lose a week's worth of work. So I have another backup routine that automatically syncs everything to a second internal drive on a nightly basis.

To me this is a far better use of two drives than making a RAID 1 array.

marinoni
2009-03-14, 08:59
I like the idea of how you do that - 2 backup drives - each for its own purpose..Ok..so this is going to require more thought

epoch1970
2009-03-14, 10:28
I don't think I read the type of OS you're using. But under linux or NTFS for windows you'd have no problem mounting drives to directories, achieving the effect of a huge file hierarchy without taking the risk of building a huge block device (as raid, LVM ... do.) Each drive can break individually.

For backups a background task, possibly using rsync should do the job.

I use a backup server, backuppc.sf.net; that would deliver more daily, monthly ... full or incremental backups you've ever dreamt of. Very good stuff, and cross platform.

ncarver
2009-03-15, 08:25
Just to post a somewhat contrary opinion...

Drives do just fail. I had a 750GB Seagate drive fail out of the blue two months ago, and had not been as good as I should have backing it up, so ended up spending many, many hours recovering some email from it, and ended up having to recreate a bunch of MP3s. Had it been a RAID1 setup, I would have been much better off. I in fact do have Linux RAID1 setup on my Squeeze server machine, which we use to store music, photos, backups, etc. Having RAID1 does protect you against random disk failures, and it is so simple to get set up, it is just basically the cost of an extra drive.

That being said, you cannot just use RAID1 and do no backups. I have two external drives that are used to make backups of the RAID disks, and one is always kept at my office in case of fire, etc. If you have an extra $100+, then I would suggest both RAID1 and an external drive or two.

Regarding backups to separate drives on same machine...while I do this frequently on various of my machines, I also once had a machine whose motherboard went bad and it corrupted all the mounted filesystems (including the one on the separate disk). So this approach certainly does not relieve you from doing backups to external drives (or different machines).

You should also have good quality UPSs on your machines to protect against power issues (and have auto shutdown set up). I have never had a machine or drive on a UPS-protected machine fail due to power issues.

epoch1970
2009-03-15, 10:56
I also once had a machine whose motherboard went bad and it corrupted all the mounted filesystems (including the one on the separate disk).
Interesting.
The drives were mounted by the OS, or simply on-line in the electrical sense ?
(Generally I won't keep a backup volume mounted once the copy is done; too many times I erased the backup and the original...)

ncarver
2009-03-15, 16:50
Interesting.
The drives were mounted by the OS, or simply on-line in the electrical sense ?
(Generally I won't keep a backup volume mounted once the copy is done; too many times I erased the backup and the original...)

I said "mounted filesystems," so they were mounted. In fact, the backup partition on the second drive was corrupted while doing a backup. So unmounting it after the backup would not have done any good. :)

I think that mistakenly deleting files is one of the dangers of RAID being used for at least temporary backups. I have a script that removes write permissions from all directories and files, which gets run after things are added to the RAID volume. Kind of a pain, as backup scripts have to first restore write permission and then remove again afterward. However, keeps me from accidentally deleting something important (which I did once!).

jsprag
2009-03-15, 18:13
I think that mistakenly deleting files is one of the dangers of RAID being used for at least temporary backups.

It bears repeating - RAID is not backup. Not even "temporary" backup. Backup means having another set of data independent of the first. You don't get this from RAID. I don't mean to sound patronizing - It's clear to me that you understand this, but I worry that others reading might not.

Mistaken deletions are the main reason I don't like RAID for my situation. Loss of data is far more likely to come from fat fingering than it is from hardware failure. My nightly rsync to another internal HD gives me at least a few hours to detect and undo any mistakes before they propagate to the second drive. With RAID I get no such grace period.

cdmackay
2009-03-15, 18:31
jsprag wrote:
> Mistaken deletions are the main reason I don't like RAID for my
> situation. Loss of data is far more likely to come from fat fingering
> than it is from hardware failure.

Right, and RAID mirroring isn't generally trying to minimise data loss,
it's trying to maximise uptime.

Your rsync gives you something that RAID mirroring doesn't: a window to
detect user error.

RAID mirroring gives something that your rsync doesn't: the ability to
survive disk failure without any loss of availability.

Different goals.

A nice combination might be provided by using the ZFS filesystem, if
you're on Solaris/OpenSolaris (or MacOS). Mirror the disks for
availability, and use ZFS's snapshot facility for protection against
fat-fingers, and even better without having to dedicate twice the disk
space to do it (like rsync does).

That's how I'll be running SC on my new system...

cheers,
calum.

jsprag
2009-03-16, 17:39
Your rsync gives you something that RAID mirroring doesn't: a window to
detect user error.

RAID mirroring gives something that your rsync doesn't: the ability to
survive disk failure without any loss of availability.

Different goals.

Good summation. The two aren't mutually exclusive, of course. If a user wanted they could have RAID mirroring, another internal drive for nightly (or any other interval) backups, and an external backup. Starts to add up to a lot of drives though...



A nice combination might be provided by using the ZFS filesystem, if
you're on Solaris/OpenSolaris (or MacOS). Mirror the disks for
availability, and use ZFS's snapshot facility for protection against
fat-fingers, and even better without having to dedicate twice the disk
space to do it (like rsync does).

That's how I'll be running SC on my new system...

cheers,
calum.

Interesting thought. Not that familiar with Solaris or ZFS but might be worth looking into.

cdmackay
2009-03-17, 04:08
jsprag wrote:
> Good summation. The two aren't mutually exclusive, of course. If a
> user wanted they could have RAID mirroring, another internal drive for
> nightly (or any other interval) backups, and an external backup.
> Starts to add up to a lot of drives though...

quite.

This is why I like ZFS.

[I ought to declare an interest, as I work for Sun; then again, it's all
open-source, so... :)]

> Interesting thought. Not that familiar with Solaris or ZFS but might
> be worth looking into.

I recommend having a look; try downloading the latest OpenSolaris live
cd and having a play.

ZFS is a copy-on-write filesystem, so snapshots are implemented very
naturally. When you take a snapshot, all that happens is that future
writes to a particular block of a file are redirected, and the original
block is kept for the snapshot, the new block for the "real" filesystem.
It's possible to have thousands of snapshots. Very space efficient.

The GNOME file-manager has an extension to browse the data in snapshots
- which can also be accessed directly - via the "time slider", in
practice very much like MacOS Time Machine, but integrated into the
filesystem.

ZFS also provides various levels of RAID, including striping, mirroring,
and two levels of efficient versions of RAID5 (RAIDZ, RAIDZ2), without
any need for a separate volume manager.


There are SC build instructions for OpenSolaris on the wiki, and I'm
looking towards making an unofficial nightly build regularly available,
in the OpenSolaris IPS pkg format.

cheers,
calum.