Creating New Filesystems
Filesystems can be created on raw partitions or logical volumes. For example, in the prtvtoc output shown above, the root (/) filesystem was created on the raw disk slice /dev/rdsk/c0t0d0s0 and the /usr filesystem was created on the raw disk slice /dev/rdsk/c0t0d0s4.
The mkfs command is most commonly used to create a new filesystem, although on some platforms the newfs command provides a more friendly interface and calls mkfs internally. The type of filesystem to create is passed to mkfs as an argument. For example, to create a VxFS filesystem, this would be achieved by invoking mkfs -F vxfs on most UNIX platforms. On Linux, the call would be mkfs -t vxfs.
The filesystem type is passed as an argument to the generic mkfs command (-F or -t). This is then used to locate the switchout command by searching well-known locations as shown above. The following two examples show how to create a VxFS filesystem. In the first example, the size of the filesystem to create is passed as an argument. In the second example, the size is omitted, in which case VxFS determines the size of the device and creates a filesystem of that size.
# mkfs -F vxfs /dev/vx/rdsk/vol1 25g version 4 layout 52428800 sectors, 6553600 blocks of size 4096, log size 256 blocks unlimited inodes, largefiles not supported 6553600 data blocks, 6552864 free data blocks 200 allocation units of 32768 blocks, 32768 data blocks # mkfs -F vxfs /dev/vx/rdsk/vol1 version 4 layout 54525952 sectors, 6815744 ...