如何缩小/调整apfs?
Posted
技术标签:
【中文标题】如何缩小/调整apfs?【英文标题】:how to shrink/resize apfs? 【发布时间】:2017-11-13 03:12:28 【问题描述】:我想缩小启动文件系统的大小(格式化为APFS),怎么做?
在 macOS Sierra 中,HFS+
可以在不重新启动/重新挂载的情况下缩小(在 disk utility
中),但在 macOS High Sierra 中,这似乎是不可能的。
【问题讨论】:
我也想弄清楚这一点。你找到解决办法了吗? @CharlesTruluck 还没有。 【参考方案1】:您要查找的命令是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
【讨论】:
以上是关于如何缩小/调整apfs?的主要内容,如果未能解决你的问题,请参考以下文章
如何在不缩小图像的情况下在 Android 中调整图像大小?