Description of problem: Currently the [backend-setup] uses defaults provided in [1] while setting up lvm. However for finer tuning user could use pv, vg, and lv modules. Make [backend-setup] configurable and use the diskcount, stripesize to calculate the chunksize, and an additional variable `chunksize' in the backend-setup module to override the calculations by gdeploy. This enhancement has been made on the eve of a recent issue, this change has been made to backend-setup to avoid such issues is backend-setup is preferred over pv, vg, lv modules.
How to verify the bug: Use the below configurations to test the bug: Scenario 1: chunksize variable overriding gdeploy calculations [hosts] 10.70.37.167 [disktype] raid6 [diskcount] 12 [stripesize] 256 [backend-setup] devices=/dev/vdb vgs=vg1 pools=pool1 chunksize=1024 lvs=lv1 mountpoints=/mnt/brick The above config should set the chunk size to 1M despite stripesize and diskcount being set. Scenario 2: Chunksize not set [hosts] 10.70.37.167 [disktype] raid6 [diskcount] 12 [stripesize] 256 [backend-setup] devices=/dev/vdb vgs=vg1 pools=pool1 lvs=lv1 mountpoints=/mnt/brick In the above scenario chunksize is set to 3M. Scenario 3: Jbod, RAID5, and RAID10 As per documentation by perf team: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.2/html-single/administration_guide/#Brick_Configuration we recommend 256K as chunk size, which will be used by default. If user wants to override then the chunksize variable has to be used. [hosts] 10.70.37.167 [disktype] raid10 [stripesize] 256 [backend-setup] devices=/dev/vdb vgs=vg1 pools=pool1 lvs=lv1 mountpoints=/mnt/brick With the above configuration the chunksize is set to 256K. Scenario 4: RAID10, chunksize variable set [hosts] 10.70.37.167 [disktype] raid10 [stripesize] 256 [backend-setup] devices=/dev/vdb vgs=vg1 pools=pool1 chunksize=1024 lvs=lv1 mountpoints=/mnt/brick In the above case chunksize is set to 1M.
Verified this bug with the scenarios mentioned in comment #3 -------------------------------- CASE 1: chunksize variable overriding gdeploy calculations # cat chunksize2.conf [hosts] 10.70.47.126 [disktype] raid6 [diskcount] 12 [stripesize] 256 [backend-setup] devices=/dev/sdb,sdc,sdd vgs=vg1,vg2,vg3 pools=pool1,pool2,pool3 chunksize=1024 lvs=lv1,lv2,lv3 mountpoints=/mnt/brick1,/mnt/brick2,/mnt/brick3 # lvs -o name,chunksize LV Chunk root 0 swap 0 lv1 0 pool1 1.00m lv2 0 pool2 1.00m lv3 0 pool3 1.00m ------------------------------------- CASE 2: Chunksize not set # cat chunksize3.conf [hosts] 10.70.47.126 [disktype] raid6 [diskcount] 12 [stripesize] 256 [backend-setup] devices=/dev/sdb,sdc,sdd vgs=vg1,vg2,vg3 pools=pool1,pool2,pool3 lvs=lv1,lv2,lv3 mountpoints=/mnt/brick1,/mnt/brick2,/mnt/brick3 # lvs -o name,chunksize LV Chunk root 0 swap 0 lv1 0 pool1 3.00m lv2 0 pool2 3.00m lv3 0 pool3 3.00m --------------------------- CASE 3: RAID 10 and chunksize variable not set # cat chunksize4.conf [hosts] 10.70.47.126 [disktype] raid10 [diskcount] 12 [stripesize] 256 [backend-setup] devices=/dev/sdb,sdc,sdd vgs=vg1,vg2,vg3 pools=pool1,pool2,pool3 lvs=lv1,lv2,lv3 mountpoints=/mnt/brick1,/mnt/brick2,/mnt/brick3 # lvs -o name,chunksize LV Chunk root 0 swap 0 lv1 0 pool1 256.00k lv2 0 pool2 256.00k lv3 0 pool3 256.00k -------------------------------------- CASE 4: RAID10, chunksize variable set # cat chunksize5.conf [hosts] 10.70.47.126 [disktype] raid10 [diskcount] 12 [stripesize] 256 [backend-setup] devices=/dev/sdb,sdc,sdd vgs=vg1,vg2,vg3 pools=pool1,pool2,pool3 chunksize=1024 lvs=lv1,lv2,lv3 mountpoints=/mnt/brick1,/mnt/brick2,/mnt/brick3 # lvs -o name,chunksize LV Chunk root 0 swap 0 lv1 0 pool1 1.00m lv2 0 pool2 1.00m lv3 0 pool3 1.00m ---------------------------------- CASE 5: RAID5, chunksize variable not set # cat chunksize6.conf [hosts] 10.70.47.126 [disktype] raid5 [diskcount] 12 [stripesize] 256 [backend-setup] devices=/dev/sdb,sdc,sdd vgs=vg1,vg2,vg3 pools=pool1,pool2,pool3 lvs=lv1,lv2,lv3 mountpoints=/mnt/brick1,/mnt/brick2,/mnt/brick3 # lvs -o name,chunksize LV Chunk root 0 swap 0 lv1 0 pool1 256.00k lv2 0 pool2 256.00k lv3 0 pool3 256.00k ---------------------------------------------- CASE 6: RAID5, chunksize variable set # cat chunksize7.conf [hosts] 10.70.47.126 [disktype] raid5 [diskcount] 12 [stripesize] 256 [backend-setup] devices=/dev/sdb,sdc,sdd vgs=vg1,vg2,vg3 pools=pool1,pool2,pool3 chunksize=1024 lvs=lv1,lv2,lv3 mountpoints=/mnt/brick1,/mnt/brick2,/mnt/brick3 # lvs -o name,chunksize LV Chunk root 0 swap 0 lv1 0 pool1 1.00m lv2 0 pool2 1.00m lv3 0 pool3 1.00m ---------------------------------------- CASE 7: JBOD, chunksize variable not set # cat chunksize8.conf [hosts] 10.70.47.126 [disktype] Jbod [diskcount] 12 [stripesize] 256 [backend-setup] devices=/dev/sdb,sdc,sdd vgs=vg1,vg2,vg3 pools=pool1,pool2,pool3 lvs=lv1,lv2,lv3 mountpoints=/mnt/brick1,/mnt/brick2,/mnt/brick3 # lvs -o name,chunksize LV Chunk root 0 swap 0 lv1 0 pool1 256.00k lv2 0 pool2 256.00k lv3 0 pool3 256.00k -------------------------------------------- CASE 8: JBOD, chunksize variable set # cat chunksize9.conf [hosts] 10.70.47.126 [disktype] Jbod [diskcount] 12 [stripesize] 256 [backend-setup] devices=/dev/sdb,sdc,sdd vgs=vg1,vg2,vg3 pools=pool1,pool2,pool3 chunksize=1024 lvs=lv1,lv2,lv3 mountpoints=/mnt/brick1,/mnt/brick2,/mnt/brick3 # lvs -o name,chunksize LV Chunk root 0 swap 0 lv1 0 pool1 1.00m lv2 0 pool2 1.00m lv3 0 pool3 1.00m
Based on comment #5,moving this to verified state.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:2777