Koozali.org: home of the SME Server

SME 6.01 Raid 1

Offline eiceic

  • ****
  • 118
  • +0/-0
    • http://www.eicsoftware.com
SME 6.01 Raid 1
« on: June 27, 2006, 11:18:08 PM »
I have a Compaq Proliant Server with two 148GB SCSI hotswap drives - when I set up the SME, I told it to do Raid 1.

I have now purchased a third 148GB drive and I want to do the following
  1.  Pull the 2nd drive to break the RAID, and then put the new drive in it's place to make sure that the RAID works and synch's back up.

  2.  After the 1st test is complete, I'd like to put the extra drive in the 3rd slot and be able to make an Ibay on that drive.

I've never played much with RAID - are my two tasks feasable, and what commands would I need to execute to accomplish #2?

From this output below, can you tell if everything is currently in synch?

Thanks,

Chris Buechler

[root@linux1 proc]# cat partitions
major minor  #blocks  name     rio rmerge rsect ruse wio wmerge wsect wuse running use aveq

   8     0  143374744 sda 20289740 44730715 520543564 10775111 36517802 37530302 593429534 8235213 0 39586352 24921765
   8     1     104391 sda1 42 52 194 1770 319 309 1262 34320 0 33500 36090
   8     2  143002597 sda2 20288860 44730653 520536658 10761651 36503538 37522011 593252824 34384556 0 30201492 8101975
   8     3     265072 sda3 837 7 6704 11680 13945 7982 175448 16766010 0 10497250 16783690
   8    16  143374744 sdb 797 566 7268 4530 14301 8254 176710 16541070 0 10279890 16551600
   8    17     104391 sdb1 32 531 1132 240 346 282 1262 23490 0 15550 23730
   8    18  143002597 sdb2 9 24 72 40 0 0 0 0 0 40 40
   8    19     265072 sdb3 755 8 6056 4250 13955 7972 175448 16517580 0 10266790 16527830
   9     0     104320 md0 0 0 0 0 0 0 0 0 0 0 0
   9     1  143002496 md1 0 0 0 0 0 0 0 0 0 0 0
   9     2     264960 md2 0 0 0 0 0 0 0 0 0 0 0
[root@linux1 proc]# cat mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 sdb1[1] sda1[0]
      104320 blocks [2/2] [UU]

md1 : active raid1 sda2[0]
      143002496 blocks [2/1] [U_]

md2 : active raid1 sdb3[1] sda3[0]
      264960 blocks [2/2] [UU]

unused devices: <none>
[root@linux1 proc]#

Offline raem

  • *
  • 3,972
  • +4/-0
Re: SME 6.01 Raid 1
« Reply #1 on: June 28, 2006, 04:56:49 AM »
eiceic

> > when I set up the SME, I told it to do Raid 1.

I assume you mean you told your server to configure software RAID1.
As I understand it, the kernel does not support hot swapping of drives (even though the drives themselves may support hot swapping).

> 1.  Pull the 2nd drive to break the RAID, and then put the new drive in
> it's place to make sure that the RAID works and synch's back up.

You need to power down your server, then swap the drive, then power up your server and then rebuild the array. Look in dmay contrib area for the raidmonoitor contrib, there is a howto there that gives all the steps needed (& the partner recovery howto).

>   2.  After the 1st test is complete, I'd like to put the extra drive in the
> 3rd slot and be able to make an Ibay on that drive.

Search here, there is a howto with the steps needed to do that, search on add a second drive.


> From this output below, can you tell if everything is currently in synch?

cat /proc/mdstat
is the command to use.

> md1 : active raid1 sda2[0]
>     143002496 blocks [2/1] [U_]

There is a problem here.
...

Offline eiceic

  • ****
  • 118
  • +0/-0
    • http://www.eicsoftware.com
RAID
« Reply #2 on: June 28, 2006, 06:52:10 AM »
Thank you,

I installed the dmay stuff tonight -- but it seems that it's too late to recover using his instructions because I don't have a last known good configuration..   Any tips?

Thanks,

Chris Buechler

Offline raem

  • *
  • 3,972
  • +4/-0
Re: RAID
« Reply #3 on: June 28, 2006, 07:29:14 AM »
Well make sure you backup the good drive first.

I'm not sure what approach to take. You may be able to get the information you need from the good drive partition details etc and create the needed config files.
Then follow the recovery instructions.

If that doesn't work then reinstall the sme6 OS and restore from your backup.

Another perhaps less painful way to go, would be to upgrade to sme7, with only the good drive in the server. It will automatically configure a degraded RAID1 array.
You can then reconnect the other drive and use the admin console screen to rebuild the array using the menu options.
It's much easier to rebuild a broken array in sme7.
...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: SME 6.01 Raid 1
« Reply #4 on: June 30, 2006, 06:18:15 PM »
Quote from: "eiceic"
I have a Compaq Proliant Server with two 148GB SCSI hotswap drives - when I set up the SME, I told it to do Raid 1.

]cut[

Thanks,

Chris Buechler



Hi Chris (are you the same Chris Buechler involved in m0n0wall development? :-))

follow this steps:

a) I've notice your raid is working in degraded mode, ad sdb2 partition in md1 device is not used..
so, try to do this:

mdadm -a /dev/md1 /dev/sdb2

array rebuilding and synchronization will start and will took a long time (it depends on hd size and rebuilding speed that is abount 10 mb/s in standard sme installation); if everything is ok after array recostruction than your sdb scsi hd is ok..
in any case, smartmontools use is recommended to check the health status
 of your hd

b) now, if hd is ok, you can run raidmonitor -iv to save your raid configuratione; if not.. not a real problem :-)

c) do (Iguess you want to change sdb hd)

mdadm -r /dev/md0 /dev/sdb1
mdadm -r /dev/md1 /dev/sdb2
mdadm -r /dev/md2 /dev/sdb3

after this, you can safely remove sdb.. You say it's a hotswap hd, so a shutdown should not be necessary

d) insert your new hd

if you have run successfully raidmonitor (see above), follow dmay help
if not, do

sfdisk /dev/sda -O hdd-partition-sectors.save
sfdisk /dev/sdb -I hdd-partition-sectors.save

or manually run fdisk on /dev/sdb

after partitioning the new hd, you can do

mdadm -a /dev/md0 /dev/sdb1
mdadm -a /dev/md1 /dev/sdb2
mdadm -a /dev/md2 /dev/sdb3

et voilĂ .. :-)

well.. I hope you are wise enough to backup your data BEFORE following my instructions :-)

HTH

Ciao

Stefano