Recent Changes - Search:

Public

Physics

Engineering

Literature
Journal Club
People

MineralPET
DAQ

Computing

Africa


Linux Administration Notes - RAID Administration

<< Disk Errors | AdminNotes | Install Aigaion >>

RAID administration

On SL4 and later, mdadm is the comprehensive tool to administrer a Linux Software RAID array.

On the new PSI server, we only had one usable hard disk, so we started by creating the array in degraded mode, with just one disk. This can only be done from the command line, not from the graphical installer.

[root@psi ~]# mdadm --create /dev/md1 -r raid1 -n2 /dev/hda2 missing
[root@psi ~]# mdadm --detail /dev/md1
/dev/md1:
        Version : 00.90.01
  Creation Time : Sat May 27 17:58:43 2006
     Raid Level : raid1
     Array Size : 102398208 (97.65 GiB 104.86 GB)
    Device Size : 102398208 (97.65 GiB 104.86 GB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Tue Jun  6 17:00:18 2006
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0


    Number   Major   Minor   RaidDevice State
       0       3        2        0      active sync   /dev/hda2
       1       0        0       -1      removed
           UUID : e8398d47:268cea27:b0ea9975:e442335a
         Events : 0.197791

Now

  • install a second disk,
  • create the partitions (of the same size or larger than in the original disk)
  • add them to the raid

The system RAID daemon will see the newly added disk, and will start rebuilding the array by copying data from the old disk to the new one.

[root@psi ~]# mdadm /dev/md1 --add /dev/hdc2
mdadm: hot added /dev/hdc2
[root@psi ~]# mdadm --detail /dev/md1
/dev/md1:
        Version : 00.90.01
  Creation Time : Sat May 27 17:58:43 2006
     Raid Level : raid1
     Array Size : 102398208 (97.65 GiB 104.86 GB)
    Device Size : 102398208 (97.65 GiB 104.86 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Tue Jun  6 17:39:42 2006
          State : clean, degraded, recovering
 Active Devices : 1
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 1


 Rebuild Status : 62% complete

    Number   Major   Minor   RaidDevice State
       0       3        2        0      active sync   /dev/hda2
       1       0        0       -1      removed
       2      22        2        1      spare   /dev/hdc2
           UUID : e8398d47:268cea27:b0ea9975:e442335a
         Events : 0.198828

RAID and GRUB boot

SL43 fails to properly install GRUB when a software RAID / partition is used. To fix it, boot the install CD in rescue mode (linux rescue at the boot prompt), let it find and mount the system, then run chroot /mnt/sysimage grub and see SoftwareRaidAndGrubHowTo or http://www.linuxsa.org.au/mailing-list/2003-07/1270.html


<< Disk Errors | AdminNotes | Install Aigaion >>

Edit - History - Print - Recent Changes - Search
Page last modified on January 06, 2009, at 03:37 pm