Skip to content
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

Thin Logical Volume size - use entire VG #74

Open
holmesb opened this issue Oct 29, 2019 · 4 comments
Open

Thin Logical Volume size - use entire VG #74

holmesb opened this issue Oct 29, 2019 · 4 comments

Comments

@holmesb
Copy link

holmesb commented Oct 29, 2019

I'm trying to create a brick that uses the entire physical disk by pre-allocating the entire disk's space in a thin Logical Volume, without specifying an absolute size (in GB\TB, etc).

The thin pool is fine since in variable: gluster_infra_thinpools, can use:
thinpoolsize: "99%VG", which leaves one percent for the pool metadata (16GB).

But this approach fails when creating the thin LV using variable: gluster_infra_lv_logicalvols that has: lvsize: "99%VG". Error occurs: "Thin volume sizing with percentage not supported":

ASK [gluster.infra/roles/backend_setup : Create thin logical volume] *************************************************************************************************************************************************************************

Tuesday 29 October 2019  15:38:19 +0000 (0:00:00.103)       0:00:29.366 *******
failed: [storage-server] (item={'vgname': 'vg_sda', 'thinpool': 'vg_sda_thinpool', 'lvname': 'vg_sda_thinlv', 'lvsize': '99%VG'}) => {"changed": false, "index": 0, "item": {"lvname": "vg_sda_thinlv", "lvsize": "99%VG", "thinpool": "vg_sda_thinpool", "vgname": "vg_sda"}, "msg": "Thin volume sizing with percentage not supported."}

How can I avoid specifying the absolute size of each disk in the lvsize value?

@holmesb
Copy link
Author

holmesb commented Oct 29, 2019

"by pre-allocating the entire disk's space in a thin Logical Volume" - why not use a thick volume instead? We need to use snapshots, and thin volumes are a pre-requisite.

@sac
Copy link
Member

sac commented Oct 30, 2019

Under thinpool and thinvolume create if you don't give size 100% will be assumed.

roles/backend_setup/tasks/thin_pool_create.yml: size: "{{ item.thinpoolsize | default('100%FREE') }}"

Leave out the thinpoolsize parameter. It will use the entire disk.
Refer: https://github.com/gluster/gluster-ansible/blob/master/playbooks/hc-ansible-deployment/gluster_inventory.yml for an example.

@holmesb
Copy link
Author

holmesb commented Oct 30, 2019

I take your point for gluster_infra_thinpools.thinpoolsize, but sizing for gluster_infra_thinpools.poolmetadatasize isn't consistent. poolmetadatasize has a default in the "Create a LV thinpool-meta", but in the same task: "Create a thin pool" will error if a value isn't specified. This is veering away from the original issue though.

I think the original issue is with the lvol module rather than this role. It doesn't support percent values for size when creating thin volumes.

@sac
Copy link
Member

sac commented Nov 11, 2019

You are right regarding the consistency. But poolmetadata size we cannot leave it to default to 100%. Since it is just the metadata. And we have to default to a saner value if it is not given than erroring out. Because we know what would be the ideal value for metadata.

Regarding lvol module, you are right. It is not quite flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants