LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Have software raid1, but like to change to raid1+0 or 0+1, how? (https://www.linuxquestions.org/questions/debian-26/have-software-raid1-but-like-to-change-to-raid1-0-or-0-1-how-628259/)

spaceuser 03-15-2008 01:18 PM

Have software raid1, but needs raid1+0 on IDE master/slave. Doable?
 
Hi!

I run a Debian Etch server with two IDE disks in raid1 config. Since I've got almost no size left, I had bought two new IDE disks. Now I have same size of all four disks, 320 GB each. The two new disks are added as slave disk, /dev/hdb and /dev/hdd, since the raid1 uses /dev/hda and /dev/hdc. These new disks are not yet in use though. Not even partitioned.

I read at http://unthought.net/Software-RAID.H...RAID.HOWTO.txt that it's no good to use slave disks in a raid1 configuration. Therefore I wonder if I add them to use as a raid10 or raid1+0 solution. Could that be doable? My problem is space in the first place, but I would like the security of mirroring.

I would appreciate any comment if this is bad thing to even try.

My setup today is as below:

monster:~# mdadm --detail /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Mon Aug 13 20:48:23 2007
Raid Level : raid1
Array Size : 497856 (486.27 MiB 509.80 MB)
Device Size : 497856 (486.27 MiB 509.80 MB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Sat Mar 15 06:25:49 2008
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

UUID : 9abf499c:64dc4841:641eba6f:09dde039
Events : 0.30

Number Major Minor RaidDevice State
0 3 1 0 active sync /dev/hda1
1 22 1 1 active sync /dev/hdc1
monster:~# mdadm --detail /dev/md1
/dev/md1:
Version : 00.90.03
Creation Time : Tue Aug 14 21:52:34 2007
Raid Level : raid1
Array Size : 309138688 (294.82 GiB 316.56 GB)
Device Size : 309138688 (294.82 GiB 316.56 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 1
Persistence : Superblock is persistent

Update Time : Sat Mar 15 18:45:03 2008
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

UUID : bb58765c:3dd91164:2bf158eb:3fb6ea5a
Events : 0.34

Number Major Minor RaidDevice State
0 3 3 0 active sync /dev/hda3
1 22 3 1 active sync /dev/hdc3
monster:~# mdadm --detail /dev/md2
/dev/md2:
Version : 00.90.03
Creation Time : Tue Aug 14 21:55:19 2007
Raid Level : raid1
Array Size : 2931776 (2.80 GiB 3.00 GB)
Device Size : 2931776 (2.80 GiB 3.00 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 2
Persistence : Superblock is persistent

Update Time : Thu Mar 6 08:23:16 2008
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

UUID : a369f412:b0ee8f1a:ca3122fe:907a7d4e
Events : 0.18

Number Major Minor RaidDevice State
0 3 2 0 active sync /dev/hda2
1 22 2 1 active sync /dev/hdc2

monster:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md1 291G 271G 4.9G 99% /
tmpfs 1.9G 0 1.9G 0% /lib/init/rw
udev 10M 60K 10M 1% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/md0 471M 22M 425M 5% /boot
monster:~#

MensaWater 03-16-2008 08:00 AM

On looking at the link I believe the message there is not to use slave IDE at all.

However, I think he is suggesting this due to performance of slave IDE which for RAID 1 might be an issue if you are using the master as the primary and the slave as the secondary. Mirroring requires writes to both drives so will slow down to the speed of the second drive.

Also you mention you already have a RAID 1 config on your existing drives.

Given the foregoing I would suggest you make a NEW RAID 1 config of your two new drives and don't touch the original RAID 1. (i.e. leave it as it is). You could mount the new RAID 1 as a new filesystem and do test of reads/writes to it without impacting your OS on the original RAID 1. Any other reconfig no matter how you did it would:
a) Require you to reload the OS because you can't simply change the RAID type.
b) Would mean your performance on ALL disks would be as slow as the slowest of them (presumably the IDE slaves).

Dutch Master 03-16-2008 08:47 AM

I'd suggest a RAID 5 setup. However, that does require you to re-install the OS (which isn't a bad thing because even Debian gets cluttered with unwanted software over time). If you get 2 more disks you can put those RAID 5's in a RAID 1 setup: nesting RAID arrays is possible ;) http://en.wikipedia.org/wiki/RAID

spaceuser 03-16-2008 11:22 AM

Ok, I think I understand a bit more, but the suggestion on using Raid 5 won't be an answer to my problem as far as I know, because I'm desperate in the need of more space. Not higher security or performance.

To keep performance as is or better, I maybe could add a second IDE controller, ie Promise Ultra 133 or similar, and add a second Raid1, but I don't know if it could coexist with the IDE on the motherboard itself. In case it could, then all drives would be master drives as the link in some way also suggests.

Thanks

jschiwal 03-16-2008 11:32 AM

With mirroring you get 1/2 the space: 320 GB * 4 drives / 2 = 640 GB.

With Raid 5 you get 2/3 the space: 320 GB * 3 drives * 2/3 = 640 GB + hot spare.

For performance getting another controller would be a good idea. They aren't very expensive at all.

Dutch Master 03-16-2008 11:44 AM

And with that 4th disk you'll get another 160 GB. Calculate your array here: http://www.grijpink.eu/tools/raid/index.php Your array would have 894 GB usable space :)

spaceuser 03-16-2008 01:42 PM

WOW... 896 GB of useable space!!! I seem to be missinformed about Raid 5 earlier, that's for sure. But I find it hard to find a RAID controller for IDE disks, since they are almost out of market.
I did find a HIGHPOINT ROCKETRAID 454 4-CHANNEL ATA133 RAID PCI that could be the one. I was even thinking of a simpler solution but maybe not doable. There are converters out there to convert IDE disk to SATA controller, and the motherboard do have a sata controller that is not in use.

jschiwal 03-17-2008 12:48 AM

You could use your regular ide controllers and Linux Software raid. The cheaper ide raid cards aren't much better than software raid anyway. Especially the low end Promise raid card. Don't use the slave connector however. For 4 hard drives you could purchase 2 ATA133 IDE controllers for around $30. That supposes that you have 2 ide slots available for controllers.

I would recommend having the /boot partition being a normal partition and not a part of raid. That would make life a lot easier. On my old desktop I had the disk start with a 80MB partition. The second disk had a matching 80MB partition that I used as a backup for the first. I was using Raid 1 on the rest.

You could do the same with three or four disks. The /boot partition is very small so the space lost wouldn't amount to much. If the drive with the /boot partition went bad, you could simply use one of the others to boot up with from the grub shell. The /etc/fstab file would need editing.

You could instead use mirroring (raid 1) for the first /boot partition with the partition on the third disk drive being used for a spare partition. So /dev/hda1 & /dev/hda2 would be active. /dev/hda3 would be a spare. Then you could clone the /boot partiton to /dev/hda4. That way if you can't boot to the /boot raid parition, you could still use the grub shell and load the kernel and initrd file from (hd3,0)/.

Good Luck.

spaceuser 03-17-2008 02:07 PM

Many thanks!!!


All times are GMT -5. The time now is 06:05 PM.