gpt4 book ai didi

macos-high-sierra - 如何缩小/调整apfs的大小?

转载 作者:行者123 更新时间:2023-12-04 07:43:11 25 4
gpt4 key购买 nike

我想缩小启动文件系统的大小(格式化为APFS),怎么做?

在 macOS Sierra 中,HFS+无需重新启动/重新安装即可缩小(在 disk utility 中),但在 macOS High Sierra 中,这似乎是不可能的。

最佳答案

您要查找的命令是 diskutil apfs resizeContainer :

Usage:  diskutil APFS resizeContainer <inputDisk> <newSize> [<triple>*]
where <inputDisk> = A Container Reference DiskIdentifier (preferred)
or a Physical Store DiskIdentifier
<newSize> = the desired new Container or Physical Store size
<triple> = a { fileSystemPersonality, name, size } tuple
Resize an APFS Container. One of the Container's Physical Store disks will be
resized, and therefore its Container will be resized by an equal amount. You
can specify a new size of zero to request an automatic grow-to-fit operation.
If the new size implies a shrink, you can specify ordered triples in the same
manner as diskutil partitionDisk, etc, to fill the partition map's free space
gap that would otherwise result. If there is more than one Physical Store and
you specify a Container Reference, the appropriate Physical Store will be
chosen automatically. Ownership of the affected disks is required.
Example: diskutil apfs resizeContainer disk5 110g
diskutil apfs resizeContainer disk5 110g jhfs+ foo 10g ms-dos BAR r
diskutil apfs resizeContainer disk0s2 90g jhfs+ foo 10g ms-dos BAR r

关于macos-high-sierra - 如何缩小/调整apfs的大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44485949/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com