• Aucun résultat trouvé

Managing Arrays

Dans le document LINUX RAID (Page 172-177)

You can manage arrays using the DAC960/DAC1100 driver’s /proc entry, but its functionality is limited. To manage all aspects of your Mylex controller without bringing down the system, you will also need to use the Mylex Global Array Man-ager.

/proc/rd

The DAC960/DAC1100 driver uses the /proc/rd directory to report information about the status of Mylex controllers and to provide a user interface for performing some online management functions.

/proc/rd/status provides a simple interface for determining the status of all Mylex controllers connected to the system. When all controllers are operating normally, the status file returnsOK:

$ cat /proc/rd/status OK

If an array is degraded or failed, or a physical disk has failed,/proc/rd/statusreports an alert:

$ cat /proc/rd/status ALERT

Detailed status information is provided in controller-specific directories named/proc/

rd/cN, where N is the controller number. Each controller subdirectory contains three files:current_status,initial_status, anduser_command. Examinecurrent_statususing cator a file pager to view the controller state of a controller and its arrays. A lot of information is displayed. The initial output is similar to what is provided by the con-troller’s startup banner and is found in the controller configuration menu under EzAssist:

***** DAC960 RAID Driver Version 2.4.11 of 11 October 2001 *****

Copyright 1998-2001 by Leonard N. Zubkoff <lnz@dandelion.com>

Configuring Mylex AcceleRAID 352 PCI RAID Controller Firmware Version: 7.00-03, Channels: 2, Memory Size: 64MB PCI Bus: 2, Device: 13, Function: 0, I/O Address: Unassigned PCI Address: 0xF0000000 mapped at 0xD083F000, IRQ Channel: 9 Controller Queue Depth: 512, Maximum Blocks per Command: 2048 Driver Queue Depth: 511, Scatter/Gather Limit: 128 of 257 Segments

Next, a list of physical disks is displayed, including an entry for each controller chan-nel. In the interest of brevity, I’ve included only entries for the first disk and the first controller channel. Normally, each disk and channel is displayed in ascending order, beginning with its SCSI ID.

Physical Devices:

0:0 Vendor: IBM Model: DDYS-T18350M Revision: SA2A Wide Synchronous at 160 MB/sec

Serial Number: VEY04122 Disk Status: Online, 35155968 blocks [...]

0:7 Vendor: MYLEX Model: AcceleRAID 352 Revision: 0700 Wide Synchronous at 160 MB/sec

Serial Number:

After the physical devices, a list of logical drives (arrays) is displayed. In the follow-ing example, there are two arrays. The first (/dev/rd/c0d0) is a JBOD logical drive, indicated by RAID-7. The DAC960/DAC1100 driver uses the term RAID-7 to denote JBOD logical drives. The next array (/dev/c0d1) is a RAID-0.

Logical Drives:

/dev/rd/c0d0: RAID-7, Online, 35155968 blocks

Logical Device Initialized, BIOS Geometry: 255/63 Stripe Size: 64KB, Segment Size: 64KB

Read Cache Disabled, Write Cache Disabled /dev/rd/c0d1: RAID-0, Online, 140623872 blocks

Logical Device Initialized, BIOS Geometry: 255/63 Stripe Size: 64KB, Segment Size: 64KB

Read Cache Disabled, Write Cache Disabled

Unfortunately, the components that make up each array are not displayed. To deter-mine which disks are part of each array, you need to either use Mylex-supplied user-space tools or reboot the system and use the EzAssist utility.

Of particular note is the last line of output:

No Rebuild or Consistency Check in Progress

This line reports whether or not there is a rebuild, consistency check, or initializa-tion in progress. These processes occur when a new, redundant array is brought online for the first time or when a degraded array is being repaired. The percentage of the process that is complete, along with the logical drive number and device spe-cial file, are displayed:

Foreground Initialization in Progress: Logical Drive 1 (/dev/rd/c0d1) 28% completed

/proc/rd/c0/initial_status displays the same information as current_status, but it remains a static snapshot of the state of the controller when the system was booted.

It does not display any information about array rebuilds or consistency checks.

Finally,user_commandallows system administrators to perform some administrative tasks on the controller, arrays, and physical disks. To use these commands, simply echo them into theuser_command file:

# echo command > /proc/rd/cX/user_command

Each controller has its own user_command file and can accept the following com-mands:

flush-cache

Writes all uncommitted data in the controller’s memory to disk. You can use this command in conjunction with shutdown scripts (such as those executed by a UPS) to make certain that all buffers have been committed to disk before the system is powered down. For example:

echo "flush-cache" > /proc/rd/c0/user_command

killchannel:target-id

Marks a physical disk as offline. This is useful for testing hot failover. For exam-ple, to kill the disk with SCSI ID 4 on controller 0, use:

echo "kill 0:4" > /proc/rd/c0/user_command

make-onlinechannel:target-id

Brings a drive back online after it has failed (and ideally been replaced) or after you have killed it for testing purposes. make-onlineis the opposite of kill. For example:

echo "make-online 0:1" > /proc/rd/c0/user_command

make-standbychannel:target-id

Marks a drive as a spare. (Standby is yet another term used to mean spare-disk or hot-spare.) This command is useful when an array has already undergone an automatic rebuild. Even though it is no longer in degraded mode, the array has no hot-spare. After the dead disk is replaced, use this command to mark the new disk as the spare disk. For example:

echo "make-standby 0:1" > /proc/rd/c0/user_command

rebuildchannel:target-id

Manually initiates a rebuild. If you disabled Automatic Rebuild Management, use this command to start the rebuild manually. Thetarget-idalways specifies the dead disk that should be synchronized with the remaining working disks.

For example, to rebuild the array to which the disk with SCSI ID4 belongs, use:

echo "rebuild 0:4" > /proc/rd/c0/user_command

check-consistencylogical drive number

Initiates a consistency check on a logical drive. This process simply verifies that the redundancy information is correct. For example:

echo "check-consistency 0" > /proc/rd/c0/user_command

cancel-rebuild

Cancels all rebuilds that are currently in progress. This command applies to all arrays. For example:

echo "cancel-rebuild" > /proc/rd/c0/user_command

cancel-consistency-check

Cancels all consistency checks that are currently in progress. This applies to all arrays. For example:

echo "cancel-consistency-check" > /proc/rd/c0/user_command

Refer to the file/usr/src/linux/Documentation/README.DAC960for further informa-tion about these commands.

The Global Array Manager (GAM)

The Mylex Global Array Manager (GAM) is used to monitor and manage arrays while the system is running. It’s included on the CD-ROM packaged with your con-troller, but Irecommend downloading the most recent update from the Mylex web site. Grab thelinux-gam_510.exefile (it’s marked GAM for Linux). Since its location might vary, Ihaven’t included it here, but you can find it by navigating to the Driver/

Support page. Don’t forget that the version number might also change slightly. The

file is a self-extracting zip archive, so you’ll have to useunzip, notgunzip, to extract the RPM files from it.

$ unzip linux-gam_510.exe Archive: linux-gam_510.exe

inflating: sam-client-5.00-10.i386.rpm inflating: gam-client-5.00-13.i386.rpm inflating: gam-linux-readme_510.txt inflating: gam-server-5.00-12.i386.rpm inflating: gam-agent-5.00-12.i386.rpm

The Global Array Manager is comprised of a client (gam-client-5.00-13.i386.rpm) and a server (gam-server-5.00-12.i386.rpm) package. The gam-server package pro-vides the underlying framework for communicating with the controller, and the gam-client package provides the GUImanagement interface. To install gam-server suc-cessfully, you must have eitherinetdorxinetdinstalled and running. It’s not enough for either program to simply be installed; one of them must be running. That’s because the client and server components use TCP/IP to communicate with each other. After installation, a desktop icon is created for KDE and GNOME users. You can also run GAM directly from/opt/gam/bin/gam. The Global Array Manager is very straightforward to use and is well documented. There’s built-in HTML help and an installation guide (http://www.mylex.com/pub/support/current_raid/Linux-GAM.pdf).

Most of GAM’s functions mimic EZAssist.

Adaptec

Adaptec has two RAID controller product lines based on different processors and technologies. This dichotomy stems from Adaptec’s history with RAID controllers.

In 1999, Adaptec, Inc. acquired Distributed Processing Technology (DPT), a manu-facturer of, among other storage products, SCSIRAID controllers. At that time, Linux support for DPT controllers was provided in the form of a GPL kernel patch.

Since the acquisition, Adaptec has continued to support Linux in its RAID product line by continuing driver development for controllers based on the original DPT architecture.

After the acquisition, Adaptec began to develop a new product line aimed at OEM controllers. These controllers were featured in server-class systems available from Dell Computer and Hewlett-Packard. Many users will know these controllers as the Poweredge Expandable RAID Controller (PERC). Since the new controllers had a different architecture, a new Linux driver was needed. Eventually, Adaptec released several boxed controllers based on this new architecture. So today, the new driver is used for OEM controllers, as well as some newer boxed products.

If you have a Dell system with a branded Adaptec controller, you might want to take a look at Matt Domsch’s page on the subject:http://

www.domsch.com/linux/. It’s the best resource that I’ve been able to find for Dell’s RAID solutions and Linux.

The controller that you purchase dictates which of the two drivers you need to use.

For the DPT-based controllers, use the Adaptec I2O RAID driver (dpt_i2o). For OEM and newer controllers, use the AACRAID driver (aacraid). Ievaluated an Adaptec 2100S, which is a single-channel, SCSIUltra 160 RAID controller. The 2100S is an I2O card, so throughout the rest of this section, I’ll be referring to that driver and its user-space tools. However, the same tools are also available for AAC-RAID controllers.

Linux support for Adaptec RAID controllers is common in many distributions. I tested direct installation to my 2100S controller using Red Hat, SuSE, and Man-drake. The official documentation recommends creating a driver disk by using the included CD-ROM, or by downloading a disk image from the Adaptec web site.

However, Ihave found that out-of-the-box installation works fine, at least with Red Hat, SuSE, and Mandrake. You need to create a driver disk and use a distribution that is officially supported only if you encounter problems and need technical sup-port from Adaptec.

Dans le document LINUX RAID (Page 172-177)