1

Hyper-V Host is 2012 R2 with several guests.

My primary guest is a TFS server using a 100G VHD. I wasn't really keeping track of it that close and at some point the VHD hit 100% space used. I expanded the size by 20G, but the space used remained at 100%.

So I begin trying to understand how to fix the issue by asking why did the 20G I added not leave me with open space on the VHD?

Alan
  • 973
  • 2
  • 17
  • 34

2 Answers2

4

You added space to the VHD. You didn't, however, change the partition table on that disk so that the file system on the disk can use the extra space. So, to the guest OS, it looks like a disk with one partition and some empty space that could be used for another partition. You can either add another partition (which would be an odd choice) and then format it with a second file system, at which point you'll see two drive letters (if you're using them) and all the space will be available. Or, more usefully, you can extend the partition that exists, at which point the existing file system will use the extra space.

Jake Oshins
  • 5,116
  • 17
  • 15
  • Wow, what a rookie oversight that was. I actually knew this but it didn't pop off the screen; probably had something to do with trying to figure it out at 1am! I'll also add here that the 2012 R2 Gen 2 VM's are really nice; I was able to expand the VHD in Hyper-V with the VM online, and the VM was ready for the disk management operation immediately and worked great. Thx. Step 1, though. I'll have another post shortly. – Alan Mar 10 '16 at 18:42
2

Did you extend the disk in the Disk Management console in the guest? If not then that's why. You need to first expand the VHD in the settings of the VM and then you need to extend the disk in the guest Operating System.

joeqwerty
  • 108,377
  • 6
  • 80
  • 171
  • Appreciate both responses which are the same, but had to chose one to mark, so marked Jake as it seems he answered first, and probably could also use the points ;). But I always appreciate your answers, Joe. Always on target. Perhaps you can help with the next post I make on this new saga to figure out what I did wrong when setting up this server. But for now, the space showed up on the VHD. I'll post the link below here after I've figured out the best way to ask it. – Alan Mar 10 '16 at 18:38
  • Glad to help... – joeqwerty Mar 10 '16 at 18:41
  • Actually Joe answered first. I just thought a little more detail might help people understand. – Jake Oshins Mar 10 '16 at 18:46
  • It certainly did. This is my follow-up post for the overall problem of disk usage that I have to resolve: [new post regarding disk usage issue](http://serverfault.com/questions/762998/does-2012-r2-tfs-sql-need-limits-set-so-it-doesnt-eat-up-disk-space-with-logs) – Alan Mar 10 '16 at 20:04