Setting up RAID volumes with Solaris Volume Manager

May 18, 2005, 09:24 AM —  ITworld.com — 

Imagine you've just received shipment of a new Sun server, pre-installed with Solaris 9 and ready for setup as a web server for your small company. Now imagine that you want to take advantage of Solaris Volume Manager (previously called DiskSuite) to configure your new server to be resistant to disk failures. How do go about configuring the system and how do you set up its disks to provide fault resistent data storage?



One choice is to set up your application partition as a RAID 5 volume. Why might you want to use RAID 5? Well, RAID 5 allows your system to continue running when any one of its component disks or partitions fails. It does this by calculating parity values that allow it to reconstruct the content of any single disk that might fail from the content of the other volume components.



RAID 5 works by computing parity values -- usually generated using a series of simple XOR calculations. On a four-disk RAID 5 volume, four pieces of data would be XORed with each other to generate a fifth value to serve as the parity. If any of the four values or the parity were unavailable due to a component failure, the remaining values could reconstruct the missing one. To understand how this works, let's look at some simple examples written in Perl.



In the following line of Perl, we've XORed four values together (Note that the parentheses are needed to preserve the order of operations) and computed a parity value of 2. Note that ^ represents a bitwise XOR.

> perl -e '$parity = ((( 6 ^ 7 ) ^ 8 ) ^ 11 ); print "$parity\n"'
2


Now let's pretend that one of the values has become unavailable. Pick any of the four values listed in the original expression and replace it with the computed parity.

> perl -e '$missing = ((( 6 ^ 2 ) ^ 8 ) ^ 11 ); print "$missing\n"'
7


Notice how the value of $missing is the same as the value you dropped. RAID 5 devices used a calculation of this variety (though not necessarily with such small pieces of data) to construct parity values and recover data when a volume component fails.



RAID 5 is also relatively conservative with respect to disk space. Whether you have a three-disk system or a five-disk system, for example, only one disk is used to provide this redundancy. The space equivalent of the others serves as usable storage. If you built a RAID 5 volume on a four-disk system, for example, you would have the space of three of your disks for data storage and still be able to lose any one of them without going down (although you would run at reduced efficiency because your missing data would have to be recomputed for every operation).



Since our hypothetical system has a nice pre-install of Solaris 9 on disk 1 and an acceptable partition map, we can even set up our RAID volumes without having

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Free books

Essential JavaFX
Get started building rich Web apps quickly with an introduction to the power of JavaFX key features -- scene node graphs, nodes as components, the coordinate system, layout options, colors and gradients, custom classes with inheritance, animation, binding, and event handlers.Enter now!

The Nomadic Developer
Consulting can be hugely rewarding, but it's easy to fail if you are unprepared. To succeed, you need a mentor who knows the lay of the land. Aaron Erickson is your mentor, and this is your guidebook. Enter now!

Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace