Ask a questionAsk a question
 

QuestionProblem compressing VHD files

  • Sunday, October 18, 2009 9:31 AMFrogbit Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I'm attempting to compact some VHD files on a drive using the Hyper-V console. These VHDs are used as temporary storage (actually backups) so compacting them is useful at times. I have done this in the past and I'm sure I've done it on this particular drive. But now I get:

    The system failed to compact 'X:\...vhd'. Error Code: The requested operation could not be completed due to a file system limitation.

    Well that's helpful!

    Windows 2008 R2 RTM. The drive (hardware RAID0) containing these VHDs is its self backed up using 'Windows Server Backup': I mention this only because it is the only significant operational change to this drive that I can recall.

    Thanks

    Paul

All Replies

  • Tuesday, October 20, 2009 2:54 PMDavid Bermingham Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I'm not sure why you can't compress the VHD files, but I have found with R2 that running VHD files that have been compressed with NTSF compression is no longer supported.
    David A. Bermingham, Director of Product Management, SteelEye Technology
  • Tuesday, October 20, 2009 3:13 PMFrogbit Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Ah, I should not have used the word "compress". "Compact" is what I meant, as in the Hyper-V console's built-in feature for reducing the size of dynamic VHDs.

    I select a VHD to edit in Hyper-V console and pick "compact": Then I get the message!

    Paul
  • Thursday, October 22, 2009 9:40 AMVincent HuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,

     

    I’d like to confirm the size of the VHD file you want to compact. I found a Microsoft Knowledge Base described the similar issue with yours(even if it’s available for Windows Server 2008)

     

    If the VHD file is too big, please try to compact a small VHD file to check whether you get the same issue.

     

    A heavily fragmented file in an NTFS volume may not grow beyond a certain size

    http://support.microsoft.com/kb/967351/en-us

     

    Error status message from the ntfs.sys driver when some applications update very large files in Windows Server 2008 or in Windows Vista systems: "0xc0000427 STATUS_FILE_SYSTEM_LIMITATION"

    http://support.microsoft.com/default.aspx/kb/957065

     

     

    Best Regards,

    Vincent Hu

     

  • Thursday, October 22, 2009 3:29 PMFrogbit Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Hi Vincent,

    The files range from 20-80GB in size. There is about a dozen of them on a 512GB hardware RAID0 drive (Intel Matrix). About 20GB free space (which I'll have to watch: Interesting things happen when dynamic disks fill a drive; all VMs with a dynamic stakeholding on that drive get paused!).

    Disk defragmentation is reported as 0% by Windows but this is just because they are big files I believe. Here is the output:

    C:\>defrag X: /A /V
    Microsoft Disk Defragmenter
    Copyright (c) 2007 Microsoft Corp.
    
    Invoking analysis on Backup Volume (RAID0) (X:)...
    
    
    The operation completed successfully.
    
    Post Defragmentation Report:
    
            Volume Information:
                    Volume size                 = 512.33 GB
                    Cluster size                = 16 KB
                    Used space                  = 490.82 GB
                    Free space                  = 21.50 GB
    
            Fragmentation:
                    Total fragmented space      = 0%
                    Average fragments per file  = 26.00
    
                    Movable files and folders   = 59
                    Unmovable files and folders = 13
    
            Files:
                    Fragmented files            = 11
                    Total file fragments        = 93
    
            Folders:
                    Total folders               = 23
                    Fragmented folders          = 0
                    Total folder fragments      = 0
    
            Free space:
                    Free space count            = 19
                    Average free space size     = 1.12 GB
                    Largest free space size     = 17.83 GB
    
            Master File Table (MFT):
                    MFT size                    = 256.00 KB
                    MFT record count            = 255
                    MFT usage                   = 100%
                    Total MFT fragments         = 1
    
            Note: File fragments larger than 64MB are not included in the fragmentation statistics.
    
            You do not need to defragment this volume.


    I have tried pulling a VHD off the drive on to another and got the same result!

    Cheers

    Paul
  • Thursday, November 05, 2009 6:32 AMAbdullah SEN Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have the same problem. 260GB vhd cannot be compacted. I am using 2008 R2. Have you tried the hotfix in the article Vincent sent (http://support.microsoft.com/default.aspx/kb/957065)?

    Regards,

    Abdullah
  • Saturday, November 07, 2009 9:55 AMFrogbit Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    No. I wouldn't advise trying this and I doubt the hotfix would apply anyway.

    The hotfix is for Windows 2008 (ntfs.sys version 6.0...) whereas R2 has a later version of the affected file (ntfs.sys version 6.1...). And in any case we are not dealing with files terabytes in size.

    I'm not using the default cluster size on the drive (16K rather than 4K) but I can't see that as the problem.

    Paul