How to increase partition size for FAT32 volume on VHD

diskpartvhdwindows-server-2008

I have VHD file attached as a disk (Disk 2 on screenshot below). It has only 1 partition formatted in FAT32 (so Linux clients can write something there). It got full, so I want to extend it. I used Hyper-V tool to extend the size of the disk – but I can't "expand" exiting partition:

DISKPART> expand vdisk maximum=50000

DiskPart has encountered an error: The parameter is incorrect. See the
System Event Log for more information.

and there is nothing in the Event Log (or may be I'm looking at a wrong place?..)

it's on Windows 2008 R2. Any idea how can I extend my disk from 30Gb to 50Gb?

Thank you.

enter image description here

Best Answer

According to Microsoft, you can't.

http://technet.microsoft.com/en-us/library/cc776741%28v=ws.10%29.aspx

... You can extend a volume only if it does not have a file system or if it is formatted using the NTFS file system. You cannot extend volumes formatted using FAT or FAT32.

You cannot extend a system volume, boot volume, striped volume, mirrored volume, or RAID-5 volume. ...

Simplest solution I can see is to create a new 50 GB disk, format it as FAT32, move the data over, delete the old one and redo your drive settings (letter, shares, etc).

Also, you might want to look into using SAMBA so you don't have to have FAT formatted drives for your Linux boxes.