Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: william_syd on August 03, 2007, 11:26:34 AM
-
SME7.2
It appears that installing with three drives makes one a hot spare.
How do you add a hot spare after you have installed with two drive?
What 'triggers' a fall over to the spare and how automatic is it?
-
Here's how to ass a hot spare:
http://prefetch.net/blog/index.php/2007/03/11/adding-a-hot-spare-to-an-md-device/
-
Thanks Gert.
I was looking for a "one click" solution within SME.
Next best is the add_drive_to_raid command. I'm not sure how it works with a 'hot' spare though. Time to play in a VM.
[root@tiger ~]# cat /sbin/e-smith/add_drive_to_raid
#!/usr/bin/perl -w
#----------------------------------------------------------------------
# add_drive_to_raid: Add spare disk to existing raid arrays
#----------------------------------------------------------------------
# Copyright (C) 2005 Gordon Rowell <gordonr@gormand.com.au>
# Copyright (C) 2006 Shad L. Lords <slords@mail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#----------------------------------------------------------------------
-
Oh.. one more question,
Does drive interface affect hot spare operation?
-
Does drive interface affect hot spare operation?
No, but size does matter (ie. the new drive has to be => existing, if > anly the existing size will be used).
Also the script looks to do all the right things (although it fails on trying to put grub info on the new disk - but I don't think this is a problem in a hot-spare....).What 'triggers' a fall over to the spare and how automatic is it?
A failure of any of the other drives in the raid group. And it is totally automagic (if you have a spare :-)).
Trevor B
-
Thanks Trevor.
Looks like that script does the trick...
[root@sme-raid ~]# mdadm -Ebsc partitions
ARRAY /dev/md1 level=raid1 num-devices=2 spares=1 UUID=b6a6096f:a8585d75:d3aaaffb:e42ad2e2
ARRAY /dev/md2 level=raid1 num-devices=2 spares=1 UUID=253ff517:44d4b41c:edf3babe:5b5d62d1
[root@sme-raid ~]#