BleepingComputer.com: Trouble Resising Ntfs Partition Using Diskpart

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Trouble Resising Ntfs Partition Using Diskpart

#1 User is offline   omarun 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 3
  • Joined: 12-June 08

Posted 12 June 2008 - 08:06 AM

Hi all,

I have a Windows 2003 Virtual Machine running on VMware ESX 3.5. The virtual disk size is 4GB. The Disk has one partition which has entire space allocated to it. The used space on disk is 2GB. The rest of space is free space (2GB). So I want to resize the partition to 2.5GB and claim 1.5GB back so that I can create a new NTFS partition. Since I do not want to use any third party tool, I choose to use diskpart from WINPE 2.0 which came from MicroSoft. After downloading the Microsoft Windows AIK for Windows Vista SP1, I created a WinPE 2.0 ISO Image out of it. I used the ISO image to boot the Virtual Machine with WinPE 2.0 (it is based on Windows Vista kernel). I followed the steps as said in the article How to shrink and extend NTFS partitions in Windows Vista under Shrinking and Extending Volumes with the Windows Vista command line. But it failed with the following error message:

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

The sequence of commands which I executed is as follows:

------------------------------------------------------------------------------------------

x:\> diskpart

DISKPART> list disk

Disk ### Status Size Free Dyn GPT
-------- ---------- ------- ------- --- ---
Disk 0 Online 4301 MB 211 MB

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list volume

Volume ### Ltr Label Fs Type Size Status
-------- --- ---------- ------- ---------- ---------- ---------
Volume 0 D CD_ROM CDFS CD-ROM 201 MB Healthy
Volume 1 C Disk 1 NTFS Partition 4087 MB Healthy

DISKPART> select Volume 1

Volume 1 is the selected disk.

DISKPART> shrink querymax

The maximum number of reclaimable bytes is: 1609 MB

DISKPART> shrink

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

DISKPART>

------------------------------------------------------------------------------------------

I dont have any clue about what parameter is incorrect. According to the above article and google, it should work fine.

Any help is appriciated.

Thanks in advance.

#2 User is offline   usasma 

  • Still visually handicapped, new avatar (a camel) :0)
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 16,690
  • Joined: 02-October 05
  • Gender:Male
  • Location:Southeastern CT, USA

Posted 12 June 2008 - 08:58 AM

I suspect that there is additional information needed with the "shrink" command (I'm running DISKPART from within Vista)

Type "help shrink" at the prompt (without the quotes) to see what additional information is needed

I'd suspect that you'd need to specify "SHRINK DESIRED=1536" (without the quotes) where 1536 mB = 1.5 gB
- John
**If you need a more detailed explanation, please ask for it. I have the Knack. **

#3 User is offline   omarun 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 3
  • Joined: 12-June 08

Posted 13 June 2008 - 06:56 AM

Well..

I tried "SHRINK DESIRED=1500" and it failed in the same way. But when I try "SHRINK DESIRED=100", it works well.
Is it because the disk is fragmented ? I thought it could shrink partition by moving the data to the beginning of partition. Also, is there any limit upto which it could shrink the partition ? If so, what are the factors which determines this limitation ?

Regards,
--omarun

#4 User is offline   usasma 

  • Still visually handicapped, new avatar (a camel) :0)
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 16,690
  • Joined: 02-October 05
  • Gender:Male
  • Location:Southeastern CT, USA

Posted 13 June 2008 - 09:46 AM

There appears to be data located somewhere between the 1500 and 100 mB (from the end) location.
I'd suggest defragging the disk prior to running diskpart.
- John
**If you need a more detailed explanation, please ask for it. I have the Knack. **

#5 User is offline   omarun 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 3
  • Joined: 12-June 08

Posted 17 June 2008 - 07:34 AM

Defragging the disk prior to running diskpart helped. Now I am able to shrink it.

Thanks

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users