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

discard=on breaks for EFI disks #47

Open
wdoekes opened this issue May 2, 2023 · 1 comment
Open

discard=on breaks for EFI disks #47

wdoekes opened this issue May 2, 2023 · 1 comment

Comments

@wdoekes
Copy link
Member

wdoekes commented May 2, 2023

See #31 (comment)

[The] volume type would need to be available in the translator so it can skip setting discard=on if it sees type efidisk.

proxmove/proxmove

Lines 1860 to 1876 in 18fcd8d

class AddDiscardOnTranslator(object):
def volume_properties(self, new_volume):
"""
Add "discard=on" flag to properties if possible
"""
props = super().volume_properties(new_volume)
if new_volume.storage and new_volume.storage.has_discard_support:
values = props.split(',')
name, rest = values[0], values[1:]
rest = [
i for i in rest if i not in ('discard=on', 'discard=off')]
rest.append('discard=on')
rest.sort()
props = ','.join([name] + rest)
return props

@wdoekes
Copy link
Member Author

wdoekes commented Jun 6, 2023

This PR addesses things: #46

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

1 participant