In the specifications for the storage.yml playbook, the sizes for the logical volumes are given using MB. The grading script is using a rounded off value for Gigabytes (or Gibibytes).
For the script to grade successfully, the volumes should be created using "MiB" (mibibytes) so that the calculation for the sizes of the LVs returns the expected values. The documentation does not default to using any specific unit.
@gmichae Apologies for late reply!
The Exercise wants you to configure 128MB & 256 MB logical volume
and the grading script is looking for 0.25 GB & 0.12 GB respectively - which is correct since 256 MB is 0.256 GB and similarly 128 MB is 0.128 GB.
Please let me know if I understood your question correctly.
Yes @Chetan_Tiwary_, you are correct that 256MB (Megabytes, not Mebibytes) is the same as .256GB (Gigabytes not Gibibytes). Likewise, 128MB is the same as .128GB. Gibibytes are 1000x bigger than Mebibytes, so the decimal place moves 3 places to the left when converting Mebibytes to Gibibytes, or 3 places to the right when converting from Gibibytes to Mebibytes.
With that said, the grading script is rounding the size of the volumes before comparing against the defined size for success/fail. I no longer have access to the environment to look at the grading script for the exact format. When I created the volumes using MB, they were indeed created as 128MB and 256GB appropriately. The grading script, however did not validate them as being sized correctly. It wasn't until I modified the volumes to 128MiB and 256GiB that the grading script marked them as Successful when checked.
Please test the lab using 128MB and 256MB (Megabytes) and then run the grading script against the lab. If my assertion is correct, they will be marked as Failed because the value of MB vs MiB is different enough when rounded for the grading script to incorrectly compare them against what is expected. If the script does indeed fail the lab when creating the volumes using Megabytes, run an lvextend -L 128MiB (or 256GiB) against the respective volumes and then grade it again. Again, if my assertion is correct, the grading script will mark them as Successful.
@gmichae Alright ! Thanks for providing me the detailed info, I will check your assertion in the lab and let you know.
@gmichae Also the ansible_facts['lvm']['lvs'][lv]['size_g'] will be size in GB.
OK. Maybe my lab at the time needed to be rebuilt. It was probably just coincidence that when I redid the sizing using MiB that it worked. Thanks!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.