20.3. Linux® Filesystems

This section describes some of the Linux® filesystems supported by FreeBSD.

20.3.1. ext2

The ext2fs(5) file system kernel implementation 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.

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

# kldload ext2fs

Then, to mount an ext2fs(5) volume located on /dev/ad1s1:

# mount -t ext2fs /dev/ad1s1 /mnt

20.3.2. XFS

XFS was originally written by SGI for the IRIX operating system and was then ported to Linux® and released under the GPL. See this page for more details. The FreeBSD port was started by Russel Cattelan, Alexander Kabaev , and Craig Rodrigues .

To load XFS as a kernel-loadable module:

# kldload xfs

The xfs(5) driver lets the FreeBSD kernel access XFS filesystems. However, only read-only access is supported and writing to a volume is not possible.

To mount a xfs(5) volume located on /dev/ad1s1:

# mount -t xfs /dev/ad1s1 /mnt

The sysutils/xfsprogs port includes the mkfs.xfs which enables the creation of XFS filesystems, plus utilities for analyzing and repairing them.

The -p flag to mkfs.xfs can be used to create an xfs(5) filesystem which is populated with files and other metadata. This can be used to quickly create a read-only filesystem which can be tested on FreeBSD.

20.3.3. ReiserFS

The Reiser file system, ReiserFS, was ported to FreeBSD by Jean-Sébastien Pédron , and has been released under the GPL .

The ReiserFS driver permits the FreeBSD kernel to access ReiserFS file systems and read their contents, but not write to them.

First, the kernel-loadable module needs to be loaded:

# kldload reiserfs

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

# mount -t reiserfs /dev/ad1s1 /mnt

All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/

Questions that are not answered by the documentation may be sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.