Im using a mdadm software raid system on my new server which runs 3x120GB ssd drives.
Currently, this is the preinstalled configuration that came with the server
cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sdb2[1] sda2[0] sdc2[2]
96211904 blocks [3/3] [UUU]
md1 : active raid1 sda1[0] sdc1[2] sdb1[1]
20478912 blocks [3/3] [UUU]
unused devices: <none>
I would like to have more space available than 120gb, because right now its using only 1 drive for the data, 1 in raid + the other 1 in spare backup.
My question goes as is : Is it possible to have 3 drives running a raid 1 ?
Example : 3x120GB = 360GB. Have 180GB available and 180GB in raid
Any help would be really appreciated.
For more information on my current setup to show the 120GB only
df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 16G 208K 16G 1% /dev
tmpfs 16G 0 16G 0% /dev/shm
/dev/md1 20G 1.3G 17G 7% /
/dev/md2 91G 200M 86G 1% /vz
/dev/md1 20G 1.3G 17G 7% /var/named/chroot/etc/named
/dev/md1 20G 1.3G 17G 7% /var/named/chroot/var/named
/dev/md1 20G 1.3G 17G 7% /var/named/chroot/etc/named.conf
/dev/md1 20G 1.3G 17G 7% /var/named/chroot/etc/named.rfc1912.zones
/dev/md1 20G 1.3G 17G 7% /var/named/chroot/etc/rndc.key
/dev/md1 20G 1.3G 17G 7% /var/named/chroot/usr/lib64/bind
/dev/md1 20G 1.3G 17G 7% /var/named/chroot/etc/named.iscdlv.key
/dev/md1 20G 1.3G 17G 7% /var/named/chroot/etc/named.root.key
It sounds like you want a RAID10 with two mirrors on your three disks. Perfectly normal setup with Linux software RAID.
http://en.wikipedia.org/wiki/Linux_MD_RAID_10#Linux_MD_RAID_10
It does exactly what you described. You decide how many copies (mirrors) of each data block you want, and it will stripe the data to fill all the disks.
For example, if I have three devices (
/dev/loop0
,/dev/loop1
,/dev/loop2
), which are 100M each, I can accomplish what you suggested this way:The
-p f2
indicates that you want a "far" layout with "two" copies of each block device. And as you can see, the new RAID device is about 1.5 times the size of each disk:No, raid 1 requires an even number of disks. http://en.wikipedia.org/wiki/Standard_RAID_levels#RAID_1