12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Understanding RAID 181LISTING 7.7Creating a RAID ArrayPersonalities : [raid0] [raid1]md0 : active raid1 sda7[2] sda6[1] sda5[0]10241280 blocks [3/3] [UUU][>....................] resync = 0.0% (8192/10241280) finish=62.3minspeed=2730K/secunused devices: The RAID device /dev/md0 is created. Next, create a filesystem on it. To create an ext3filesystem, execute the following as root:mke2fs -j /dev/md0If the new RAID device is to be used as the swap partition, use the following command asroot instead:mkswap /dev/md0Copy any data over to the new device and be sure to change all references to the oldpartition to the new RAID device, including /etc/fstab and /etc/grub.conf. It is recommendedthat the /boot and the / filesystems remain on their original filesystems toensure the system can still boot after added the RAID devices. Partitions such as /homewill benefit from RAID more because data on it changes frequently.Adding and Failing RAID PartitionsTo add a partition to a RAID device, execute the following as root after creating the partitionof type <strong>Linux</strong> raid auto (fd in fdisk):7mdadm /dev/mdX -a To add /dev/sda8 to the /dev/md0 RAID device created in the previous section:mdadm /dev/md0 -a /dev/sda8Listing 7.8 shows the output from cat /proc/mdstat. The /dev/sda8 partition is now aspare partition in the RAID array.LISTING 7.8Adding a Spare PartitionPersonalities : [raid0] [raid1]md0 : active raid1 sda8[3](S) sda7[2] sda6[1] sda5[0]10241280 blocks [3/3] [UUU][>....................] resync = 0.6% (66560/10241280) finish=84.0minspeed=2016K/secunused devices:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!