13

Click here to load reader

4 array redundante de discos independientes

Embed Size (px)

Citation preview

Page 1: 4  array redundante de discos independientes

57

Array Redundante de Discos

Independientes (RAID) La idea básica detrás de RAID es combinar pequeños y baratos controladores de discos en un array

para alcanzar metas de rendimiento y redundancia que no se pueden lograr con un controlador caro y

grande. El computador toma este array de controladores como un disco o unidad de almacenamiento

lógico individual.

4.1. ¿Qué es RAID? RAID permite que la información acceda a varios discos. RAID utiliza técnicas como separación de

disco (Nivel 0 RAID), copia espejo de disco (Nivel 1 RAID) y separación de disco con paridad (Nivel 5

RAID) para lograr redundancia, menos latencia, mayor amplitud de banda y una mayor abilidad para

recuperarse de fallos del disco duro.

El concepto básico del RAID es que los datos se pueden distribuir entre los discos del grupo de

manera consistente. Para hacer esto, primero se deben dividir los datos en partes iguales (a menudo

de 32k o 64k, aunque también se pueden usar otros tamaños). Cada parte es escrita en los discos

duros en el array RAID de acuerdo con el nivel RAID empleado. Cuando se leen los datos el proceso

sucede al contrario, dando la impresión de que muchos discos son combinados en uno solo.

4.2. ¿Quién debe utilizar RAID? Los administradores del sistema y aquellos que necesitan controlar grandes cantidades de datos se

benificiarían del uso de la tecnología RAID. Los motivos principales para utilizar RAID son:

• Aumento de la velocidad

• Aumento de la capacidad de almacenamiento mediante el uso de un disco virtual

• MInimiza los fallos del disco

4.3. RAID: Hardware vs. Software Existen dos posibles enfoques a RAID: RAID Hardware o Software.

4.3.1. Hardware RAID Las soluciones hardware gestionan el subsistema RAID independientemente del host presentándole

un solo disco.

A Hardware RAID device connects to the SCSI controller and presents the RAID arrays as a single

SCSI drive. An external RAID system moves all RAID handling "intelligence" into a controller located

in the external disk subsystem. The whole subsystem is connected to the host via a normal SCSI

controller and appears to the host as a single disk.

RAID controller cards function like a SCSI controller to the operating system, and handle all the actual

drive communications. The user plugs the drives into the RAID controller (just like a normal SCSI

controller) and then adds them to the RAID controllers configuration, and the operating system won't

know the difference.

Page 2: 4  array redundante de discos independientes

58

Niveles de RAID y Soporte Lineal

4.3.2. Software RAID Software RAID implements the various RAID levels in the kernel disk (block device) code. It offers the

cheapest possible solution, as expensive disk controller cards or hot-swap chassis 1

are not required.

Software RAID also works with cheaper IDE disks as well as SCSI disks. With today's faster CPUs,

Software RAID outperforms Hardware RAID.

El controlador MD del kernel de Linux es un ejemplo de que la solución RAID es completamente

independiente del hardware. Las prestaciones de un RAID basado en el software dependen del

desempeño y de la carga del CPU.

Para aquéllos que estén interesados en saber lo que el software RAID ofrece aquí tiene una breve

lista de algunas de sus características más importantes:

• Proceso de reconstrucción entrelazado.

• Configuración basada en kernel

• Portabilidad de RAID entre computadores Linux sin reconstruir.

• Reconstrucción del array en segundo plano usando recursos no utilizados del sistema.

• Soporte para discos hot-swappable.

• Reconocimiento automático de la CPU para disfrutar de algunas de sus optimizaciones.

4.4. Niveles de RAID y Soporte Lineal RAID soporta varias configuraciones incluyendo los niveles 0, 1, 4, 5 y el soporte lineal. Estos tipos de

RAID se definen de la siguiente manera:

• Level 0 — RAID level 0, often called "striping," is a performance-oriented striped data mapping

technique. This means the data being written to the array is broken down into strips and written

across the member disks of the array, allowing high I/O performance at low inherent cost but

provides no redundancy. The storage capacity of a level 0 array is equal to the total capacity of the

member disks in a Hardware RAID or the total capacity of member partitions in a Software RAID.

• Level 1 — RAID level 1, or "mirroring," has been used longer than any other form of RAID. Level 1

provides redundancy by writing identical data to each member disk of the array, leaving a "mirrored"

copy on each disk. Mirroring remains popular due to its simplicity and high level of data availability.

Level 1 operates with two or more disks that may use parallel access for high data-transfer rates

when reading but more commonly operate independently to provide high I/O transaction rates. Level

1 provides very good data reliability and improves performance for read-intensive applications but at

a relatively high cost. The storage capacity of the level 1 array is equal to the capacity of one of the

mirrored hard disks in a Hardware RAID or one of the mirrored partitions in a Software RAID.

A hot-swap chassis allows you to remove a hard drive without having to power-down your system.

Page 3: 4  array redundante de discos independientes

59

Niveles de RAID y Soporte Lineal

Nota

RAID level 1 comes at a high cost because you write the same information to all

of the disks in the array, which wastes drive space. For example, if you have RAID

level 1 set up so that your root (/) partition exists on two 40G drives, you have 80G

total but are only able to access 40G of that 80G. The other 40G acts like a mirror

of the first 40G.

• Level 4 — Level 4 uses parity (see Nota) concentrated on a single disk drive to protect data. It is

better suited to transaction I/O rather than large file transfers. Because the dedicated parity disk

represents an inherent bottleneck, level 4 is seldom used without accompanying technologies such

as write-back caching. Although RAID level 4 is an option in some RAID partitioning schemes,

it is not an option allowed in Red Hat Enterprise Linux RAID installations. The storage capacity of

Hardware RAID level 4 is equal to the capacity of member disks, minus the capacity of one member

disk. The storage capacity of Software RAID level 4 is equal to the capacity of the member

partitions, minus the size of one of the partitions if they are of equal size.

Nota

RAID level 4 takes up the same amount of space as RAID level 5, but level 5 has

more advantages. For this reason, level 4 is not supported.

Nota

Parity information is calculated based on the contents of the rest of the member

disks in the array. This information can then be used to reconstruct data when

one disk in the array fails. The reconstructed data can then be used to satisfy I/

O requests to the failed disk before it is replaced and to repopulate the failed disk

after it has been replaced.

• Level 5 — This is the most common type of RAID. By distributing parity across some or all of an

array's member disk drives, RAID level 5 eliminates the write bottleneck inherent in level 4. The only

performance bottleneck is the parity calculation process. With modern CPUs and Software RAID,

that usually is not a very big problem. As with level 4, the result is asymmetrical performance, with

reads substantially outperforming writes. Level 5 is often used with write-back caching to reduce

the asymmetry. The storage capacity of Hardware RAID level 5 is equal to the capacity of member

disks, minus the capacity of one member disk. The storage capacity of Software RAID level 5 is

equal to the capacity of the member partitions, minus the size of one of the partitions if they are of

equal size.

• RAID lineal — El RAID lineal es una simple agrupación de discos de manera que se crea un disco

virtual más grande. En el RAID lineal, las partes están dispuestas secuencialmente y se pasa

de un disco miembro al disco siguiente una vez que el primer disco ha sido completado en su

totalidad. Este agrupamiento no tiene ninguna ventaja en cuanto a rendimiento pues es improbable

que alguna operación de E/S sea divida entre los discos miembros. El RAID lineal no ofrece

redundancia y de hecho disminuye la fiabilidad -- si uno de los discos se daña, no se puede utilizar

el array. La capacidad es el total de todos los discos miembros.

Page 4: 4  array redundante de discos independientes

60

Niveles de RAID y Soporte Lineal

4.5. Configuración de Software RAID El Software RAID puede configurarse durante el proceso de instalación gráfica, el proceso de

instalación basada en texto o durante una instalación de inicio rápido (kickstart). Este capítulo discute

como configurar el software RAID durante la instalación usando la aplicación Disk Druid.

• Aplique particiones de software RAID a los discos duros físicos.

Para añadir una partición boot (/boot/) a una partición RAID asegúrese de que se encuentra en

una partición RAID1.

• Creación de dispositivos RAID desde las particiones del software RAID.

• Opcional: Configuración LVM de los dispositivos RAID.

• Creación de sistemas de archivos desde los dispositivos RAID.

Nota

Aunque este procedimiento cubre la instalación con una aplicación GUI, los

administradores del sistema pueden hacer lo mismo con una instalación basado en

texto.

La configuración del software RAID se deber eralizar manualmente en Disk Druid

durante el proceso de instalación.

Estos ejemplos utilizan dos controladores SCSI 9.1 GB SCSI (/dev/sda y /dev/sdb) para ilustrar

la creación de las configuraciones simples de RAID1. Detallan como crear una configuración RAID 1

simple implementando múltiples dispositivos RAID.

En la pantalla Configuración de la partición del disco, seleccione Partición manual con Disk

Druid.

4.5.1. Creación de Particiones RAID

In a typical situation, the disk drives are new or are formatted. Both drives are shown as raw devices

with no partition configuration in Figura 4.1, “Two Blank Drives, Ready For Configuration”.

Page 5: 4  array redundante de discos independientes

61

Creación de Particiones RAID

Figura 4.1. Two Blank Drives, Ready For Configuration

1. En Disk Druid seleccione RAID para ingresar la pantalla de creación de software RAID.

2. Choose Create a software RAID partition to create a RAID partition as shown in Figura 4.2,

“RAID Partition Options”. Note that no other RAID options (such as entering a mount point) are

available until RAID partitions, as well as RAID devices, are created.

Page 6: 4  array redundante de discos independientes

62

Creación de Particiones RAID

Figura 4.2. RAID Partition Options

3. Una partición de software RAID debería estar limitada a una unidad. Para las Unidades

admisibles seleccione la unidad donde quiere crear RAID. Si tiene varias unidades, por defecto

se seleccionaran todas y usted deberá anular la selección de las unidades que no quiere.

Page 7: 4  array redundante de discos independientes

63

Creación de Particiones RAID

Figura 4.3. Adding a RAID Partition

4. Introduzca el tamaño que desea para la partición.

5. Seleccione Tamaño fijo para hacer la partición de un tamaño especifico, seleccione Ocupar todo

el espacio hasta (MB) e introduzca un tamaño en MBs para especificar el rango del tamaño de la

partición. Seleccione Ocupar todo el espacio disponible para hacerlo crecer hasta ocupar todo

el tamaño disponible en el disco duro. Si hace crecer a más de una partición, éstas compartirán el

espacio libre disponible en el disco.

6. Seleccione Forzar para que sea una partición primaria si quiere que la partición sea primaria.

Una partición primaria es una de las cuatro primeras particiones en el disco duro. Si no es

seleccionada, la partición es creada como una partición lógica. Debería considerar el dejarla

no seleccionada si ya cuenta con otros sistemas operativos en el sistema. Para obtener mayor

información sobre particiones primarias vs. lógicas/estendidas consulte el apéndice del Manual de

Instalación de Red Hat Enterprise Linux.

7. Repita estos pasos para crear tantas particiones como necesite para sus particiones.

Repeat these steps to create as many partitions as needed for your RAID setup. Notice that all the

partitions do not have to be RAID partitions. For example, you can configure only the /boot/ partition

as a software RAID device, leaving the root partition (/), /home/, and swap as regular file systems.

Figura 4.4, “RAID 1 Partitions Ready, Pre-Device and Mount Point Creation” shows successfully

Page 8: 4  array redundante de discos independientes

64

Creación de Particiones RAID

allocated space for the RAID 1 configuration (for /boot/), which is now ready for RAID device and

mount point creation:

Figura 4.4. RAID 1 Partitions Ready, Pre-Device and Mount Point Creation

4.5.2. Creación de Dispositivos RAID y Puntos de Montaje

Una vez que haya creado todas sus particiones como particiones software RAID debe crear el

dispositivo RAID y el punto de montaje.

1. Select the RAID button on the Disk Druid main partitioning screen (refer to Figura 4.5, “Opciones

RAID”).

2. Figura 4.5, “Opciones RAID” appears. Select Create a RAID device.

Page 9: 4  array redundante de discos independientes

65

Creación de Dispositivos RAID y Puntos de Montaje

Figura 4.5. Opciones RAID

3. Next, Figura 4.6, “Making a RAID Device and Assigning a Mount Point” appears, where you can

make a RAID device and assign a mount point.

Page 10: 4  array redundante de discos independientes

66

Creación de Dispositivos RAID y Puntos de Montaje

Figura 4.6. Making a RAID Device and Assigning a Mount Point

4. Seleccione un punto de montaje.

5. SEleccione el tipo de sistema de archivps para la partición. En este momento puede configurar

un sistema de archivos LVM o un sistema de archivos ext2/ext3 estático tradicional. Para obtener

mayor información sobre como configurar LVM sobre un dispositivo RAID seleccione Volúmen

Físico (LVM). Si no necesita LVM continue con las siguientes instrucciones.

6. Seleccione un nombre de dispositivo tal como md0 para el dispositivo RAID.

7. Escoja el nivel de RAID. Puede elegir entre RAID 0, RAID 1 y RAID 5.

Page 11: 4  array redundante de discos independientes

67

Creación de Dispositivos RAID y Puntos de Montaje

Nota

Si está creando una partición RAID de /boot/ deberá elegir RAID de nivel 1 y

debería utilizar una de las primeras dos unidades (IDE primero, SCSI segundo).

Si no está creando una partición RAID de /boot/ pero quiere crear una partición

RAID del sistema de archivos root (/) deberá ser de tipo RAID nivel 1 y debería

estar situada en una de las primeras dos unidades (IDE primero, SCSI de

segundo).

Figura 4.7. The /boot/ Mount Error

8. Las particiones RAID que acaba de crear aparecerán en la lista Miembros RAID. Seleccione

cuáles de estas particiones se deben utilizar para crear el dispositivo RAID.

9. Si está configurando RAID 1 o RAID 5, especifique el número de particiones de reserva. Si una

partición de software RAID falla, la de reserva se usará automáticamente como reemplazo. Para

cada partición de reserva que desee especificar, deberá crear una partición de software RAID

adicional (además de las particiones para el dispositivo RAID). Seleccione las particiones para el

dispositivo RAID y la(s) particion(es) de reserva.

10. Después de hacer click en OK el dispositivos RAID aparece en la lista Resumen de Discos.

11. Repeat this chapter's entire process for configuring additional partitions, devices, and mount

points, such as the root partition (/), /home/, or swap.

After completing the entire configuration, the figure as shown in Figura 4.8, “Final Sample RAID

Configuration” resembles the default configuration, except for the use of RAID.

Page 12: 4  array redundante de discos independientes

68

Creación de Dispositivos RAID y Puntos de Montaje

Figura 4.8. Final Sample RAID Configuration

The figure as shown in Figura 4.9, “Final Sample RAID With LVM Configuration” is an example of a

RAID and LVM configuration.

Page 13: 4  array redundante de discos independientes

69

Creación de Dispositivos RAID y Puntos de Montaje

Figura 4.9. Final Sample RAID With LVM Configuration

Puede continuar con el proceso de instalación. Consulte el Manual de Instalación de Red Hat

Enterprise Linux para obtener mayores instrucciones.