Shrink primary partitions and logical drives into neighbouring, contiguous space on the same disc to save space. If you discover that you require another partition but do not have enough discs, you can decrease the current partition from the volume's end to create fresh unallocated space. The space can then be used to create a new division. Certain file types can obstruct the shrink operation.
When you shrink a partition, any existing files on the disc are automatically migrated to make room for the new unallocated space. There is no need to reformat the disc to shrink the partition.
You can resize primary partitions and logical drives on raw partitions, which do not have a file system, as well as NTFS partitions.
If the partition is a raw partition (that is, one without a file system) that contains data (such as a database file), shrinking the partition might destroy the data.
Reduce a basic volume using Disc Management.
- In Disc Management, right-click the basic volume you wish to decrease.
- Select Shrink Volume.
- Follow the on-screen directions.
Shrink C:
Total size before shrink in MB: 7502
Size of available shrink space in MB: 16057
Enter the amount of space to shrink in MB: 416057
Total size after shrink in MB: 1445
Shrink a volume beyond unmovable files' location, only for basic volumes without file systems or using NTFS file system, as detailed in Application log and Disk Management help.
You cannot shrink a volume beyond the point where any unmovable files are stored. The "defrag" event in the Application log provides precise information on when the process was completed. You can only shrink basic volumes that do not have a file system or utilise NTFS.
Shrink a basic volume by using the command line
- Open a command prompt and type
diskpart
. - At the DISKPART prompt, type
list volume
. - Take note of the number of simple volumes you want to shrink.
- At the DISKPART prompt, type
select volume 4
. Choose the basic volumevolume number
you wish to shrink. - At the DISKPART prompt, type
shrink [desired=16057] [minimum=1445]
. - Shrink the selected volume by the desired size in megabytes (MB) if possible, or by the
minimum size
ifdesired size
is too large.
Command Help
- list volume: lists all the discs' basic and dynamic volumes.
-
select volume: gives it focus and chooses the given volume, where
volume number
is the volume number. The select command displays the volume that is currently focused if no volume is supplied. The volume can be set using a drive letter, number, or mount point path. When choosing a volume on a basic disc, the matching partition focus is also displayed. - shrink: Focusses on reducing the volume to free up space. There is no data loss. The volume shrinks to the location of any immovable files, such as the page file or the shadow copy storage area, if the partition contains them.
-
desired=
desired size
: The megabyte-count of available space for the current partition recovery. -
minimum=
minimum size
: The smallest possible space requirement, expressed in megabytes, to restore the present partition. In the absence of any specified minimum or desired size, the command recovers the maximum available space.
Certain data, such as the paging file and the shadow copy storage region, cannot be automatically moved when a partition is shrunk. Furthermore, you are unable to reduce the allotted space past the location of the immovable files. Look for Event 259 in the Application Log, which indicates the unmovable file, if the shrink operation is unsuccessful. At a command prompt, you can also use the fsutil
command if you know which cluster or clusters are linked to the file that are obstructing the shrink operation input fsutil volume querycluster /?
for usage and help. The command output indicates the unmovable file that is keeping the shrink process from working when you supply the querycluster
parameter. There are situations when moving the file temporarily is possible. You can use the Control Panel to relocate the paging file or stored shadow copies to another disc, erase the shadow copies that have been stored, reduce the volume, and then move the paging file back to the disc if you need to further shrink the partition. You cannot reduce the partition if dynamic bad-cluster remapping detects an excessive number of bad clusters. Think about transferring the data and changing the disc if this happens. Transferring the data using a block-level copy is not advised. The bad sector table is also copied using this way, and even if the sectors are healthy, the new disc interprets them as bad.
Ref: https://learn.microsoft.com/en-us/windows-server/storage/disk-management/shrink-a-basic-volume
Top comments (0)