1mkfs(1M) System Administration Commands mkfs(1M)
2
3
4
6 mkfs - construct a file system
7
9 mkfs [-F FSType] [generic_options]
10 [-o FSType-specific_options] raw_device_file
11 [operands]
12
13
15 The mkfs utility constructs a file system on the raw_device_file by
16 calling the specific mkfs module indicated by -F FSType.
17
18
19 Note: ufs file systems are normally created with the newfs(1M) command.
20
21
22 generic_options are independent of file system type. FSType-spe‐
23 cific_options is a comma-separated list of keyword=value pairs (with
24 no intervening spaces), which are FSType-specific. raw_device_file
25 specifies the disk partition on which to write the file system. It is
26 required and must be the first argument following the spe‐
27 cific_options (if any). operands are FSType-specific. See the FSType-
28 specific manual page of mkfs (for example, mkfs_ufs [22m(1M)) for a
29 detailed description.
30
32 The following are the generic options for mkfs:
33
34 -F Specify the FSType to be constructed. If -F is not specified,
35 the FSType is determined from /etc/vfstab by matching the
36 raw_device_file with a vfstab entry, or by consulting the
37 /etc/default/fs file.
38
39
40 -V Echo the complete command line, but do not execute the command.
41 The command line is generated by using the options and arguments
42 provided and adding to them information derived from /etc/vfstab
43 or /etc/default/fs. This option may be used to verify and vali‐
44 date the command line.
45
46
47 -m Return the command line which was used to create the file system.
48 The file system must already exist. This option provides a means
49 of determining the command used in constructing the file system.
50
51
52 -o Specify FSType-specific options. See the manual page for the
53 mkfs module specific to the file system type.
54
55
57 See largefile(5) for the description of the behavior of mkfs when
58 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
59
61 /etc/default/fs Default file system type. Default values can be set
62 for the following flags in /etc/default/fs. For
63 example: LOCAL=ufs
64
65 LOCAL The default partition for a command if no
66 FSType is specified.
67
68
69
70 /etc/vfstab List of default parameters for each file system
71
72
74 See attributes(5) for descriptions of the following attributes:
75
76
77
78
79 ┌─────────────────────────────┬─────────────────────────────┐
80 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
81 ├─────────────────────────────┼─────────────────────────────┤
82 │Availability │SUNWcsu │
83 └─────────────────────────────┴─────────────────────────────┘
84
86 mkfs_ufs(1M), newfs(1M), vfstab(4), attributes(5), largefile(5)
87
88
89 Manual pages for the FSType-specific modules of mkfs.
90
92 This command might not be supported for all FSTypes.
93
94
95 You can use lofiadm to create a file that appears to a mkfs command as
96 a raw device. You can then use a mkfs command to create a file system
97 on that device. See lofiadm(1M) for examples of creating a UFS and a PC
98 (FAT) file system (using mkfs_ufs(1M) and mkfs_pcfs(1M)) on a device
99 created by lofiadm.
100
101
102
103SunOS 5.11 17 Nov 2000 mkfs(1M)