Re: raid-5 initiated as raid-4?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu Feb 07, 2013 at 06:08:59 +0100, Roy Sigurd Karlsbakk wrote:

> Hi all
> 
> I have a test vm on which I do some testing of md raid. Just tried
> 
> root@raidtest:~# mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/vd{b..d}
> (wait a bit)
> root@raidtest:~# cat /proc/mdstat 
> Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
> md0 : active raid5 vdf[5](S) vde[4](S) vdd[3] vdc[1] vdb[0]
>       4191232 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
> 
Where did vde & vdf spring from? They weren't in your create command -
did you add those as spares later?

> ok, raid's up, but checking the data actually stored on disk on the host system shows:
> 
> root@smilla:/raid/libvirt/images# ls -l raidtest-{1..3}.qcow2
> -rw-r--r-- 1 libvirt-qemu kvm     393216 Feb  7 18:06 raidtest-1.qcow2
> -rw-r--r-- 1 libvirt-qemu kvm     393216 Feb  7 18:06 raidtest-2.qcow2
> -rw-r--r-- 1 libvirt-qemu kvm 2146500608 Feb  7 18:06 raidtest-3.qcow2
> 
> Does this mean the raid-5 is actually initiated as a raid-4?
> 
RAID-5 is always created with n-1 disks, with the final disk being
recovered afterwards. It's quicker to do a linear read from the other
disks and a linear write onto the final disk (creating parity or
rebuilding the data as needed) than it is to intersperse reads & writes
on all disks and just create the parity data (for RAID5 anyway -
reconstructing the data on a RAID6 from P & Q parity is far more
expensive, so it's quicker to just generate the parity there).

HTH,
    Robin
-- 
     ___        
    ( ' }     |       Robin Hill        <robin@xxxxxxxxxxxxxxx> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

Attachment: pgpXsdJdDzJYx.pgp
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux