Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Trouble Resising Ntfs Partition Using Diskpart


  • Please log in to reply
4 replies to this topic

#1 omarun

omarun

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:01:20 AM

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.

BC AdBot (Login to Remove)

 


#2 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad


  • BSOD Kernel Dump Expert
  • 25,090 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:03:50 PM

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
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#3 omarun

omarun
  • Topic Starter

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:01:20 AM

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 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad


  • BSOD Kernel Dump Expert
  • 25,090 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:03:50 PM

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.
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#5 omarun

omarun
  • Topic Starter

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:01:20 AM

Posted 17 June 2008 - 07:34 AM

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

Thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users