How to shrink and how to create a volume or partition in Windows. How to shrink a volume or partition in Windows How does compression affect performance? Are there any contraindications

Windows 10 offers quite a lot of options for working with memory storage devices. Compared to previous versions of Windows, the current Disk Management tool has more features and can completely replace the Command Prompt. However, you can still use it if you wish.

How to open Disk Management in Windows 10

To open Disk Management, do the following:

There are also several other options for getting to the Disk Management menu. For example:

  • Type the command diskmgt.msc into the “run” line. The “Run” line is called by the Win+R key combination (or create an executable file with this command).
  • In the task manager, select the “File” section and go to “Disk Management”.
  • And there is also an option to open a command line utility to manage disks. To do this, enter the command ‘DiskPart.exe’ into the Execute window.

If one method doesn't work, just try another. If, when you try to open disk management, the system displays a service connection error, then you need to make sure that the antivirus program has not deleted the dmdskmgr.dll file

If this file is not found, you need to restore it to its original location. You can return it either by taking it from the Windows boot disk, or by using the check system files command. This is done like this:

  1. Open the Run menu (Win+R) and enter cmd there.
  2. In the command line that opens, you need to enter the command sfc and then scannow.
  3. To verify the data, the program will need to specify the path to the installation disk with your Windows 10. Do this and the files will be scanned.

Checking for errors

The check can also be done through the command line, but it is much easier to do this through the Disk Management program. It is enough to do the following:


How to create a local disk

If you want to create a local disk in addition to the one where you have Windows installed, you can do this through the same Disk Management program. After opening it, take the following actions:

  1. Select an unallocated area of ​​the disk. The area available for division will be shown below in black.
  2. Right-click on this location to open a context window and select “Create a simple volume...”
  3. Following the program’s instructions, we reach the “Specifying the volume size” section. Here you can set either the full amount of memory available on the disk, or incomplete if you want to split one disk into several local ones.
  4. Next, set the letter designation for the local disk.
  5. Then, all that remains is to set the file system (These days it is worth setting NTFS, since it has no restrictions on file size). The remaining values ​​can be left as default.
  6. In the next window, all you have to do is confirm the specified data and the local disk will be created.

Shrinking and expanding a volume in Windows 10

Volume expansion is an increase in the size of a local disk using its unallocated area. The unallocated area is the area of ​​new hard drives, and it can also be obtained by compressing local drives.

How to shrink a volume in Windows 10

To shrink a volume in Windows 10, follow these steps:

Possible compression problems

If you are unable to shrink the volume, you should do the following:

  • Defragment the disk - this may increase the maximum available value for compression.
  • Disable antivirus programs before attempting compression. For example, Norton antivirus may block the ability to shrink the disk.
  • And also, to increase the space available for compression, you can disable the page file.

How to expand a volume in Windows 10

If you already have unallocated disk space, then expanding the volume is not difficult. This is done like this:


Possible problems with expansion

If you have problems expanding the volume. Check the following:

  • Make sure you have a fairly large unallocated area on your disk.
  • For expansion, only areas from adjacent departments can be used. That is, if you have an unallocated area that is not adjacent to the volume you are expanding, then you will not be able to expand it. In such cases, third-party programs can help.
  • Make sure that the number of created partitions is no more than four. There is a limit to the number of primary partitions created.

Resizing your hard drive (video)

Defragmentation

Disk defragmentation is needed to increase the response speed of files by placing them more densely on the hard drive. It's very easy to do:

  1. Right-click on the disk and go to “Properties”
  2. Open the “Service” section
  3. Click the optimize button.
  4. Select the disk that we want to fragment and click “Optimize”.
  5. We are waiting for the end of disk fragmentation.

Cleaning

Disk Cleanup can also help you free up needed space. This can be done using the utility of the same name. For this:

Merging disks

To merge partitions of your disk into one local partition, you need to use third-party programs. However, using Windows tools, you can achieve the same result by simply transferring all the files from one disk to another, then deleting the local disk that we don’t need and expanding the second one to the space available after deleting.
But if you specifically want to combine two disks, you can, for example, use the EaseUS Partition Master program. We do the following:


Now you know how to manage disks on your computer and can easily create the necessary local disks. I am very pleased that in Windows 10, disk management has become even more accessible to all users and now everyone can perform any manipulations with disks.

Good day. Today we’ll look at a fairly popular topic for beginners, this is working with already created hard drive partitions (you’ve already bought a new hard drive? :) and we’ll look at operations such as reducing the volume (compression) of the hard drive and expanding it using unallocated area. To do this, we will not use any third-party programs, but will use the Disk Management utility built into the Windows operating system. So, why might we need this knowledge? Suppose you initially had it on your hard drive, but over time you decided that one is enough to store movies, music and photos, it’s easier to search :) Or another case, you have two local drives on your hard drive (let’s assume 2Tb), one for system (local drive C), the second for personal data (drive D), but when you partitioned them, you left too little space for drive C and this constantly creates discomfort for you. It is to solve such situations that this article was written.

In this article I will do, sequentially:
— Compression (reduction) of the local disk,
— Expansion (increase) of the local disk due to a new unallocated area.

This is what we need.

1) The first thing we need is to open the Disk Management utility. For the lucky owners of Windows 8.1 and 8, just right-click on the “Start” button (or in the lower left corner of the desktop for Windows 8) and select “Disk Management”. Everyone else needs to go to “Control Panel → System and Security → Administrative Tools → Computer Management → Storage Devices → Disk Management.”

3) Right-click on the partition on the right side of the window and select “Shrink Volume”.

4) A dialog box will open asking you to select the volume to compress. This window shows the current partition size, available (unused) space for compression, and the size of the local disk after compression, in megabytes. To maximize disk compression, you must defragment the partition before this operation. I'm using an empty disk, so I have almost all of its capacity available for compression. Enter the required number of megabytes in the “Size of compressed space” line and click “Compress”.

6) Now we will expand the partition using this unallocated area. To do this, right-click on the partition and select “Extend volume”.

7) The “Volume Expansion Wizard” will open, click next.

This page shows the available and selected unallocated areas, and you can also specify how much of the unallocated area should be used to expand the local disk (item “Select the size of the allocated space”). I use the entire volume, you look at your circumstances.

The comparison to the previous version of Windows is that Windows 10 does not require recovery images because the system uses existing files instead.

Compact OS is a new compression engine that places operating system files in a (hidden) compressed container. Using Compact OS, the user can carry out various manipulations related to optimization and deployment of images.

Freeing up disk space

When using Compact OS you can free up several gigabytes on your hard drive. Specific values ​​may vary, but I have yet to encounter cases where less than 2 gigabytes were freed.

2 GB may not be a critical amount depending on the total size of the hard drive. Using compression will make a difference if Windows is installed on a partition with little hard drive (HDD) or solid state drive (SSD) storage space.

All commands should be run from a command prompt running in administrator mode:

  1. Press the Windows key
  2. Enter in the search field: cmd
  3. Hold down Shift+CTRL and select "Command Prompt" from the results to open Command Prompt in Administrator mode

Before applying compression, you need to determine the current state of the system binary files, because the system may already be compressed.

Run the command “ compact.exe /q” to check it out.

The command line utility will display the current status, including the total number of compressed and uncompressed files, the degree of compression, and how much data is stored in the container.

If the compression ratio is 1.0 to 1 or close to this value, the system is not compressed.

Compression may affect performance, but on most systems the difference will not be noticeable.

Please note that you can return the uncompressed state at any time if problems are discovered after the procedure. It is also recommended that you back up your data before continuing.

Run the command “ compact.exe /CompactOS:always” to perform binary file compression.

The compression process may take some time (20 minutes or more on some systems). The amount of freed space depends on several factors. On a test computer running the Windows 10 Insider build, we managed to save 2 gigabytes.

To undo the changes, run the decompression command: “ compact.exe /CompactOS:never”.

The reverse operation is usually faster. After the procedure, Windows will take up more disk space, you need to remember this.

SSDs have already become commonplace, and the fight for loading speed has faded into the background, and the fight for the system's footprint on the disk has come to the fore. Microsoft introduced system file compression in Windows 8.1 Update, and in Windows 10 the idea has taken an interesting development.

Microsoft itself discusses the performance of NTFS compression in KB251186, which relates to the Windows 2000 - Windows 7 range. And in KB307987 it freezes explicit instructions for setting the compression checkbox in the disk properties at the Windows XP mark. I also remember that Joseph Conway, a Microsoft employee and a CBS TK source, wrote on the TechNet forum or his blog that Windows folder compression is not supported.

Windows 8 - NTFS compression

Windows should now work on tablets, but they have limited disk space. In Windows 8, under the NTFS compression press, disabled components, manifests and previous versions of system files are placed under the NTFS compression pressure, replaced by Windows Update updates, but necessary for a rollback (the rest are deleted).

Please note that the current versions of the OS files remain uncompressed, i.e. Microsoft still doesn't officially support Windows compression.

Windows 8.1 Update - WimBoot

Finally, WimBoot is born in Windows 8.1 Update. This technology apparently was born within the framework of a program codenamed “effort 116” - 1GB RAM + 16GB SSD. On such a tiny tablet disk, along with the OS, it was necessary to place a recovery image, which left no room for user files.

In the WimBoot configuration, the OS starts and runs using files from a compressed recovery image, aided by a small set of service pointer files on the Windows partition.

Thus, Windows 8.1 Update officially supports compressed Windows for the first time.

Compression Windows 10 (Compact OS)

Long before the official release of Windows 10, an unusually vague post appeared on the Windows blog about optimizing the disk space of the new OS. It announced interesting improvements, but lacked technical details. There are still few of them, however.

The picture shows two areas of savings:

  • 4-12GB due to the refusal of the recovery image (in practice it happens more)
  • 2.6GB due to compression (in x86 – 1.5GB)

The next article in the series will be about recovery, but now we will talk about the system file compression mechanism called CompactOS.

How to find out compression status

Windows can automatically apply compression, so first check the current system state with the command:

Compact.exe /CompactOS:query

Along with the status, the results also display a recommendation - to compress or not to compress.

How to perform compression

You can switch to working with a compact OS in a lot of different ways.

In a running system

Please check the current status first and if the OS is not compressed, measure the disk space and provide details in the comments

On the command line as administrator:

Compact.exe /CompactOS:always

Please note that the entry point to the new technology is the well-known compact.exe utility! The command will take some time to complete.

Canceling compression is just as simple:

Compact.exe /CompactOS:never

At the time of installation or update

I recently talked about the new /Compat installer key for checking your PC for compatibility with Windows 10. Another new feature is the /Compact OS key:

Setup/CompactOS enable

Using a response file

And the answer file has a new Compact option.

Microsoft-Windows-Setup\ImageInstall\OSImage\Compact

MSDN has an interesting note that the installation must be run from Windows 10 or its Windows PE version (you can manually add a driver to older PEs). This probably also applies to the installer's /Compact OS switch.

At the time of applying the image in the Windows PE environment

DISM also has a new /Compact switch.

DISM.EXE /Apply-Image /ImageFile:INSTALL.WIM /Index:1 /ApplyDir:C:\ /Compact:ON

In MDT and ConfigMgr

How does compression work and how much does it save?

I haven’t found any detailed documentation, so I’m summing up all the information I know at the moment into one article.

What compression is used

For compression separate files The compact.exe utility can use different compression algorithms (the default is 4K XPRESS, see the utility help). Such files receive the “Compressed” attribute and are displayed in blue in Explorer, as in the case of NTFS compression (LZNT1 algorithm). You might think that when compressing an OS, the utility goes through all the system files that make sense to compress in the same way. However, Compact OS works differently.

Compact OS is an evolution of WimBoot technology. The files to be optimized are placed in a hidden container (actually a WIM file) and compressed.

In terms of compression, Compact OS is similar to a WimBoot image or any conventionally compressed WIM image, as they all use Huffman's 4K XPRESS algorithm (WIM uses LZX for maximum compression).

Therefore, unlike NTFS compression, Compact OS files do not receive a "Compressed" attribute and are not marked with a different color in Explorer or third-party programs. It is curious that the TreeSize utility still highlights in blue folders in which files have been compressed.

What exactly is being compressed?

The compression report looks something like this.

Completed Compressing OS binaries. 37953 files within 17349 directories were compressed. 6,670,708,067 total bytes of data are stored in 3,953,427,362 bytes. The compression ratio is 1.7 to 1.

Files in the Windows and Program Files folders, as well as store applications, are compressed. System files provide the lion's share of the space saved. This can be clearly seen from the DISM Component Store report.

Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

Below is information from a clean installation of Windows 10 Pro x64 RU. Let me remind you that the actual storage size is the sum of the first three rows of the table.

The total savings in gigabytes are quite consistent with the figures from the official blog, but they look even better in percentage terms.

Comparison of approaches to reducing the system footprint on disk

WimBoot technology made it possible to install Windows on a 16GB tablet without any problems, and the user even had space for files. However, there was one annoying problem. With each batch of installed updates, the WimBoot image became further and further from the current state of the operating system, gradually turning into dead weight.

Compact OS offers a more balanced approach to saving disk space.

Questions and answers

I tried to anticipate your main questions.

What types of devices does Compact OS run on?

Devices with UEFI and BIOS are supported.

How does Windows determine whether compression gives an advantage to a particular PC?

It is not known exactly. In the Windows blog, the first two places were RAM size and CPU speed. The disk capacity was not mentioned, but it is obvious that the technology is aimed primarily at small disks.

I will assume that compression is not performed automatically and is not offered on systems with a physical disk (not system partition) capacity greater than 128GB. I hope your reports in the comments will help clarify the situation.

Upd. 19-Nov-15. Reader reports did not refute my assumption, but they also did not allow me to derive a certain formula for the dependence of compression on the size of the hard drive. However, reader Maxim Donnikov found that if the system does not use compression, but reports that it can go into a compressed state if necessary, then compression is automatically performed in the background some time after the disk becomes low on free space.

How does compression affect performance? Are there any contraindications?

On the Windows blog, the vague language boils down to "everything is OK", but this refers to situations where compression is implemented without your intervention by the PC manufacturer or Windows itself.

  • Hard drives. The Compact OS target device is a PC with small solid state drive. Modern hard drives have no problems with free space, unless you shoot yourself in the foot. WimBoot in Windows 8.1 was not supported on hard drives precisely because of their insufficient performance. Officially, Compact OS in Windows 10 is suitable for any drive, but Microsoft advises using it only on SSDs. They have a high speed of sequential transfers, so the impact on the speed of launching the OS and programs is minimal.
  • PC with encrypted system drive (BitLocker). Encryption itself reduces performance, and additional compression can only make things worse. Microsoft has advised against encryption on systems running WimBoot, and I see no reason to change this recommendation for Compact OS.

Obviously, I'm looking at the situation from the point of view of optimal performance under heavy disk load. I'm sure there are plenty of people who will compress the OS on an HDD or SSD with BitLocker and not notice any slowdowns.

Why are so many fewer files decompressed than compressed?

If you immediately return to the original state after compression, you will see something like this:

23256 files within 17349 directories were uncompressed.

Compared to the compression report, the same number of folders were processed, and about 1.5 times fewer files were compressed than previously compressed.

I don't know the exact reason for this behavior. It is possible that the compression report includes all processed files, incl. with a factor of 1:1, and during decompression they are not considered decompressed.

How does Compact OS and component compression work in the WinSxS folder?

Technologies work in parallel. You can control the state of Compact OS yourself, and differential compression of components is performed without your participation and is irreversible.

To be continued…

Literature

In the process of preparing this article, I found the following materials useful:

However, in the context of disk space, not all Microsoft software is at the same level of technological development. Thus, Microsoft Office looks disappointing in this regard - with the traditional package, monthly updates weighing 500-600MB have become the norm, ending up in the Installer folder, and Office 2016 Click-to-Run updates can eat up gigabytes in the ProgramData folder.

Write in the comments:

  • Windows 10 original compression status
  • device model, disk capacity, CPU brand and RAM size
  • current installation method for Windows 10 (upgrade/clean)
  • amount of freed disk space after compression

Windows 10 is a convenient and fast system on all types of devices, however, it is prohibitively heavy for the computer’s internal memory.

On some devices, especially low-end computers or tablets, Windows takes up too much disk space. The most common problem for tablets is a situation where constantly automatically downloaded OS updates clog up the memory so much that there is not enough space for regular programs.

There are many ways to solve this problem, comprehensive information about which we will provide below. Next, we’ll look at some of the most effective and convenient ones.

Let's start with the most complex ones, and then move on to the simple device configuration options provided in the OS.

This method is associated with deep configuration of the computer, but still does not require special manipulations with the system and is the easiest to free up a significant amount of information on the disk.

This tool is called "Compact OS" and its job is to "compress" system files, similar to the process of archiving data so that it takes up a lot of space.

The process for launching such compression is as follows:


The system will start compressing all files. This process may take about 20 minutes or more, depending on the amount of data on the system.

As a result, the volume occupied by the OS will be reduced by one and a half to two gigabytes.

Removing unnecessary files

An even easier and faster method, which is performed without additional tools. However, the size of the space occupied by the system will not decrease much.

You can delete unnecessary and intermediate data (temporary files) that have accumulated in the system over the entire period of use:

  1. In the main settings interface, launch the “System” icon, where all the settings for the operation of the OS are collected.

  2. In this system settings menu, you need to select “Storage” in the sidebar of the options sections, where, in fact, the files to be deleted are located. In this section, select the location “This computer”.

  3. Information about system memory usage and additional function buttons will appear. You need to scroll to the end of the page and click on the special “Temporary files” function button, which controls the storage of these now unnecessary elements.

  4. In this menu, you can view the properties of files stored in additional locations and clean your computer from them. Here you can delete temporary files by clicking the corresponding button at the top of the list.

Disk Cleanup

Find out effective disk cleaning methods in our new article -

This method involves the use of standard Windows self-cleaning tools built into the system itself by the developer.

You can clean the entire disk with the system as follows:

  1. First you need to open the properties of the “C” drive in the “This PC” menu in the “Explorer” system. This can be done by right-clicking the submenu and selecting the appropriate item at the very bottom of the list.

  2. The computer will launch a special small properties window for this disk. You need to go to the “General” tab (although the system often immediately opens a window at this point). Here, next to the disk capacity status chart, click on the “Disk Cleanup” button.

    Here the system will not immediately launch the necessary tool. At this point, you need to wait a little while the computer indexes (collects information) unnecessary files that are not needed by the system, users or programs and are not used anywhere else.

  3. As a result, the Disk Cleanup window will open. Here in a small window you can select elements that can be deleted. Since these files are often not critical, it is advisable to mark all types. After this, you can click “OK” and start the cleaning process, or remove additional components.

  4. To free up more memory from system files, you need to click on the system file cleanup function button in the same window. The system will again conduct an “audit” and create another tab in the cleaning window – “Advanced”. Here, with one click, you can clean the system from its outdated rollback copies, as well as from unused programs.

Deleting the update cache

This method is the least dangerous for user data, since it clears the system from downloaded but not installed update packages, or from previous versions of software upgrades. If the necessary elements are deleted, the system can always be restored by simply downloading the previous update using standard tools.

The sequence of actions looks like this:

  1. The first steps are to turn off the System Update Center. Using the “Search” tool in the main panel, enter “services.msc” and launch the found configuration document.

  2. In the window that will immediately open by the system, find the “System Update Center” management option and open it by double-clicking.

  3. An additional window will be launched to configure the properties of a specific parameter. In the central tab, under the characteristics of the state of the current process, click on the “Stop” option, then confirm your action at the bottom of the window.

  4. Through the main folder of Explorer (“This PC”), open the following folders one by one: “Windows”, the main folder with the system and all files associated with it. “SoftwareDistribution”, a folder with settings and software for managing the capabilities of new system components. “Download” – a special download folder for downloaded software.

  5. In the download folder that opens, open the “File” item in the top panel, and in the submenu, among other debugging elements, select the option to configure folder settings.

  6. After launching the parameters window, go to the “View” sub-item, and in the additional parameters field, set the status for hidden elements to “Show hidden files”. Also, to clear a larger amount of information, uncheck the box next to the option to hide special protected files.

  7. Then, select absolutely all downloaded update files in the folder and delete them, thus clearing all outdated, faulty and space-consuming update files.

  8. When the uninstallation process is completed, you must run the OS updater again for the system to function normally. To do this, reopen the properties window for this component (see previous paragraphs), and in the main “General” tab, under the status indicator, click “Run”.

Note! If the user wishes to no longer receive constant system updates in order to prevent the system from becoming overloaded in the future, this option can be left.

Video - How to reduce the size of Windows 10 on your hard drive