| NEWFS_APFS(8) | System Manager's Manual | NEWFS_APFS(8) |
newfs_apfs —
construct a new APFS volume
newfs_apfs |
[-o options]
[-i] [-b
block-size] [-s
volume-size | -q
volume-quota -r
volume-reserve] [-v
volume-name] [-E]
[-R role]
special |
newfs_apfs |
-C [-o
options] [-i]
[-b block-size]
special |
newfs_apfs |
-A [-o
options] [-i]
[-s volume-size |
-q volume-quota
-r volume-reserve]
[-v volume-name]
[-E -W
(empty password) | -E
-S -passphrase]
[-R role]
special |
newfs_apfs |
[-o options]
[-i] [-s
volume-size | -q
volume-quota -r
volume-reserve] [-v
volume-name] [-E]
[-R role]
special |
The newfs_apfs command creates a new APFS
container on the device and/or adds a new APFS volume to a container.
The first, more traditional, form of
newfs_apfs formats the given
special as a container with a single volume inside it.
The second form creates a container only, with no volumes. The third form is
used to non-destructively add additional volumes inside an existing
container. The fourth form reformats an existing volume by effectively
deleting and re-creating it; in this usage (only)
special indicates a volume inside the container.
The special parameter should be the path to a disk device node, such as /dev/disk1s2, although can be specified as simply disk1s2.
The options are as follows:
-b
block-size-o
options-i-e-U
uid-G
uid-q
volume-quota-r
volume-reserve-s
volume-size-s is equivalant to setting both
-q and -r to that same
value. If not specified then the available space is dynamic and determined
by the usage of other volumes within the same container
(space-sharing).-v
volume-name-A-Cnewfs_apfs -A may be used
later to format volumes inside that container.-E-D-W-E-S
password-F
special-w-R
roleThe newfs_apfs utility exits 0 on
success, and >0 if an error occurs.
The following formats a new container and a volume named "Macintosh" on the /dev/disk1s2 device:
newfs_apfs
-v Macintosh
disk1s2And then this adds another volume, named "Data" with a fixed size of 100 GB, to that container:
newfs_apfs
-v Data
-s 100g
-A disk1s2The newfs_apfs utility first appeared in
OS X 10.12.
| September 15, 2015 | Mac OS X |