New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
512 vs 4k block size devices under XFS #372
Comments
I did a manual test with 2 devices in a pool, one 512, one 4096. Created a single FS and consumed 89% of the total size of the pool and seemed to have no issues. The devices were loopback devices eg.
Starting to think device mapper hides this by emulating |
Taken from Mike's https://people.redhat.com/msnitzer/docs/io-limits.txt doc.
We may want to prevent devices with different block sizes to be incorporated into a pool, but we should discuss. |
Update: This has been removed: lvmteam/lvm2@0404539 |
@tasleson @trgill did this discussion about allowing devices with mixed block sizes into the same pool ever happen? I have several servers with 8TB disks and 4,096 byte sector sizes. Those same servers also have some NVMe devices with 512 byte sector sizes. The total capacity is 1.5TB of NVMe and 70TB of HDD. I'm especially interested in creating a single Stratis pool with the NVMe devices added as cache devices. My testing shows that this does not work... Any suggestions would be appreciated!
|
@johnsimcall We have discussed this issue, but only in the most general terms. Note that the error you experienced when adding the cache is irrelevant to your question; you need to initialize a cache now before you can add more devices to the cache. |
Thanks @mulkieran, your advice to I'd love to hear more about mixing 4096 and 512-byte media in the same pool. At this point I've created a stratis filesystem and am running an |
@johnsimcall FYI: lvm placed restrictions on mixed block sizes lvmteam/lvm2@0404539 |
Thanks for the additional info @tasleson ! The statement that stood out most to me was...
This seems pretty damning... Can I try one last time to wiggle success out of my hardware before finally putting this issue to bed? 😁
My testing with fio has been successful so far... 🤞
|
When you are exercising good path, I don't think there is much to worry about. From what I posted in https://github.com/stratis-storage/stratisd/issues/1196#issuecomment-465142750 issues would arise in use cases like writing while you lose power, or some other interruption in the write operation which causes the write to be incomplete for a logical sector that is composed of multiple physical sectors. Although, if you lose power in the middle of a write you would likely corrupt one of the physical sectors which would result in an error on reading the logical sector later. One good thing I can think of is that XFS has check sums on all of it's metadata. Thus it would be able to detect a "partial write" as the check sum would fail. LVM doesn't know what filesystem will be used with it, thus requires a more conservative approach. However, to really answer this question would involve a discussion with the device mapper kernel and XFS folks. |
Wonderful, thank you for the additional details @tasleson! As a take-away from this discussion, I would suggest that Stratis should behave similar to LVM and alert users to mismatched blocksizes... Perhaps even prevent users from mixing block sizes in a pool. |
I found these comments from Mike Snitzer regarding 4096-byte IOs being issued to 512-byte disks to be interesting.
I wonder if an intermediate layer which reports a a minimum block-size of 4096 bytes would mitigate any of his concerns (like a device-mapper device or an lvm volume.) |
Our plan at this time is to ensure that pools can not be created with devices w/ different block sizes. |
We've implemented a policy that restricts the combinations of block sizes that are allowed. |
I think XFS needs a constant block size for the underlying devices.
Write tests that:
The text was updated successfully, but these errors were encountered: