Before a new block device can be used for storing files, we need to create a
new filesystem on it. We do this by using a mkfs command -- the
particular mkfs we use depends on the type of filesystem that we'd like to
create. In this example, we use mke2fs to create an ext2 filesystem on
/dev/hdc6, an empty and unused partition block device:
# mke2fs /dev/hdc6
mke2fs 1.25 (20-Sep-2001)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1537088 inodes, 3072423 blocks
153621 blocks (5.00%) reserved for the super user
First data block=0
94 block groups
32768 blocks per group, 32768 fragments per group
16352 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 22 mounts or 180 days,
whichever comes first. Use tune2fs -c or -i to override.
Above, mke2fs created an empty ext2 filesystem on /dev/hda6.