macOS не позволяет мне перераспределять свободное место!

У меня было два раздела на моем Mac, на обоих была установлена ​​​​macOS, в результате у обоих был раздел восстановления, теперь я удалил один раздел, потому что он был поврежден из-за какого-то сценария, который я запустил.

Теперь у Mac есть только один раздел, который является загрузочным томом.

Проблема в том, что предыдущий раздел создал свободное пространство при его удалении, и оно никому не выделяется, теперь, когда я пытаюсь удалить свободное пространство, Дисковая утилита не выполняет операцию!

введите описание изображения здесь введите описание изображения здесь

Оба раздела также создали общую папку, о которой я мало что знаю, потому что никогда ее не создавал, теперь проблема заключается в том, что мне делать с этой общей папкой, следует ли удалить ее из моих системных настроек или сохранить, я не знаю, что может произойти/удалить, если я удалю его с моего iMac!

введите описание изображения здесь

Таким образом, в результате повреждения и запуска пользовательского сценария для настройки вашего Mac возникли две проблемы!

Я просмотрел этот пост https://www.reddit.com/r/osx/comments/305lik/help_removing_the_free_space_partition/ , но он, похоже, не связан с моей проблемой, поскольку у меня их нет (нет групп логических томов CoreStorage). found — вывод терминала для diskutil cs list; diskutil list)

И когда я пытаюсь изменить размер диска через терминал, я получаю эту ошибку:

Sayans-iMac:~ sayanhussain$ diskutil resizeVolume disk0s2 R
Resizing to full size (fit to fill)
Started partitioning on disk0s2 macOS
Error: -69742: The requested size change for the target disk or a related disk is too small; please try a different disk or partition, or make a larger change
Sayans-iMac:~ sayanhussain$ 
Вы пытались добавить раздел вместо свободного места?
@KevinGrabher Я пытался, но это не работает!
@KevinGrabher Я попытался добавить раздел, из-за которого Дисковая утилита застряла при копировании загрузчика.

Ответы (1)

Хорошо, теперь ошибка устранена. Что я сделал!

Сначала я запустил список diskutil, чтобы просмотреть все активные разделы, теперь у меня был только раздел, поэтому я добавил новый раздел через DiskUtility.

Затем я еще раз запустил список diskutil, теперь я смог увидеть только что добавленный раздел.

Теперь, чтобы удалить свободное пространство, я объединил оба раздела вместе.

Чтобы объединить два раздела, я просто запустил эту команду в терминале.

Sayans-iMac:~ sayanhussain$ diskutil mergePartitions
Usage:  diskutil mergePartitions [force] format name
        DiskIdentifier|DeviceNode DiskIdentifier|DeviceNode

Merge two or more pre-existing partitions into one.  The first disk parameter
is the starting partition; the second disk parameter is the ending partition;
this given range of two or more partitions will be merged into one.

All partitions in the range, except for the first one, must be unmountable.

All data on merged partitions other than the first will be lost; data on the
first partition will be lost as well if the "force" argument is given.

If "force" is not given, and the first partition has a resizable file system
(e.g. JHFS+), it will be grown in a data-preserving manner, even if a different
file system is specified (in fact, your file system and volume name parameters
are both ignored in this case). If "force" is not given, and the first
partition is not resizable, you will be prompted if you want to erase.

If "force" is given, the first partition is always formatted. You should
do this if you wish to reformat to a new file system type.

Merged partitions are required to be ordered sequentially on disk.
See diskutil list for the actual on-disk ordering; BSD slice identifiers
may in certain circumstances not always be in numerical order but the
top-to-bottom order given by diskutil list is always the on-disk order.

Ownership of the affected disk is required.

Example: diskutil mergePartitions JHFS+ NewName disk3s4 disk3s7
         This example will merge all partitions *BETWEEN* disk3s4 and disk3s7,
         preserving data on disk3s4 but destroying data on disk3s5, disk3s6,
         disk3s7 and any invisible free space partitions between those disks;
         disk3s4 will be grown to cover the full space if possible.
Sayans-iMac:~ sayanhussain$