Posts

Showing posts with the label RAID

Consistent software RAID disk errors on nVidia MCP51

My brand new pair of disks in a setup that would otherwise work perfectly fine, decided to keep giving me headache. There are only two disks in the machine, partitioned in three, with the first two pairs of partitions in a RAID1 array. And every now and then one of the disks would disappear from the system, then re-appear with a different drive letter (e.g. sda would become sdc). Obviously the disk would get kicked out of the RAID, but I can then add it back and wait for the 1.5TB partition to sync back the RAID. The errors look like this: Oct 29 03:44:59 lion kernel: ata1.00: n_sectors mismatch 3907029168 != 268435455 Oct 29 03:44:59 lion kernel: ata1.00: revalidation failed (errno=-19) Oct 29 03:44:59 lion kernel: ata1.00: limiting speed to UDMA/133:PIO2 Oct 29 03:44:59 lion kernel: ata1: hard resetting link Oct 29 03:44:59 lion kernel: ata1: nv: skipping hardreset on occupied port Oct 29 03:45:00 lion kernel: ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) Oct 29 03:45:00 lio...

Recovering from a failed LVM2 pvmove

After I left a loop moving the data from my LVM2 LVs to a new raid1 array overnight (I wanted to also reorder the LVs physically at the beginning of the disk) I came back in the morning to see that one of the moves had hung. I killed it, and the loop kept going. Unfortunately something had already gone wrong and I had to issue pvmove --abort to get things in order. And that almost worked, except I started getting these: > sudo lvs --all Number of segments in active LV pvmove0 does not match metadata Number of segments in active LV pvmove0 does not match metadata LV VG Attr LSize Origin Snap% Move Log Copy% Convert  download lionvg -wi-ao 200.00g home lionvg -wi-ao 100.00g kvmpool lionvg -wi-ao 50.00g opt lionvg -wi-ao 15.00g [pvmove0] lionvg p-C-a- 0 repos lionvg -wi-ao 2.00g root lionvg -wi-ao 4.00g  usr lionvg -wi-ao 20.00g var lionvg -wi-ao 20.00g I was furthermore unable to destroy or make inac...

RAID 5 is faster than RAID 1 (reading)

Image
I've been using my two 500G drives in a mixed RAID1/RAID5 array. The drives are partitioned in three -- 100M, 10G, and 460G partitions. The first partition of every drive is in a RAID1 -- this is my boot partition. The 10G partitions are also in a RAID1 (the root partition). And the big partitions are assembled in RAID5. All is fine, and testing each RAID device with hdparm revealed reading performance equal to that of a single hard disk -- about 60MB/s. Today I added another disk. Same partitioning -- I grew the raid5 array to become double the size and I also added another device to the raid1 arrays so that there are three mirrors. Curious as I am, I again tested the RAID devices with hdparm. The results were intriguing -- the RAID 5 array read at 120MB/s while the RAID 1 arrays were still stuck at 60MB/s. It is also interesting that when there were only two drives in the RAID 5 array hdparm -t reported 60 MB/s. I figure that the 64k chunks on the RAID5 array force reading from ...

RAID5 on two disks only

I'm building a new server, but since I am a little short on cash I managed to only buy two 500GB Western Digital hard drives. The logical solution would be to add them to a RAID-1. RAID-0 offers no redundancy in case of a crash, and RAID-5 is not possible if you believe what everyone is saying, including this Wikipedia article . The truth is that RAID-5 requires only two drives to operate properly. The way RAID-5 works is that it stores the checksum of all data blocks in a stripe in a checksumming block on the same stripe. So, if you have only two disks you'll get the data of one disk checksummed on the other and they'll go on alternating as per the specification. In other words, by joining my two disks on a RAID-5 I'll get almost the equivalent of a RAID-1. And if you don't believe me, here is how to try it for yourselves. First, create two empty files of about 100MB in size: dd if=/dev/zero bs=100M count=1 of=diskA dd if=/dev/zero bs=100M count=1 of=diskB Bind th...