Windows

Shrinking a volume using diskpart

July 10, 2008, 04:09 PM — 

The Diskpart command in Vista now lets you shrink a volume by using the Shrink subcommand, see here for details. This can be useful if you have only one hard disk and a C: drive that fills the disk, and you want to make room on your disk to create a second volume for storing data or some other purpose. Unfortunately system files that have fixed locations like the paging file and system restore points can prevent you from shrinking your C: drive by much.

The workaround is to disable System Protection (i.e. disable automatic creation of System Restore points) and specify no paging file, and then shrink your volume. For example, I had Vista installed on a 64 GB volume and did the following in order:

diskpart
select disk 0
select volume 1
shrink

This reduced my C: drive from 60 to 45 GB.

I then disabled System Protection and specified no paging file, rebooted, and ran the above commands again. The result was I could take another 10 GB off my C: drive to bring it down to 35 GB at which point the volume is about 75% full.

A few caveats though before you try this on your computer:

1. If you disable System Protection, you won't be able to go back to a previous restore point if something goes wrong with your system, so it's a good idea to re-enable System Protection after you've shrunk your volume.

2. If you shrink your volume too much, you may run into problems since Vista saves old versions of system binaries in the WinSXS folder and this folder can grow quite large in size.

3. If you want to expand your volume afterwards, you can use the Expand subcommand of Diskpart to do this, but if you want to keep your disk a basic (rather than dynamic) disk you can only extend your C: drive to contiguous (adjacent) space on the disk.

Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world

I like it!
peer-to-peer

jfruh
Apple syncing patent can't come soon enough

pasmith
New Twitter features borrow from 3rd party clients

Esther Schindler
Open Source Changes the Software Acquisition Process

mikelgan
How to set up continuous podcast play on the new iTunes

David Strom
Five important Windows 7 mobility features

sjvn
Guard your Wi-Fi for your own sake                        

Sandra Henry-Stocker
Grepping on Whole Words

 

Sidekick: The Good News & the Bad News
Either way you look at it Microsoft Data Center management did not follow standards or best practices in this failure. In which case it makes me wonder more about the outsourcing of corporate data much less personal data.
- mburton325

Join the conversation here

The Daily Tip

The Daily TipQuick, practical advice for IT pros. Made fresh daily.

Hot tips:

Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.

Newsletters

Subscribe to ITWORLD TODAY and receive the latest IT news and analysis.

I would like to receive offers via email from ITworld partners.
By clicking submit you agree to the terms and conditions outlined in ITworld's privacy policy.
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace