Installation


Upgrades


DTC-Xen Installation


DTC-Xen / Dom0 Howtos

DTC-Xen / DomU Howtos

FAQ


DTC Howtos


Manuals


Features


Roadmap


Devel docs


Wiki - i18n


Wiki - Meta


ManagingTheRAID

If you set up your Xen server with Raid1 and LVM per our recommendations, this page contains useful information on monitoring and repair.

About MDADM monitoring

By default your server should be sending Raid monitoring messages to root@yourserver if the RAID encounters a problem.

Example subject line: DegradedArray event on /dev/md0:node0182.gplhost.com

   Personalities : [raid1] 
   md1 : active raid1 sdb5[2](F) sda5[0]
      483395712 blocks [2/1] [U_]

   md0 : active raid1 sda1[0] sdb1[2](F)
      979840 blocks [2/1] [U_]

This is telling us that there is a problem.

You can choose to attempt to re-add the failed partition to the array. You can do this by ...

How to reassemble an array

   # mdadm --assemble /dev/md0 /dev/sd[ab]1 --force

This command will attempt to reassemble the md0 array from sd A and B partition 1.

display the state of md0

    /dev# mdadm --detail md0
   md0:
        Version : 0.90
  Creation Time : Tue Apr 27 20:29:36 2010
     Raid Level : raid1
     Array Size : 979840 (957.04 MiB 1003.36 MB)
  Used Dev Size : 979840 (957.04 MiB 1003.36 MB)
   Raid Devices : 2
  Total Devices : 2
   Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Fri Oct 23 01:43:48 2015
          State : clean, degraded
    Active Devices : 1
   Working Devices : 1
    Failed Devices : 1
     Spare Devices : 0

           UUID : 483e3151:e53bb49f:d2d75796:d45508db
         Events : 0.22848

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       1       8       17        1      active sync   /dev/sdb1

       2       8        1        -      faulty spare   /dev/sda1

Remove a failed partition

   /dev# mdadm /dev/md0 --remove /dev/sda1
   mdadm: hot removed /dev/sda1 from /dev/md0

Check if that worked...

   # mdadm --detail md0
   md0:
        Version : 0.90
  Creation Time : Tue Apr 27 20:29:36 2010
     Raid Level : raid1
     Array Size : 979840 (957.04 MiB 1003.36 MB)
  Used Dev Size : 979840 (957.04 MiB 1003.36 MB)
   Raid Devices : 2
  Total Devices : 1
  Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Fri Oct 23 01:53:07 2015
          State : clean, degraded
 Active Devices : 1

Working Devices : 1

 Failed Devices : 0
  Spare Devices : 0

           UUID : 483e3151:e53bb49f:d2d75796:d45508db
         Events : 0.22852

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       1       8       17        1      active sync   /dev/sdb1

It did, so we can move on with attempting to put it back in.

   /dev# mdadm /dev/md0 --add /dev/sda1
   mdadm: failed to write superblock to /dev/sda1

Let's do some more checks

   smartctl -i /dev/sda
   smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build)
   Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net(approve sites)

   Device: /0:0:0:0  Version:
   scsiModePageOffset: response length too short, resp_len=47 offset=50 bd_len=46
   >> Terminate command early due to bad response to IEC mode page
   A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

Ok that's not good! Time for a new drive.

.......

To be continued.

This means we have a problem with the parition table on sda so we'll just copy that back over using the following command.

    sfdisk -d /dev/sdb | sfdisk --force /dev/sda
Page last modified on October 23, 2015, at 02:12 AM EST