Link to home
Start Free TrialLog in
Avatar of bsharath
bsharathFlag for India

asked on

Shrink a harddrive and then enable a partition

Hi All,
Shrink a harddrive and then enable a partition
I have a 500 Gb HDD new systems. Need help with a script when run shrinks the 500 Gb of C drive to 150 Gb and then creates the unallocated partition to D: Drive 350 GB and format?

Thanks
Avatar of noxcho
noxcho
Flag of Germany image

I have used Paragon Partition Manager Server from here: www.partition-manager.com with their script to do this operation. Pretty effective when you need to resize 300 systems.
Avatar of bsharath

ASKER

Is there no way to use any windows 7 inbuilt way. Rather than any other softwares
Yes. in DiskPart.exe command line.
Or via Windows Disk Management - right click on volume - shrink - then create new volume.
When you do a Shrink Volume operation, it first queries the volume regarding how much you can shrink it by.  This is not defined by how much free space there is, but rather by where the last non-moveable blocks are on the occupied disks.  The Standard Windows Defrag that comes with Windows will not move un-moveable blocks, whereas 3rd party software can.  Un-moveable blocks include files like the Swap file or Hibernation file, and may also include Read-only, Hidden and System files.

You should also do a defrag prior to attempting the shrink, to get the most accurate results.

3rd party software will be your best bet.  I would recommend Acronis Disk Director, or Partition Magic.
Are Acronis Disk Director, or Partition Magic
Defrag tools or partition tools?

i did try the local defrag before i shrink

What i dont understand is 500 Gb HDD where 30 GB of OS and 470 GB free when shrink allows just 2 GB of shrink

where as in a different system 250 GB HDD could shrink to 150 GB
Windows 7
Take a look at Gparted:  http://gparted.sourceforge.net/

This is a stand-alone partition editor which you can boot from a CD or USB.  The interface is different but it has most of the same functionality as Partition Magic.  
How many machines do you need to shrink? Which OS?
It looks like there is some "unmoveable data" near the end of the disk which is why you can't shrink it more than 2 GB.

The Defrag that comes with windows won't move "unmoveable data" (like the Swapfile) which is why you have no choice but to use 3rd party software.
ASKER CERTIFIED SOLUTION
Avatar of Rob Miners
Rob Miners
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would also Defragment your hard drive while these settingas are disabled, as it will rearrange fragmented data so your hard disk can work more efficiently.