RAW Logical Volume: Size Expansion for a VM

General support questions
Post Reply
BrandonM
Posts: 5
Joined: 2018/08/16 21:03:48

RAW Logical Volume: Size Expansion for a VM

Post by BrandonM » 2018/09/24 17:40:05

Hello,
I'm running CentOS 7.4 with KVM and some virtual machines. I have a RAW logical volume that's xTB in size (say 1TB) and is attached to a Windows virtual machine. That raw drive is then formatted inside the Windows VM to the proper usable format.
I want to extend that logical volume by xTB (say 2TB) so it will be 3TB. I'm able to easily do this without a problem and I can see the new size when I run lvs at the CentOS level.

The issue i'm running into is that the Windows VM doesn't see the new size of RAW logical volume; only the previous size. I'm wondering what I'm missing or doing incorrectly to allow the Windows VM to see the newly added space.

This is my first post here so any help from the community would be greatly appreciated. Thanks in advance for any advice and/or suggestions.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: RAW Logical Volume: Size Expansion for a VM

Post by TrevorH » 2018/09/24 17:45:19

If your guest was a linux one then you could run virsh blockresize $vm $device and that would notify the guest that its disk had changed and it would pick it up automatically. Last time I tried that with a Windows guest it immediately rebooted and picked up the changed disk size post-reboot. Not quite the effect that I was expecting :-( But that's what it requires, just a reboot. The blockresize is meant to do it without the reboot but Windows apparently doesn't understand it and it reboots anyway. I believe it's just a reboot required but it may need a virtual power-off/power-on to pick it up.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: RAW Logical Volume: Size Expansion for a VM

Post by hunter86_bg » 2018/09/24 19:53:30

I've used the second answer and it works for Linux, but I have never done it on my Windows machines.
Edit: I just realized you mentioned raw disk. I doubt the solution will help you,, but you can test on a test VM.

BrandonM
Posts: 5
Joined: 2018/08/16 21:03:48

Re: RAW Logical Volume: Size Expansion for a VM

Post by BrandonM » 2018/09/26 17:00:05

This was the fix I needed, thanks so much!!!! :D
The VM didn't reboot and all I needed to do inside the Windows VM was run 'Update-HostStorageCache' to read in the new disk size. Really appreciate the response on this.

Post Reply