chef-gluster
chef-gluster copied to clipboard
GPT disklabel and partition alignment
In server_setup recipe, fdisk could be replaced with parted to allow for proper usage of disks larger than 2TB, by using GPT disklabels. The partitions that is created should also be properly aligned for best performance.
I'm no longer using glusterfs, but thought I'd leave this here for you to think about, if you'd wish to implement it in the future.
This blog post contains lots of good information and links to other resources: http://rainbow.chard.org/2013/01/30/how-to-align-partitions-for-best-performance-using-parted/
Thanks! I will take a look at it
We just ran into this problem :( Definitely causes issues when trying to add a drive > 2TB.
@bushong1 in the pending rewrite, LVM is used instead of fdisk
Please consider creating GPT disklabel regardless! The recommended setup for LVM is to use a partition spanning the whole disk for the PV anyway.
It would probably be as easy as including "package parted" and modifying the old fdisk commands in the recipe.
@bjozet LVM uses pvcreate, not fdisk See https://github.com/chef-cookbooks/lvm/blob/master/libraries/provider_lvm_physical_volume.rb#L44
@shortdudey123, The lvm-cookbook doesn't seem to take alignment into consideration, and that is kind of the point of this issue. Yes, you can use pvcreate on a raw device without partitions on it. To get alignment, pvcreate needs proper arguments to it, which i didn't see in the lvm-cookbook (although, i might have missed it, didn't look too long), hence my suggestion to use "parted" to create an aligned partition first, together with a GPT disklabel. Or this whole alignment issue could be filed against the lvm-cookbook.
I'm not gonna argue a lot about it, since i'm not using the gluster cookbook, I just happened to get the notification when there was activity on the issue.
Which ever way you choose to go, good luck! :-)