At work, we have a sever running Windows Server 2003, and it has 3 partitions, one being the C drive and the other two being data partitions...The C drive only is only 12gb and is quickly running out of space, so we want to resize it to add maybe 50gb....but when running Diskpart.exe, the program wont allow us to resize a partition that contains a pagefile. Does anyone know how we can resize this partition in order to add space?
You do not HAVE to have a pagefile operating for Windows to work, although it is HIGHLY recommended. I suggest you get rid of it temporarily for the re-sizing job, then re-create it.
The Pagefile is also known a Virtual Memory. To get at it, go to Start ... Control Panel ... System ... and choose the Advanced tab. In the top Performance block click on Settings. Then choose the Advanced tab and at the bottom Virtual Memory block click on Change. There are three choices available. The first, Custom Size, allows you to set your own parameters. If that is already chosen, note down the two settings so you can re-create them later. If it is set to System Managed Size, just note that. Then choose No Paging File. It will warn you of dire consequences and ask you to confirm this silly choice. Confirm. You will have to back out and reboot your computer to put this choice into use. But now there will be no Paging File on any drive, and you can make your changes.
When you're done, go back through the same route and re-establish the original setting, back out, and reboot again.
Now, I have two notes about resizing your C: drive. One is that windows won't do that, but I see you plan to use Diskpart.exe. I really don't know whether that tool included with your OS will do it - Microsoft tries to prevent users from doing dangerous things like this. However, there are third party utilities to do this, like Partition Magic, and a few free shareware tools.
What MIGHT be a bigger problem is that you normally can expand a Partition by adding to it only CONTIGUOUS Unallocated Space. That is, the extra space you want to add MUST be empty and right at the end of the existing C: Partition. My guess is that your hard drive was not Partitioned this way, since you have two other Partitions active. There are ways to do this like making a complete backup of each Partition, then deleting all the Partitions except C:, expanding it, then re-creating the old Partitions and restoring their data. Alternatively, some of those third party utilities may well be able to do all of that for you. Just be sure to read up on their ability to do the job you have in mind before you buy or run them.
Diskpart.exe is part of the OS so I figured that would be the safest way to do this, but I really like the idea of having a program doing the whole "backup of each Partition, then deleting all the Partitions except C:, expanding it, then re-creating the old Partitions..." stuff. I will definitely look into some sort of third party program.
The smaller hard disk drives are really cheap now.
Thus, another option is to install a second hard disk drive,
and move your pagefile.sys to a partition on that
second HDD, preferably the first partition, to effect
"short strokes" of the read/write armature.
That second HDD can also be used to do backups
of the 2 non-OS data partitions on your primary HDD
before you re-size the partitions on that primary HDD.
Cf. the CONTIG freeware which can be used
to create a physically contiguous pagefile.sys.
Remember to change its attributes:
(1) after installing a second, much larger HDD -- call it "secondary HDD" --
format 3 partitions, and size the first partition at 30-50GB;
format the 2 data partitions with sizes of your choosing;
(2) write a drive image of your existing C: partition to one of
the 2 data partitions on the secondary HDD; then,
copy that drive image to both data partitions on your
primary HDD (if they have room);
(3) swap data cables so that your secondary HDD
becomes the primary HDD in your system, and
the primary HDD becomes the secondary HDD in your system;
(4) run a Restore task, like the one in Symantec's GHOST,
and restore the drive image file to the first partition on
your new primary HDD (formerly the first partition
on your secondary HDD); with software like Symantec's
GHOST, the target partition can be larger than the
original size of the partition saved in a drive image file;
(5) after re-booting, copy all contents of the 2 data
partitions on your older, now secondary HDD to the
2 new data partitions on your now primary HDD.
(6) after you are sure everything is working AOK,
re-format the first partition on your now secondary HDD
and create a contiguous pagefile.sys using the freeware
CONTIG software, so pagefile.sys occupies the lowest
disk sector addresses in that first partition on your
(7) it would be a good idea to make a few extra copies
of your drive image file, just as a wise precaution.
Just remember to avoid changing the C: partition
on your current (old) HDD, just in case you need to
revert to your existing cabling setup. Call this
your FAIL SAFE option.
Well unfortunately my boss right now refuses to purchase anything else so I wanted to find a way to expand the C drive since there is plenty of space available from the other data partitions...believe me MRFS, if I could buy another HDD, I would ....but thanks for the help non the less