Description of problem: When formatting a thinp LV as XFS, agcount is unexpectedly high. Apparently mkfs.xfs initially thinks stripe geometry applies and therefore creates more ag's than if a conventional LV of the same size is formatted; or if a physical disk partition of the same size is formatted. Version-Release number of selected component (if applicable): lvm2-2.02.98-12.fc19.x86_64 kernel 3.10.9-200.fc19.x86_64 xfsprogs-3.1.10-2.fc19.x86_64 How reproducible: Always Steps to Reproduce: 1. Create a 100GB thinp LV; a 100GB conventional LV; and 100GB disk partition. 2. Format each of them with mkfs.xfs without any options. Actual results: AG count = 16 for thinp LV; 4 for the other two. Expected results: thinp LV should also be 4. Additional info: Thread from XFS list elicited responses from XFS devs: http://oss.sgi.com/pipermail/xfs/2013-August/029626.html http://oss.sgi.com/pipermail/xfs/2013-August/029619.html http://oss.sgi.com/pipermail/xfs/2013-August/029625.html
conventional LV: [root@f19s ~]# blockdev --getiomin --getioopt /dev/mapper/vg1-data 512 0 thinp LV: [root@f19s ~]# blockdev --getiomin --getioopt /dev/mapper/vg1-data 512 262144
Still a bug, bumping to Fedora 20. ## virtual size LV, 2TB # mkfs.xfs /dev/VG/vLV meta-data=/dev/VG/vLV isize=256 agcount=32, agsize=16777216 blks ## conventional LV, 2TB # mkfs.xfs /dev/VG/cLV meta-data=/dev/VG/cLV isize=256 agcount=4, agsize=134217728 blks I'd think this would make any fragmentation problems worse.
(In reply to Chris Murphy from comment #0) > Additional info: > > Thread from XFS list elicited responses from XFS devs: > > http://oss.sgi.com/pipermail/xfs/2013-August/029626.html Hmm, ok so dchinner said: "What it should be doing is setting both the minimum_io_size and the optimal_io_size to the same value of 256k..." I guess I can buy that... (btw.. would've been _wonderful_ if I was cc'd on the original xfs mailing list thread. I clearly missed this BZ in the flood of BZ updates I tend to get)
I've staged a fix for 3.17 in linux-dm.git's 'for-next' branch here: https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=a99c223c2a88aeb404afaa1bfce91eb0dd36b80b
This went into 3.17 as commit fdfb4c8c1a9fc8dd8cf8eeb4e3ed83573b375285. F20 is rebased at this point.