XenServer Live Adjust capacity of drive that is shared
-
So the question is it possible to scale down the size of a drive in a VM while the VM and drive, are running and shared.
What happens to the rest of the space once scaled back?
-
I doubt it. And what do you mean exactly. Do you mean...
- Shrink the filesystem?
- Shrink the logical volume?
- Shrink the size on disk?
- Shrink the available growth size?
- Reclaim unused space via thin provisioning?
- Something else?
-
@scottalanmiller Actually shrink the disk size.
-
If you could, you would have to shrink the LV, and that would require a reboot to see the changes. Reboot of XS, not the VM.
-
@DustinB3403 said in XenServer Live Adjust capacity of drive that is shared:
@scottalanmiller Actually shrink the disk size.
Which disk, though? There are many layers here, I'm unclear which one you mean. You mean the VHD file?
-
@stacksofplates said in XenServer Live Adjust capacity of drive that is shared:
If you could, you would have to shrink the LV, and that would require a reboot to see the changes. Reboot of XS, not the VM.
Hrm.... this is at the VM level, not the host level.
Rebooting the VM should be enough I would think...
-
@scottalanmiller said in XenServer Live Adjust capacity of drive that is shared:
@DustinB3403 said in XenServer Live Adjust capacity of drive that is shared:
@scottalanmiller Actually shrink the disk size.
Which disk, though? There are many layers here, I'm unclear which one you mean. You mean the VHD file?
Sorry, Yes.
This is a secondary VHD inside of a VM.
-
@DustinB3403 said in XenServer Live Adjust capacity of drive that is shared:
@scottalanmiller said in XenServer Live Adjust capacity of drive that is shared:
@DustinB3403 said in XenServer Live Adjust capacity of drive that is shared:
@scottalanmiller Actually shrink the disk size.
Which disk, though? There are many layers here, I'm unclear which one you mean. You mean the VHD file?
Sorry, Yes.
This is a secondary VHD inside of a VM.
So to do that, you would need to adjust the filesystem, then the LVM, then the physical disk. I'm not aware of what tools allow for the VHD file to be resized in that way. You might need to image to another VHD after shrinking inside of the VM.
-
@scottalanmiller said in XenServer Live Adjust capacity of drive that is shared:
@DustinB3403 said in XenServer Live Adjust capacity of drive that is shared:
@scottalanmiller said in XenServer Live Adjust capacity of drive that is shared:
@DustinB3403 said in XenServer Live Adjust capacity of drive that is shared:
@scottalanmiller Actually shrink the disk size.
Which disk, though? There are many layers here, I'm unclear which one you mean. You mean the VHD file?
Sorry, Yes.
This is a secondary VHD inside of a VM.
So to do that, you would need to adjust the filesystem, then the LVM, then the physical disk. I'm not aware of what tools allow for the VHD file to be resized in that way. You might need to image to another VHD after shrinking inside of the VM.
So simply, add a new VHD at the desired size, copy the data from one to the other, remove the share and recreate it to the new VHD, and then remove the larger VHD.
And then reboot the VM.
That is what I figured.
-
@DustinB3403 said in XenServer Live Adjust capacity of drive that is shared:
@stacksofplates said in XenServer Live Adjust capacity of drive that is shared:
If you could, you would have to shrink the LV, and that would require a reboot to see the changes. Reboot of XS, not the VM.
Hrm.... this is at the VM level, not the host level.
Rebooting the VM should be enough I would think...
Well XS has each VM inside of a LV, then each VM has it's LV partitioning. So you could shrink the LV in the VM and restart the VM, but the main LV that the whole VM is in would still be the larger size.
However, you found what you needed so it doesn't matter.
-
With Hyper-V and ESXi, you can resize things inside the guest and then simply resize the VHDX/VDMK from the hypervisor tools afterwards.
-
@JaredBusch said in XenServer Live Adjust capacity of drive that is shared:
With Hyper-V and ESXi, you can resize things inside the guest and then simply resize the VHDX/VDMK from the hypervisor tools afterwards.
Same with KVM and Xen. XS does some LV magic when you create the VM. I believe it's how it does it's snapshots also (LV snapshots).
-
@stacksofplates said in XenServer Live Adjust capacity of drive that is shared:
@JaredBusch said in XenServer Live Adjust capacity of drive that is shared:
With Hyper-V and ESXi, you can resize things inside the guest and then simply resize the VHDX/VDMK from the hypervisor tools afterwards.
Same with KVM and Xen. XS does some LV magic when you create the VM. I believe it's how it does it's snapshots also (LV snapshots).
Then @DustinB3403's answer is of course it is.
-
Would he really need to reboot if he's adding another 'disk' copying data the removing the old disk?
-
@Dashrender said in XenServer Live Adjust capacity of drive that is shared:
Would he really need to reboot if he's adding another 'disk' copying data the removing the old disk?
Depends on the guest OS and applications using said space.