分类
技术

macOS 迁移硬盘后扩容

小硬盘迁移到大硬盘,使用的是傲梅的完整复制;搞完装上新硬盘进系统,一切顺利 😁️。

打开关于本机,发现硬盘后边一大块空间都处于未使用的状态。使用磁盘工具分区功能,删掉后面那块的同时自动扩大前面那块,报错 😢。

错误代码 -69743,英文 “The new size must be different than the existing size”,中文「新容量大小不得等同于现有大小」。

一番搜索,有效的 resizeContainer 使用方法如下:

❯ diskutil repairdisk disk0
Repairing the partition map might erase disk0s1, proceed? (y/N) y
Started partition map repair on disk0
Checking prerequisites
Checking the partition list
Adjusting partition map to fit whole disk as required
Checking for an EFI system partition
Checking the EFI system partition's size
Checking the EFI system partition's file system
Checking the EFI system partition's folder content
Checking all HFS data partition loader spaces
Checking booter partitions
Reviewing boot support loaders
Checking Core Storage Physical Volume partitions
The partition map appears to be OK
Finished partition map repair on disk0
❯ diskutil apfs resizeContainer disk1 0
Started APFS operation
Aligning grow delta to 136,026,390,528 bytes and targeting a new physical store size of 255,850,758,144 bytes
Determined the maximum size for the targeted physical store of this APFS Container to be 255,849,730,048 bytes
Resizing APFS Container designated by APFS Container Reference disk1
The specific APFS Physical Store being resized is disk0s2
Verifying storage system
Using live mode
Performing fsck_apfs -n -x -l -S /dev/disk0s2
Checking the container superblock
Checking the EFI jumpstart record
Checking the space manager
Checking the space manager free queue trees
Checking the object map
# balabala...
Verifying allocated space
The volume /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Growing APFS Physical Store disk0s2 from 119,824,367,616 to 255,850,758,144 bytes
Modifying partition map
Growing APFS data structures
Finished APFS operation
❯

参考链接:Cannot resize APFS partition – “The new size must be different than the existing size”

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注