Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server (Dell PowerEdge 2950) with a PERC 6/i and six disks. Two of the disks are in a RAID-1 with a third as a hot spare. I have been asked to make a copy of the RAID-1 data on one of the other disks in such a way that we can store the disk offline and, if needed, boot the system from the offline disk. I also need to be able to periodically update the offline disk while the system is running. (This disk would be part of our disaster recovery and would also serve as a "last known good" disk in case of something going drastically wrong with the server.)

My instinct is to partition one of the extra disks to match the RAID-1's partitioning, then mount the partitions, rsync over the data and put GRUB on the disk, but I cannot figure out how to configure the PERC 6/i's RAID to get this to work. If I create and then remove a RAID with the to-be-offlined disk, all of the data is deleted when the RAID is removed. If I create a RAID and just remove the disk, the controller becomes very sad. Since we're using RAID for the system disks, it doesn't look like there's a way to access one of the other disks without making it part of a RAID. Is there a way to do what I want?

I'm running Linux (RHEL 5) and using Dell's OMSA CLI programs (omreport and omconfig).


I felt that my question was mostly about how I could get the PERC 6/i to do what I want. In the absence of any pointers about that and based on the fact that I don't see a way forward from my reading of the documentation, I'm going to bypass the RAID controller and put my bootable system copy on a USB disk. This will supplement our RAID and tape backups and serve as a quick response to a few failure scenarios that would otherwise require downtime while restoring the system from tape.

share|improve this question
    
This is hardware RAID? No mdadm/mdraid involved? –  Hauke Laging Feb 26 '13 at 16:42
    
Yes, hardware RAID. –  asciiphil Feb 26 '13 at 18:47
    
I was going to suggest the kludge of a 3 disk RAID 1, but it seems that the PERC6/i does not support that. ( Source of supported modes: dell.com/Learn/us/en/555/campaigns/… ) –  Hennes Feb 26 '13 at 18:56
add comment

2 Answers

Repeat after me: "RAID is NOT a backup system."

What you are trying to do is NOT the way RAID is intended to be used.

Can you do it? Sure:
You can mirror the RAID-1 (RAID 1+1 - a mirror of the mirror), and remove half of the top-level mirror set. As you've surmised the controller will be "very sad" when you do this as the RAID is now degraded (half the mirror is gone), and it's going to have to rebuild when it gets new disks.
All those rebuilds increase the chance of an unrecoverable error on the bottom-level mirror, which can eventually leave you in a situation where your rebuild caused you to knock your server offline and lose data.

Also note that if you lose your primary hardware there's no guarantee you can recover those disks in another machine: If you don't have a controller with the same firmware revision you may have a set of disks that are only useful after spending a few grand on a data recovery company to get your data back off of them.

Similar challenges & risks exist if you're using mdraid or other software RAID tools.

Bottom line: This is a BAD Idea. Don't do it.


What should you do instead?

Spend the time to do a proper analysis and deploy/test a backup system and proper disaster recovery plan instead. There are plenty of excellent backup tools for Linux that are specifically designed for this kind of work (Bacula is a popular choice, and there's even a whole section of the Bacula manual dedicated to bare metal we-lost-everything-but-the-backup-tapes restores).

share|improve this answer
1  
I have always understood "RAID is NOT a backup system." as "RAID does not replace a backup." What he is going to do is not RAID. It's a backup, an image backup. He just happens to backup a RAID system. –  Hauke Laging Feb 26 '13 at 19:36
    
@HaukeLaging RAID is not a backup system of any shape, size, kind, manner, or mechanism. That's simply not its purpose. You can drive a nail with a screwdriver but it's still the wrong tool for that task. What he's trying to do is WAY beyond what RAID is intended to do, with a whole host of problems that he won't have if he uses a proper backup system for his backups. –  voretaq7 Feb 26 '13 at 19:40
    
I'm not trying to use RAID as a backup system. I'm trying to make a backup disk that I can keep in cold storage. My problem stems from the fact that I'm also using RAID, which complicates my ability to use the drive bays in my server as a mechanism for making that backup disk. –  asciiphil Feb 26 '13 at 19:45
1  
@asciiphil I understand what you're trying to do - I'm telling you your approach to solving this problem is wrong (or at least very sub-optimal and failure-prone). There are tools specifically designed to do what you want, and you should use them. –  voretaq7 Feb 26 '13 at 19:53
    
I have been asked to make a disk that we can boot from if both of the system disks are unavailable (either from hardware failures or security compromise), with the goal of getting the server up and available faster than our tape-based backup system's bare-metal restore can. Telling me "RAID is not a backup system" seems a very odd way of saying my approach to solving that task is wrong, since that task is more or less orthogonal to our RAID setup--they intersect only because I need to go through the RAID controller to get Linux to see my disks. –  asciiphil Feb 26 '13 at 20:11
add comment

As voretaq7 correctly points out: "something going drastically wrong with the server" includes the loss of the controller. So if you don't go the "official" desaster recovery way he suggests then it would make sense IMHO to copy the contents of the hardware RAID to a software RAID (so that you can easily add a second disk for mirroring while getting a replacement for the hardware). This means that the target disk must be a few sectors bigger than the source disk. And maybe the boot loader configuration cannot be simply copied; depends on your partitioning. But you can reinstall Grub on the backup disk before you need the backup disk. In that case you should ensure that both your controllers module and mdraid are part of your initrd. Just try to boot the backup disk after you're done.

share|improve this answer
    
There are some gremlins in this approach too (though not nearly as many as trying to do it with hardware RAID) - If you go this route you need to be sure that the drive you're mirroring to is not part of a (hardware) RAID volume (which may mean you can't hot-swap them on some controllers - not sure about PERC 6). You're still forcing a RAID rebuild at every disk swap though which is abusive to the disks and kills performance... –  voretaq7 Feb 26 '13 at 19:56
    
Yes, I understand the general considerations of copying the data to another disk or disks. The question I'm asking is a little more specific: How can I configure the PERC 6/i to let me get a disk that I can take out of the server and reuse later if I need to? –  asciiphil Feb 26 '13 at 19:57
    
@voretaq7 There would not be a RAID rebuild. He would copy data from a hardware RAID to a (degraded, one disk only) software RAID on file system level (not block level). But you point out something important: The backup disk should not be connected to the RAID controller. I hope there are regular SATA ports on the board. –  Hauke Laging Feb 26 '13 at 20:01
    
@HaukeLaging In order to maintain the software RAID you would be mirroring two disks (the HW RAID volume and the target disk that's going to be pulled). When the target disk is removed and replaced mdraid or its equivalent will rebuild the "degraded" software RAID to restore it to a healthy (normal, redundant) state. This means a LOT of reads from the HW RAID volume, and a lot of writes to the target disk, just as it would for HW RAID. –  voretaq7 Feb 26 '13 at 20:12
    
@voretaq7 A rebuild is possibly with mirror hardware only: He boots from CD and sees the hardware RAID (/dev/hwraid-0) and the target disk as /dev/sdc. The he creates a degraded software RAID-1 (/dev/md0) from e.g. /dev/sdc3. He mounts /dev/hwraid-0 and /dev/md0 and starts rsync (cp -a makes more sense for the first run). After that he unmounts everything and reboots. The main installation know nothing about that. If he updates the backup later there will be only one disk again so no rebuild. Just in case of a big crash when he boots the rescue disk and adds another a rebuild would occur. –  Hauke Laging Feb 26 '13 at 20:21
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.