Establish a file system
When the system load increases gradually, it is not enough to rely on the original file system space, more efficient way is to add new hard disk devices. This first requires changes to the hardware settings of the hard disk and its controllers, as well as the FreeBSD kernel configuration so that the hard disk can be installed on the computer and properly identified by the FreeBSD kernel. Next you need to create a new file system on your new hard disk.
During the system installation, you have contacted the way to manage hard disk and partition under FreeBSD, FreeBSD need two steps to allocate a hard disk space for the file system, the first step is to create a UFS system partition for FreeBSD, which is only used by FreeBSD. Then in the second step from this partition, divide the space for each file system, under FreeBSD called the Disklabel tag that creates the file system.
The easiest and most intuitive way to create a new file system or swap space is to use the installer Sysinstall so that the system starts to automatically install the file system. The way to install a new file system using Sysinstall is described in detail during system installation, with root permissions executing/stand/sysinstall can enter Sysinstall, and then select Partition to partition, select Label creates and maintains the BSD file system.
To establish a command-line approach to the file system
In addition to using Sysinstall, you can use the command line to do these things. In comparison, the command-line approach is more difficult and error-prone, so there is no need to use this approach, but the command-line approach provides greater flexibility and is more efficient in some system maintenance situations.
The command-line method of establishing the file system requires that the FDISK command be used to partition the hard disk, that Fdisk can view the partition information on the System partition table, and change its partition settings, and then the Disklabel command can divide the partitions into different subarea spaces and mark the disklabel of each space Use NEWFS to create a new file system, or use the Swapon command to increase the switching device.
To create a new file system, first use the Interactive fdisk command (using the-i parameter) to partition the hard disk, and the Fdisk command with no parameters shows only the partition settings for that hard disk, not the settings. FDISK uses the hard disk settings it detects as the default, and if you do not need to change, you can use these defaults to respond to their inquiries directly. The data that can be modified in Fdisk has hard disk mapping data, and the starting position and type of four partitions.
# fdisk -i wd1
******* Working on device /dev/rwd1 *******
parameters extraced from in-core disklabel are:
cylinders=525 heads=255 sectors/track=63 (16065 blks/cyl)
parameters to be used for BIOS calculations are:
cylinders=525 heads=255 sectors/track=63 (16065 blks/cyl)
Do you want to change our idea of what BIOS thinks ? [n]