1NEWFS_HFS(8) BSD System Manager's Manual NEWFS_HFS(8)
2
4 mkfs.hfsplus — construct a new HFS Plus file system
5
7 mkfs.hfsplus [-N] [-U uid] [-G gid] [-M mask] [-P] [-s] [-b block-size]
8 [-c clump-size-list] [-i first-cnid] [-J [journal-size]]
9 [-n node-size-list] [-v volume-name] special
10 mkfs.hfsplus -N partition-size [-U uid] [-G gid] [-M mask] [-P] [-h | -w]
11 [-s] [-b block-size] [-c clump-size-list] [-i first-cnid]
12 [-J [journal-size]] [-n node-size-list] [-v volume-name]
13
15 mkfs.hfsplus builds an HFS Plus file system on the specified special
16 device. Before running mkfs.hfsplus the disk should be partitioned using
17 the Disk Utility application or pdisk(8).
18
19 The file system default parameters are calculated based on the size of
20 the disk partition. Typically the defaults are reasonable, however
21 mkfs.hfsplus has several options to allow the defaults to be selectively
22 overridden. The options are as follows:
23
24 -N [partition-size]
25 Causes the file system parameters to be printed out without
26 really creating the file system. If the argument following
27 the -N starts with a decimal digit, it is assumed to be a
28 partition size. The paritition size may be given in decimal,
29 octal (with leading `0'), or hexadecimal (with leading `0x').
30 The partition size argument can be specified in 512-byte
31 blocks (with a `b' suffix), petabytes (`p' suffix), terabytes
32 (`t' suffix), gigabytes (`g' suffix), megabytes (`m' suffix),
33 or kilobytes (`k' suffix). All suffixes indicate binary, not
34 decimal, multipliers (e.g., `1k' is 1024 bytes). If no suf‐
35 fix is specified, the value is assumed to be in bytes; if an
36 illegal suffix is specified, it results in a size of 0 bytes.
37
38 If the partition size is given, then no special device argu‐
39 ment shall be provided. If no partition size is given, then
40 the size of the given special device is used instead, and the
41 special device will not be written to.
42
43 -U uid Set the owner of the file system's root directory to uid.
44
45 -G gid Set the group of the file system's root directory to gid.
46
47 -M mask Specify the octal access permissions mask for the file sys‐
48 tem's root directory.
49
50 -P Set kHFSContentProtectionBit in the volume's attributes,
51 which will cause the volume to be mounted with the "protect"
52 option if the kernel supports it.
53
54 -s Creates a case-sensitive HFS Plus filesystem. By default a
55 case-insensitive filesystem is created. Case-sensitive HFS
56 Plus file systems require a Mac OS X version of 10.3 (Darwin
57 7.0) or later.
58
59 -b block-size
60 The allocation block size of the file system. The default
61 value is 4096.
62
63 -c clump-size-list
64 This specifies the clump and/or initial sizes, in allocation
65 blocks, for the various metadata files. Clump sizes are
66 specified with the -c option followed by a comma separated
67 list of the form arg=blocks.
68
69 Example: -c c=5000,e=500
70
71 a=blocks Set the attribute file clump size.
72
73 b=blocks Set the allocation bitmap file clump size.
74
75 c=blocks Set the catalog file clump size.
76
77 d=blocks Set the data fork clump size.
78
79 e=blocks Set the extent overflow file clump size.
80
81 r=blocks Set the resource fork clump size.
82
83 -i first-cnid
84 This specifies the initial catalog node ID for user files and
85 directories. The default value is 16.
86
87 -J [journal-size]
88 Creates a journaled HFS+ volume. The default journal size
89 varies, based on the size of the volume. Appending an 'M' to
90 the journal size implies megabytes (i.e. 64M is 64
91 megabytes). The maximum journal size is 1024 megabytes.
92
93 -n node-size-list
94 This specifies the b-tree node sizes, in bytes, for the vari‐
95 ous b-tree files. Node sizes are specified with the -n
96 option followed by a comma separated list of the form
97 arg=bytes. The node size must be a power of two and no larger
98 than 32768 bytes.
99
100 Example: -n c=8192,e=4096
101
102 a=bytes Set the attribute b-tree node size.
103
104 c=bytes Set the catalog b-tree node size.
105
106 e=bytes Set the extent overflow b-tree node size.
107
108 -v volume-name
109 Volume name (file system name) in ascii or UTF-8 format.
110
112 mount(8), pdisk(8)
113
115 The mkfs.hfsplus command appeared in Mac OS X Server 1.0 . As of Mac OS
116 X 10.6, this utility no longer generates HFS standard file systems.
117
118Mac OS X June 19, 2008 Mac OS X