Establish file system in FreeBSD

Source: Internet
Author: User
Tags command line file system requires

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]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.