Partitions is not shrinking in windows 10

Server

FOG Version: 1.3.2

OS: Ubuntu 14.04

Client

Service Version: 0.11.8

OS: Windows 10

Description

I am trying to capture an image from a windows 10 machine. (Our windows 7 machines captured fine.) The issue is, when single disk resizable is selected, it does not resize. Before partclone begins it says “not shrinking, fixed size.” When partclone is running it shows the correct device size (498.6gb) and the correct space in use (18.3gb).

This is going to prevent me from deploying to clients with a smaller hard drive.

Why isnt fog able to shrink the C: partition to the 18gb that are in use? Is there a problem with how the partitions were created?

@Wayne-Workman I haven’t either, but the OP is installing windows 10 on a legacy system using, more or less, a single partition layout as described earlier. It may have been setup manually rather than letting windows do its think naturally (or there’d likely be at least one more partition).

@Tom-Elliott Do you think we should have the OP setup a debug capture/deploy to get the output of lsblk ? This way we have a solid idea what the partition structure looks like?

It could also be akin to the issue that you coded for in the postinstall script where the disk structure is a bit different between win7 and win10. On win7 p2 was the C: drive and on win10 p3 was the c: drive.

The issue of not resizing is we were always making the first partition a fixed size. This will be corrected for I hope. I think it was more a fail safe to the typical partitioning scheme, but again it was assumptive in nature.

I’ve changed the code base to hopefully handle this more properly as fixed size partitions will typically be automatically populated if/when/where possible. Of course, you can still specify your own fixed size partitions after the image gets uploaded (or via postinitscripts now) as you see fit.

With any luck this will help address this issue. I suppose we could consider it a bug, but an originally (semi) intentional one. I think we were meaning to just be safe with how to handle these things.

@coop90 I don’t know where your knowledge level with fog is - but maybe this post will help future readers so… a few things.

If an image is captured as non-resizable, you cannot change it to resizable w/o re-capture and expect it to deploy correctly.

For an image to be resizable, it must be captured as resizable.

It helps greatly with resizing if the disk is well-defragmented before the capture process.

For the partitions to be resized, there needs to be free space on the partitions.

I would suggest double checking what image is assigned to the host you are capturing from. Do not assume this, go and actually literally check the host (via the web interface) and see what image it is assigned - then go look at that image and ensure it’s set as resizable.