Shrinking windows partition in

Shrink a basic volume

Applies To: Windows 10, Windows 8.1, Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

You can decrease the space used by primary partitions and logical drives by shrinking them into adjacent, contiguous space on the same disk. For example, if you discover that you need an additional partition but do not have additional disks, you can shrink the existing partition from the end of the volume to create new unallocated space that can then be used for a new partition. The shrink operation can be blocked by the presence of certain file types. For more information, see Additional considerations

When you shrink a partition, any ordinary files are automatically relocated on the disk to create the new unallocated space. There is no need to reformat the disk to shrink the partition.

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.

Shrinking a basic volume

You must be a member of the Backup Operators or Administrators group, at minimum, to complete these steps.

To shrink a basic volume using the Windows interface

In Disk Manager, right-click the basic volume you want to shrink.

Click Shrink Volume.

Follow the on-screen instructions.

You can only shrink basic volumes that have no file system or that use the NTFS file system.

To shrink a basic volume using a command line

Open a command prompt and type diskpart .

At the DISKPART prompt, type list volume . Note the number of the simple volume you want to shrink.

At the DISKPART prompt, type select volume . Selects the simple volume volumenumber you want to shrink.

At the DISKPART prompt, type shrink [desired= ] [minimum= ] . Shrinks the selected volume to desiredsize in megabytes (MB) if possible, or to minimumsize if desiredsize is too large.

Value Description
list volume Displays a list of basic and dynamic volumes on all disks.
select volume Selects the specified volume, where volumenumber is the volume number, and gives it focus. If no volume is specified, the select command lists the current volume with focus. You can specify the volume by number, drive letter, or mount point path. On a basic disk, selecting a volume also gives the corresponding partition focus.
shrink Shrinks the volume with focus to create unallocated space. No data loss occurs. If the partition includes unmovable files (such as the page file or the shadow copy storage area), the volume will shrink to the point where the unmovable files are located.
desired=desiredsize The amount of space, in megabytes, to recover to the current partition.
minimum=minimumsize The minimum amount of space, in megabytes, to recover to the current partition. If you do not specify a desired or minimum size, the command will reclaim the maximum amount of space possible.

Additional considerations

When you shrink a partition, certain files (for example, the paging file or the shadow copy storage area) cannot be automatically relocated, and you cannot decrease the allocated space beyond the point where the unmovable files are located. If the shrink operation fails, check the Application Log for Event 259, which will identify the unmovable file. If you know the cluster(s) associated with the file that is preventing the shrink operation, you can also use the fsutil command at a command prompt (type fsutil volume querycluster /? for usage). When you provide the querycluster parameter, the command output will identify the unmovable file that is preventing the shrink operation from succeeding. In some cases, you can relocate the file temporarily. For example, if you need to shrink the partition further, you can use Control Panel to move the paging file or stored shadow copies to another disk, delete the stored shadow copies, shrink the volume, and then move the paging file back to the disk. If the number of bad clusters detected by dynamic bad-cluster remapping is too high, you cannot shrink the partition. If this occurs, you should consider moving the data and replacing the disk.

Do not use a block-level copy to transfer the data. This will also copy the bad sector table and the new disk will treat the same sectors as bad even though they are normal.

You can shrink primary partitions and logical drives on raw partitions (those without a file system) or partitions using the NTFS file system.

Сжатие базового тома Shrink a basic volume

Относится к: Windows 10, Windows 8.1, Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 Applies To: Windows 10, Windows 8.1, Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Объем существующих основных разделов и логических дисков можно уменьшить, выполнив для них операцию сжатия, перемещающую файлы в соседнюю, нефрагментированную область того же диска. You can decrease the space used by primary partitions and logical drives by shrinking them into adjacent, contiguous space on the same disk. Например, если возникает потребность в дополнительном разделе, но дополнительных дисков нет, можно сжать существующий раздел со стороны конца тома, чтобы создать незанятое пространство, которое можно использовать для нового раздела. For example, if you discover that you need an additional partition but do not have additional disks, you can shrink the existing partition from the end of the volume to create new unallocated space that can then be used for a new partition. Операция сжатия может быть заблокирована наличием определенных типов файлов. The shrink operation can be blocked by the presence of certain file types. Дополнительные сведения см. в разделе Дополнительные рекомендации. For more information, see Additional considerations

При сжатии раздела все обычные файлы автоматически перемещаются на диск для формирования нового незанятого пространства. When you shrink a partition, any ordinary files are automatically relocated on the disk to create the new unallocated space. Для сжатия тома повторно форматировать диск не нужно. There is no need to reformat the disk to shrink the partition.

Если раздел является необработанным (то есть не отформатирован в какой-либо файловой системе) и содержит данные (например, файл базы данных), сжатие раздела может привести к уничтожению этих данных. 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.

Сжатие базового тома Shrinking a basic volume

Для выполнения следующих шагов необходимо как минимум состоять в группе Операторы архива или Администраторы. You must be a member of the Backup Operators or Administrators group, at minimum, to complete these steps.

Процедура сжатия базового тома с помощью интерфейса Windows To shrink a basic volume using the Windows interface

В диспетчере дисков щелкните правой кнопкой мыши том, который требуется сжать. In Disk Manager, right-click the basic volume you want to shrink.

Выберите пункт Сжать том. Click Shrink Volume.

Следуйте инструкциям на экране. Follow the on-screen instructions.

Сжать можно только те базовые тома, у которых нет файловой системы или которые отформатированы в файловой системе NTFS. You can only shrink basic volumes that have no file system or that use the NTFS file system.

Процедура сжатия базового тома с помощью командной строки To shrink a basic volume using a command line

Откройте командную строку и введите: diskpart . Open a command prompt and type diskpart .

В командной строке DISKPART введите list volume . At the DISKPART prompt, type list volume . Запомните номер простого тома, который требуется сжать. Note the number of the simple volume you want to shrink.

В командной строке DISKPART введите select volume . At the DISKPART prompt, type select volume . Выбирает простой том volumenumber, который требуется сжать. Selects the simple volume volumenumber you want to shrink.

В командной строке DISKPART введите shrink [desired= ] [minimum= ] . At the DISKPART prompt, type shrink [desired= ] [minimum= ] . Сжимает выбранный том до размера desiredsize в мегабайтах (МБ), если возможно, или до размера minimumsize, если размер desiredsize слишком велик. Shrinks the selected volume to desiredsize in megabytes (MB) if possible, or to minimumsize if desiredsize is too large.

Применение Value Описание Description
list volumelist volume Отображает список базовых и динамических томов на всех дисках. Displays a list of basic and dynamic volumes on all disks.
select volumeselect volume Выбирает указанный том, где volumenumber — номер тома, и переводит на него фокус. Selects the specified volume, where volumenumber is the volume number, and gives it focus. Если том не указан, команда select отображает текущий том с фокусом. If no volume is specified, the select command lists the current volume with focus. Для указания тома можно использовать номер, букву диска или путь к точке подключения. You can specify the volume by number, drive letter, or mount point path. При выборе тома на базовом диске фокус переводится на соответствующий раздел. On a basic disk, selecting a volume also gives the corresponding partition focus.
shrinkshrink Сжимает том с фокусом для создания нераспределенного пространства. Shrinks the volume with focus to create unallocated space. Все данные остаются в сохранности. No data loss occurs. Если раздел содержит неперемещаемые файлы (например, файл подкачки или область хранения теневых копий), том сожмется до того места, в котором расположены эти файлы. If the partition includes unmovable files (such as the page file or the shadow copy storage area), the volume will shrink to the point where the unmovable files are located.
desired=desiredsizedesired=desiredsize Объем пространства в мегабайтах, который требуется восстановить в текущем разделе. The amount of space, in megabytes, to recover to the current partition.
minimum=minimumsizeminimum=minimumsize Минимальный объем пространства в мегабайтах, который требуется восстановить в текущем разделе. The minimum amount of space, in megabytes, to recover to the current partition. Если не указать желаемый или минимальный размеры, команда освободит максимально возможное пространство. If you do not specify a desired or minimum size, the command will reclaim the maximum amount of space possible.

Дополнительные сведения Additional considerations

При сжатии раздела определенные файлы (например, файл подкачки или область хранения теневых копий) невозможно переместить автоматически, а также невозможно сократить распределенное пространство дальше того места, в котором расположены неперемещаемые файлы. When you shrink a partition, certain files (for example, the paging file or the shadow copy storage area) cannot be automatically relocated, and you cannot decrease the allocated space beyond the point where the unmovable files are located. Если операция сжатия завершается сбоем, проверьте журнал приложений на наличие события 259, которое определит неперемещаемый файл. If the shrink operation fails, check the Application Log for Event 259, which will identify the unmovable file. Если вам известно, какие кластеры, связанные с файлом, мешают операции сжатия, можно использовать команду fsutil в командной строке (введите fsutil volume querycluster /? If you know the cluster(s) associated with the file that is preventing the shrink operation, you can also use the fsutil command at a command prompt (type fsutil volume querycluster /? для получения справки об использовании). for usage). Если указать параметр querycluster, в выходных данных команды будет указан неперемещаемый файл, мешающий выполнить операцию сжатия. When you provide the querycluster parameter, the command output will identify the unmovable file that is preventing the shrink operation from succeeding. В некоторых случаях этот файл можно переместить временно. In some cases, you can relocate the file temporarily. Например, если требуется еще сильнее сжать раздел, можно использовать панель управления, чтобы переместить файл подкачки или сохраненные теневые копии на другой диск, удалить сохраненные теневые копии, сжать том, а затем переместить файл подкачки обратно на диск. For example, if you need to shrink the partition further, you can use Control Panel to move the paging file or stored shadow copies to another disk, delete the stored shadow copies, shrink the volume, and then move the paging file back to the disk. Если число поврежденных кластеров, обнаруженных при динамическом сопоставлении поврежденных кластеров, слишком велико, сжать раздел не удастся. If the number of bad clusters detected by dynamic bad-cluster remapping is too high, you cannot shrink the partition. В этом случае следует переместить данные и заменить диск. If this occurs, you should consider moving the data and replacing the disk.

Не используйте копию уровня блоков для переноса данных. Do not use a block-level copy to transfer the data. При этом будет также скопирована таблица поверженных секторов и новый диск будет считать эти секторы поврежденными, хотя на самом деле они будут исправными. This will also copy the bad sector table and the new disk will treat the same sectors as bad even though they are normal.

Можно сжать основные разделы и логические диски в необработанных разделах (не отформатированных в какой-либо файловой системе) или разделах, отформатированных в файловой системе NTFS. You can shrink primary partitions and logical drives on raw partitions (those without a file system) or partitions using the NTFS file system.

Читайте также:  Pointing device asus windows 10
Оцените статью