Results 1 to 3 of 3
Please bear with me. I am by no means a linux expert. I have set up a raid system with a hotspare (using ubuntu server). I am using the system ...
- 09-17-2009 #1Just Joined!
- Join Date
- Sep 2009
- Posts
- 6
Raid 1 & hotspare - Grub and testing
Please bear with me. I am by no means a linux expert. I have set up a raid system with a hotspare (using ubuntu server). I am using the system as a clonezilla PXE backup server. It consists of 3 120gb hdd (none of them are new) and they have been partitioned into 3: 15gb OS, 5gb swap and 100GB home. This is the output from cat /proc/mdstat:
sudo mdadm --query --detail /dev/md0Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sda2[0] sdb2[2](S) sdc2[1]
4883648 blocks [2/2] [UU]
md2 : active raid1 sda3[0] sdb3[2](S) sdc3[1]
97659008 blocks [2/2] [UU]
md0 : acivve raid1 sda1[0] db11[2]() ssdc1[1]
14651136 blocks [2/2] [UU]
unused devices: <none>
sudo mdadm --query --detail /dev/md1Version : 00.90
Creation Time : Wed Sep 16 10:24:54 2009
Raid Level : raid1
Array Size : 14651136 (13.97 GiB 15.00 GB)
Used Dev Size : 14651136 (13.97 GiB 15.00 GB)
Raid Devices : 2
Total Devices : 3
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Thu Sep 17 15:11:56 2009
State : active
Active Devices : 2
Working Devices : 3
Failed Devices : 0
Spare Devices : 1
UUID : 7885268e:c206d4c0:45790112:3fb57865
Events : 0.127
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 33 1 active sync /dev/sdc1
2 8 17 - spare /dev/sdb1
sudo mdadm --query --detail /dev/md2Version : 00.90
Creation Time : Wed Sep 16 10:25:16 2009
Raid Level : raid1
Array Size : 4883648 (4.66 GiB 5.00 GB)
Used Dev Size : 4883648 (4.66 GiB 5.00 GB)
Raid Devices : 2
Total Devices : 3
Preferred Minor : 1
Persistence : Superblock is persistent
Update Time : Thu Sep 17 15:07:20 2009
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 0
Spare Devices : 1
UUID : 4f6e9a41:0196bdb3:0e215fd1:a734c833
Events : 0.18
Number Major Minor RaidDevice State
0 8 2 0 active sync /dev/sda2
1 8 34 1 active sync /dev/sdc2
2 8 18 - spare /dev/sdb2
My questions/dev/md2:
Version : 00.90
Creation Time : Wed Sep 16 10:25:40 2009
Raid Level : raid1
Array Size : 97659008 (93.13 GiB 100.00 GB)
Used Dev Size : 97659008 (93.13 GiB 100.00 GB)
Raid Devices : 2
Total Devices : 3
Preferred Minor : 2
Persistence : Superblock is persistent
Update Time : Thu Sep 17 15:08:17 2009
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 0
Spare Devices : 1
UUID : 28de3a8b:42202b7b:9f3e4ea9:32618cf8
Events : 0.64
Number Major Minor RaidDevice State
0 8 3 0 active sync /dev/sda3
1 8 35 1 active sync /dev/sdc3
2 8 19 - spare /dev/sdb3
1) If I pull out sda (to simulate a fail) I presume it will start to use the hotspare. Once I put back sda, how do I return to the original state (ie sdb as the hotspare)?
2) find /boot/grub/stage1 returns:
Does this mean that all the disks will boot regardless of which fails?(hd0,0)
(hd1,0)
(hd2,0)
Here's hoping someone can explain a bit. Thanks.
- 09-17-2009 #2Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 1,935
I don't know if I will be of any help here because I've never used RAID and am not sure what you mean by "hotspare". I'm assuming the three drives are identical in setup as far as partitions and data? If you have (hd0) set as first boot priority and it crashes or you remove it, (hd1) should boot if you have it as second boot priority and you have Grub installed to the master boot record of (hd1) rather than to the root partition of that drive and the Grub stage1 of that drive points to the remaining Grub bootloader files on that drive. I don't believe your results of the find /boot/grub/stage1 command indicate that file is in the master boot record, just in the root partition.
This is my theory from my understanding of Grub as I've never used RAID?
- 09-17-2009 #3Just Joined!
- Join Date
- Sep 2009
- Posts
- 6
Thanks for the words.
Grub is really confusing me!
Hotspare is the term I've seen banded around.
I believe sdb isn't actually used until one of the drive dies ( although it is partitioned identically). Let's not get too hung up on the hotspare. I followed a guide which used 2 drives and just used my other spare drive, because. The machine is only used to backup my other machines and is really only powered on for that process.
So what I'm asking first is once I pull out the drive it will start rebuilding using sdb, but then I want to back to the earlier state (where sdb is the hotspare). I'd like to know how to do that.
And then back to grub. I am lost...
On the positive side the PXE clonzilla part is a lifesaver...


Reply With Quote
