Skip to contentSkip to conversation

raid0 + raid1 question

DISCUSSION anthony mayes 4 participants 5 messages Oct 8, 2003 – Oct 10, 2003 MD RAID

lore
Share & tools
lore
#0 lore raw

I have 7 disks in an x86 box. I want to have 2 raid0's (concatenations) of 3 disks each. Then I want to raid1 (mirror) the raid0's. This leaves 1 disk for the OS.

Is it possible to remove one of the raid0's (concatenation of 3 disks) from the raid1 (mirror)?

I need to perform a backup while a highly visible application continues to run. Currently I am using Disksuite on a Solaris 8/SPARC platform with the afore mentioned configuration. First the mirror is broken and half of the mirror is mounted as another filesystem while the application continues to run on the other half of the mirror. The backup is performed and then the mirror is resync'ed. However, I want to move to x86 and linux and need to know if the same is possible and how to do it. Does anyone have any experience / advise?

Signature · 4 lines
Anthony Mayes
UNIX Server Administration
Southern Illinois University Edwardsville
[email protected]
#1 lore raw
Quoted 3 lines · anthony mayes

I have 7 disks in an x86 box. I want to have 2 raid0's (concatenations)
of 3 disks each. Then I want to raid1 (mirror) the raid0's. This
leaves 1 disk for the OS.

That is a suboptimal allocation and will actually increase the likelihood of failure. What you want to do is to have 3 raid1's of 2 disks each and to concatenate these 3 via raid0 or LVM.

And why are you not placing the OS itself on a RAID too? If the system goes down, so will your application.

Quoted 6 lines

with the afore mentioned configuration. First the mirror is broken and half of the mirror is mounted as another filesystem while the application continues to run on the other half of the mirror. The backup is performed and then the mirror is resync'ed. However, I want to move to x86 and linux and need to know if the same is possible and how to do it. Does anyone have any experience / advise?

You should concat the 3 raid1's via LVM and use LVMs snapshot facility. (Google for the howto)

Mit freundlichen Grüßen,
Lars Marowsky-Brée <[email protected]>

Signature · 8 lines
High Availability & Clustering		ever tried. ever failed. no matter.
SuSE Labs				try again. fail again. fail better.
Research & Development, SUSE LINUX AG		-- Samuel Beckett

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to anthony mayes

We actually used to backup our data in this fashion, but we used a triple mirror. We had three hardware RAID arrays and then we used Linux software RAID to mirror those three (i.e. /dev/hdc1, /dev/hdd1, and /dev/hde1). At night we used mdadm to break the mirror, mount the removed partition and backup, and then add the partition back in and re-mirror.

One thing to remember: if this application is database driven, you may have inconsistencies in your data if the database is in the middle of a transaction when the mirror is broken.

Our current Linux backup solution uses LVM on top of a Linux software RAID10 array. We suspend the database application long enough for all transactions to complete and then use Linux LVM to snapshot the volume. We then resume database operations, mount the snapshot and copy it to another RAID array. Once completed I remove the snapshot and the static disk partition is backed up to tape.

The database is unavailable for less than 1 minute while the snapshot is taken (it actually takes less than 10 seconds to snapshot ~360GB, the other time is just the script sleeping, making sure all transactions complete). This solution ensures a consistent database, while also having near-line backups available on disk.

So to answer your question, yes Linux can perform what you need. There are plenty of tools that make Linux more than up to the challenge. I recommend using mdadm for your software RAID management and Linux LVM (it comes standard in most new kernels and Linux distros) to do snapshots.

Here are some links:

http://tldp.org/HOWTO/LVM-HOWTO/
http://www.cse.unsw.edu.au/~neilb/source/mdadm/

If you have further questions, feel free to email me.

Regards,
Andy.

Quoted 15 lines · anthony mayes

I have 7 disks in an x86 box. I want to have 2 raid0's (concatenations)
of 3 disks each. Then I want to raid1 (mirror) the raid0's. This
leaves 1 disk for the OS.

Is it possible to remove one of the raid0's (concatenation of 3 disks) from the raid1 (mirror)?

I need to perform a backup while a highly visible application continues to run. Currently I am using Disksuite on a Solaris 8/SPARC platform with the afore mentioned configuration. First the mirror is broken and half of the mirror is mounted as another filesystem while the application continues to run on the other half of the mirror. The backup is performed and then the mirror is resync'ed. However, I want to move to x86 and linux and need to know if the same is possible and how to do it. Does anyone have any experience / advise?

Signature · 3 lines
Regards,
Andrew Rechenberg
Infrastructure Team, Sherman Financial Group
#3 lore raw
Quoted 7 lines · Andrew

We actually used to backup our data in this fashion, but we used a triple mirror. We had three hardware RAID arrays and then we used Linux software RAID to mirror those three (i.e. /dev/hdc1, /dev/hdd1, and /dev/hde1). At night we used mdadm to break the mirror, mount the removed partition and backup, and then add the partition back in and re-mirror.

Exactly what we do now.

Quoted 6 lines

The database is unavailable for less than 1 minute while the snapshot is taken (it actually takes less than 10 seconds to snapshot ~360GB, the other time is just the script sleeping, making sure all transactions complete). This solution ensures a consistent database, while also having near-line backups available on disk.

I'm assuming the snapshot it the same size as the FS to backup. What if you don't have enough disk space to do this?

Signature · 4 lines
Anthony Mayes
UNIX Server Administration
Southern Illinois University Edwardsville
[email protected]
#4 lore raw
Quoted 2 lines · anthony mayes

I'm assuming the snapshot it the same size as the FS to backup. What if you don't have enough disk space to do this?

Nope, otherwise it would take a lot longer than 1 minute to make a snapshot of a 360GB filesystem :-)

The snapshot is just a "holding area" to record the original disk blocks for anything that gets changed after the snapshot is created. It only needs to be big enough to hold the amount of data that you expect to change while it exists. In the case of using this do to backups, if you can copy the snapshot to another disk array in an hour, then the snapshot only needs to be big enough to hold an hour's worth of changes; if that hour is 3-4AM, when your system is otherwise idle, the snapshot can be pretty small.

If you make the snapshot and then backup the snapshot to tape, and it takes 6 hours to make the tape backup, obviously the snapshot would have to be bigger. It's not unheard of for people to make 10GB snapshots of 1TB filesystems and never even use all 10GB before they throw the snapshot away.