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

Re: RAID 5 data structures



Joe McDonagh wrote:
Sam Leon wrote:
I have a funny question. I have been playing with a 3 disk raid 5 setup for my desktop. I guess I don't fully understand how the "stripe" is managed or even what it is. I know the stripe is made up of a chunk from each disk. Now I always thought of the stripe in raid the same as a block in ext3 or a cluster in ntfs. Meaning if I have a 1k file that I write to an ext3 filesystem with 4k blocks, my 1 k file will take up one block thus wasting 3k of space.

Now I thought the stripe in raid followed the same principle. Meaning if I have a 3 disk array with 64k chunks then my data stripe is the number of disks minus one drive because of parity so in this 3 disk array I would have a data stripe of 128k. So how much of that space would my 1k file take up? Would it take up the whole 128k stripe or just one chunk leaving the other chunk free for something else?

When I migrated my root drive over to the raid5 array I made, I was afraid that it would use alot more space on the raid array since it is full of very small files but to my surprise df -h reported the same values for / on the array and / on the single disk that I had copied the data from. So what is going on here?

Thanks,
Sam


IIRC, the 64k chunks are transparent to the FS. That's why you're still using 4k blocks. Strip size, width, chunk size, these terms have different meanings depending on who you talk to. But, if memory serves, you're seeing this because the FS is at a different level of abstraction than RAID.



So multiple files can fit into a chunk and when they need access the array fetches the whole chunk?

Thanks
Sam


Reply to: