-
Notifications
You must be signed in to change notification settings - Fork 122
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
:resize action on physical volume doesn't work on unallocated pvs #39
Comments
This is what is breaking the code: On a completely new/clean physical volume, the
I would submit a fix but I am not 100% sure what this block of code is trying to achieve:
I might be missing something, but couldn't this entire section be replaced by:
|
For those curious this is my workaround: lvm_physical_volume '/dev/sdb' do
if `pvs /dev/sdb -o pv_pe_count --noheadings | sed 's/ //g\` != 0
action :resize
else
action :create
end
end |
With the version 13+ of the chef-client you should make sure to use full paths in my workaround, otherwise it won't work because it can't find the commands. lvm_physical_volume '/dev/sdb' do
if `/usr/sbin/pvs /dev/sdb -o pv_pe_count --noheadings | sed 's/ //g\` != 0
action :resize
else
action :create
end
end Please see this issue for more details: |
Reproduce:
lvm_physical_volume "/dev/sdb" do
action [:create, :resize]
end
pe_count becomes 0, because the PE Size is zero until it is allocated.
The text was updated successfully, but these errors were encountered: