Using Hardware RAID
Using Hardware RAID
Using the software supplied with the Hardware RAID PCI Card, you can:
• Create a RAID array using RAID 0, 1, or 5
• Designate an available drive module as a hot spare
• Rebuild a drive module
• Change the cache policy settings for a RAID array
• Check the status of the RAID card, drive modules, and RAID arrays
• Display and save a log of operations, showing time and date
• Turn the audible alarm on or off
2
RAID 1: Data Mirroring
RAID level 1, mirroring, is a long-established, popular scheme because of its simplicity
and high levels of reliability and availability. In the Xserve G5 system, RAID 1 uses two
drives. Each drive stores identical data; thus, RAID 1 provides very high data reliability
and improved performance for read-intensive applications. However, this RAID level has
a high capacity cost because it retains a full copy of data on each drive.
With a RAID 5 array, a failed drive module can be replaced and the data from that drive
will be rebuilt using parity information. Although performance is degraded during
rebuilding, data remains intact and available.
For example, you might create one logical drive that is 50 gigabytes (GB) in size on
which to install the OS, and use the remainder of the array as a second large logical
drive for data storage.
Note: When you create logical drives, it is not a good idea to mix RAID levels on the
same physical drive module. Using multiple logical drives to set up two or more RAID
arrays of the same level is a good use of this feature.
3
Choosing a RAID Level
You can set up a variety of configurations using RAID level 0, 1, or 5. The following
scenarios are examples of good use of the Xserve G5 system’s three drive modules and
the RAID card.
Step 1: Start up the server from the Install Disc 1 that came with the system
Step 3: Format the volume created with the card using Disk Utility or the
diskutil command-line tool
4
Configuring the Hardware RAID PCI Card
The Hardware RAID PCI Card ‘s default configuration is JBOD mode (for “just a bunch of
disks”) in which each drive module is presented as an independent drive with no RAID
configured. You must configure the card and drive modules to use its RAID features.
Important: Configuring the hardware RAID card erases Mac OS X Server on the
system’s startup drive. You must reinstall Mac OS X Server from the system discs after
configuring the card. See “Installing Mac OS X Server on a Hardware RAID Volume”
above for an overview of software installation and Chapter 5, “Updating or Installing
Software on Xserve G5 Systems,” in the Xserve G5 User’s Guide for detailed instructions.
You can access and configure the RAID card in one of three ways:
• Use a remote computer on the network to connect to the server
• Connect a terminal to the serial port of the server
• Use the Terminal application on a server that has a monitor and keyboard connected
to it
To configure the RAID card using a terminal connected to the server’s serial
port:
1 Connect a terminal to the serial port on the back panel of the server.
2 Use the terminal to connect to the server with settings of 57.6 kilobytes per second, 8
bits, no parity.
3 Type the desired configuration command.
See “Sample Configuration Commands” on page 6.
5
To configure the RAID card using the server with a monitor and keyboard
connected to it:
Note: The server must have a video card to connect a monitor or an available
keyboard-video-monitor switch with monitor and keyboard connected.
1 Start up the server using Mac OS X Install Disc 1.
2 Start the Terminal application from the Installer menu.
3 Type the desired configuration command.
See “Sample Configuration Commands” on page 6.
Important: When entering most commands for RAID configuration, you must be the
root user. To log in as the root user, you can type “ssh” at the beginning of a command
(as in “To configure the RAID card using a remote computer:” on page 5) or type “sudo”
as the first part of the command. You will also need to provide the password for the
server to which you are logging in.
Note: The command-line tool you use to configure and manage RAID arrays is named
“megaraid”; its files are stored in these locations:
/usr/bin/megaraid (megaraid command tool)
/usr/share/man/man8/megaraid.8 (man page)
/System/Library/Extensions/megaraid.kext (kernel extension)
To create a RAID 5 array with a cache for writing data and reading ahead:
megaraid -create R5 -drive 0 1 2 -writecache enable -readahead on
-iopolicy cached
6
To rebuild a RAID 5 or RAID 1 array with a replacement drive:
1 To verify the drive that failed, check the list of devices by typing the following
command.
megaraid -showdevices
2 Remove the failed drive module and insert a replacement.
Rebuilding begins automatically.
3 If rebuilding does not begin, you can specify rebuilding by typing this command.
megaraid -rebuild <drive number>
where <drive number> is the number of the drive module you replaced
For a complete list of commands to configure and manage the Hardware RAID PCI
Card, display the man page for the card by typing the following command:
man megaraid
To rebuild a drive:
megaraid -rebuild <drive number> -start (or -stop)
7
To show all commands provided by diskutil:
man diskutil
To display a list of both logical and physical drives available to Mac OS X and
their share points:
diskutil list