Im starting to use XFS because I want to create a highly parallel disk array and experimenting on just 2 drives for now.

I had thought that if I used a logical volume group to join two physical volumes and then put XFS over the top, XFS would take advantage of both drives by having each handle one of the requests, whereas raid 0 would force both drives to handle both requests. Unfortunately, I just tried this and iostat shows that all the data is being written to /dev/sdb, whilst /dev/sdc is doing nothing. Have I misunderstood the point of XFS? Perhaps the advantage of parallelization only shows as the disks become full and operations start to occur on files that are already on different drives?

For reference the two commands I ran in parallel were:

dd if=/dev/zero of=10000MB.img bs=1M count=10000 conv=fdatasync
dd if=/dev/zero of=10000MB2.img bs=1M count=10000 conv=fdatasync

I don't think you've misunderstood XFS, but maybe LVG. "Joining" two disks sounds like concatenation, in which case what you're seeing sounds correct. It would fill up one disk, then continue on to the next.

I think you really want RAID0, which would "stripe" the data across the two disks filling them up at the same time.

  • But surely by striping my drives, they all have to respond to every request rather than splitting the disk queue amongst the pool of drives? – Programster Sep 3 '14 at 18:41
  • By striping two disks, each disk would respond to (roughly) half of the request. – pdo Sep 3 '14 at 18:50
  • I understand that, I just don't understand what XFS raid 0 gives me over Ext3 RAID 0 then since all requests have to utilize all drives now. Perhaps what I am looking for is to stripe the logical volume so that the data is split across drives in chunks, but both drives are not forced to handle each request. - access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/… – Programster Sep 3 '14 at 18:57
  • 1
    For example, if your stripe size is 128KB, and your requests are less than that, you'll only hit one disk. Assuming the data you've requested is located in one stripe. – pdo Sep 3 '14 at 19:03
  • 1
    yes, for a second there I forgot that RAID 0 works at a block level, not a file level. Im off to recreate a raid 0 XFS. – Programster Sep 3 '14 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.