Tales from the Crypto

         Alun Jones (Security MVP Reconnect) writes about security, cryptography, SSL, PKI, and pretty much anything else that bothers him enough.

July 8, 2007

diskpart ‘shrink’ needs a little work…

Filed under: Miscellany - not security,Windows Vista @ 4:02 pm

I’m playing with BitLocker a little, and I need a small temporary partition to encrypt and decrypt on a frequent basis.

No problem, right? I can just open up Computer Management, select Storage, Disk Management, and then shrink a volume that has lots of space. [I can do the same with “diskpart” from the command line, if I choose to]

Apparently, I can't shrink my drive

Oh, now, that’s just perfect – I can’t shrink my partition, and even if I do, I’ll end up wiping out the existing partition?

Okay, so I realise that it’s not likely to be quite that severe, but there’s a little work needs to be put into the disk partition shrink mechanism in Windows Vista.

First, obviously, edge cases like the one above need to be handled properly.

Second, there needs to be an option that informs the administrator as specifically as possible what limited the shrink operation – which immovable file is sitting on the boundary of the maximum shrink area. That way, I can decide what the problem is – it’s not the hibernation file (because I’ve deleted that), and it’s not the pagefile (again, deleted); it’s not even volume shadow copies, because I’ve disabled System Restore.


  1.   Cheong — July 8, 2007 @ 10:06 pm    Reply

    In the “Good Old Days”, Norton’s disk defragment(DD) tool allow you to select a cluster(of FAT16) and see which file is sitting on it.

    Aren’t similar tool available for NTFS?

  2.   Cheong — July 8, 2007 @ 10:07 pm    Reply

    Typo: It should be “SD”(SpeedDisk).

  3.   Nik — July 9, 2007 @ 12:23 pm    Reply

    You can use any forensic tool to pull this information. (you can use eval versions of FTK or WinHex; I use EnCase )

    There’s also a NTFS API where it will give you the ALLOCATED_ARNGES for a NTFS file. Many times it’s NTFS internal files like $Log or $MFT_MIRROR that will lock this. These files can’t be moved with the system running.
    The VSS and TxF functionailties of Vista make this harder!
    You COULD try this: remove the HAD, attach to other system and shrink there.

  4.   Charles — July 22, 2007 @ 1:08 am    Reply

    what are you guys saying? I don’t understand a word. could anyone just simply tell me if there is any way to shrink more volume in vista?

    Vista just sucks, can’t network, can’t use my previous PM8, and what more!!

  5.   Nikola Tulimirović — July 30, 2007 @ 8:33 pm    Reply

    I have the same problem(s).
    Consider this… I have done all that could be done, except using dozens of 3rd party tools (tried just two or three utilities) and I am stuck with a 130 GB volume. I even tried to solve the puzzle by making a complete PC backup, restoring it on another PC with hope that it may be satisfied with a 50 GB volume. No! It needs its free space. Actually, this was the only scenario that hasn’t surprised me… But it made me angry anyway.
    And, yeah… Network! When someone whispers: “Vista…”, I yell, “Network!”.

  6.   the incredible mark — August 14, 2007 @ 2:32 pm    Reply

    Get a copy of GParted and stop your bellyaching!! GParted is mature and will shrink your NTFS partitions with zero problems.

RSS feed for comments on this post. TrackBack URI

Leave a comment

© 2017 Tales from the Crypto   Provided by WPMU DEV -The WordPress Experts   Hosted by Microsoft MVPs