20.2. Linux® File Systems

FreeBSD provides built-in support for several Linux® file systems. This section demonstrates how to load support for and how to mount the supported Linux® file systems.

20.2.1. ext2

Kernel support for ext2 file systems has been available since FreeBSD 2.2. In FreeBSD 8.x and earlier, the code is licensed under the GPL. Since FreeBSD 9.0, the code has been rewritten and is now BSD licensed.

The ext2fs(5) driver allows the FreeBSD kernel to both read and write to ext2 file systems.

注意:

This driver can also be used to access ext3 and ext4 file systems. However, ext3 journaling, extended attributes, and inodes greater than 128-bytes are not supported. Support for ext4 is read-only.

To access an ext file system, first load the kernel loadable module:

# kldload ext2fs

Then, mount the ext volume by specifying its FreeBSD partition name and an existing mount point. This example mounts /dev/ad1s1 on /mnt:

# mount -t ext2fs /dev/ad1s1 /mnt

20.2.2. XFS

A FreeBSD kernel can be configured to provide read-only support for XFS file systems.

To compile in XFS support, add the following option to a custom kernel configuration file and recompile the kernel using the instructions in 章 8, 設定 FreeBSD Kernel:

options	XFS

Then, to mount an XFS volume located on /dev/ad1s1:

# mount -t xfs /dev/ad1s1 /mnt

The sysutils/xfsprogs package or port provides additional utilities, with man pages, for using, analyzing, and repairing XFS file systems.

20.2.3. ReiserFS

FreeBSD provides read-only support for The Reiser file system, ReiserFS.

To load the reiserfs(5) driver:

# kldload reiserfs

Then, to mount a ReiserFS volume located on /dev/ad1s1:

# mount -t reiserfs /dev/ad1s1 /mnt

本文及其他文件,可由此下載: ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/

若有 FreeBSD 方面疑問,請先閱讀 FreeBSD 相關文件,如不能解決的話,再洽詢 <questions@FreeBSD.org>。

關於本文件的問題,請洽詢 <doc@FreeBSD.org>。