mirror of
https://git.FreeBSD.org/doc.git
synced 2026-09-09 00:07:23 +08:00
237 lines
7.0 KiB
Plaintext
237 lines
7.0 KiB
Plaintext
---
|
|
title: Chapter 23. Other File Systems
|
|
part: Part III. System Administration
|
|
prev: books/handbook/zfs
|
|
next: books/handbook/virtualization
|
|
description: This chapter shows the other filesystems supported by FreeBSD
|
|
tags: ["filesystem", "ext2", "ext3", "ext4", "ext2fs", "FAT", "exFAT", "NTFS", "HFS", "HFS+", "Apple", "Microsoft", "Linux"]
|
|
showBookMenu: true
|
|
weight: 27
|
|
params:
|
|
path: "/books/handbook/filesystems/"
|
|
---
|
|
|
|
[[filesystems]]
|
|
= Other File Systems
|
|
:doctype: book
|
|
:toc: macro
|
|
:toclevels: 1
|
|
:icons: font
|
|
:sectnums:
|
|
:sectnumlevels: 6
|
|
:sectnumoffset: 23
|
|
:partnums:
|
|
:source-highlighter: rouge
|
|
:experimental:
|
|
:images-path: books/handbook/filesystems/
|
|
|
|
ifdef::env-beastie[]
|
|
ifdef::backend-html5[]
|
|
:imagesdir: ../../../../images/{images-path}
|
|
endif::[]
|
|
ifndef::book[]
|
|
include::shared/authors.adoc[]
|
|
include::shared/mirrors.adoc[]
|
|
include::shared/releases.adoc[]
|
|
include::shared/attributes/attributes-{{% lang %}}.adoc[]
|
|
include::shared/{{% lang %}}/teams.adoc[]
|
|
include::shared/{{% lang %}}/mailing-lists.adoc[]
|
|
include::shared/{{% lang %}}/urls.adoc[]
|
|
toc::[]
|
|
endif::[]
|
|
ifdef::backend-pdf,backend-epub3[]
|
|
include::../../../../../shared/asciidoctor.adoc[]
|
|
endif::[]
|
|
endif::[]
|
|
|
|
ifndef::env-beastie[]
|
|
toc::[]
|
|
include::../../../../../shared/asciidoctor.adoc[]
|
|
endif::[]
|
|
|
|
[[filesystems-synopsis]]
|
|
== Synopsis
|
|
|
|
File systems are a fundamental component of any operating system.
|
|
They enable users to store, manage, and access data, making storage devices like hard drives, flash drives, and USB storage devices practical for everyday use.
|
|
Different operating systems use different file systems natively.
|
|
|
|
FreeBSD has traditionally used the Unix File System (UFS), with the modernized UFS2 as its primary native file system.
|
|
FreeBSD also uses the Z File System (ZFS), known for its advanced features, robustness, and reliability.
|
|
See crossref:zfs[zfs,The Z File System (ZFS)] for more details.
|
|
|
|
In addition to its native file systems, FreeBSD supports a broad range of file systems from other operating systems.
|
|
Support for these file systems varies, some require loading kernel modules, while others need additional userland tools.
|
|
|
|
Before reading this chapter:
|
|
|
|
* Be familiar with UNIX(R) concepts and crossref:basics[basics,FreeBSD basics].
|
|
* Feel comfortable crossref:ports[ports,installing software] in FreeBSD.
|
|
* Have some understanding of crossref:disks[disks,disks], storage devices, and FreeBSD's naming conventions for devices.
|
|
|
|
Read this chapter to:
|
|
|
|
* Understand the differences between native and supported file systems.
|
|
* Know which file systems are supported by FreeBSD and the level of support available.
|
|
* Learn how to enable, configure, access, and work with non-native file systems.
|
|
|
|
[[filesystems-linux]]
|
|
== Linux(R) File Systems
|
|
|
|
FreeBSD provides built-in support for several Linux(R) file systems.
|
|
This section demonstrates how to load support for and how to mount the supported Linux(R) file systems.
|
|
|
|
[[ext]]
|
|
=== Extended File System (EXT)
|
|
|
|
Kernel support for Extended File System (EXT) file systems has been available since FreeBSD 2.2.
|
|
The man:ext2fs[4] driver allows the FreeBSD kernel to both read and write to ext2, ext3, and ext4 file systems.
|
|
|
|
[WARNING]
|
|
====
|
|
Journalling and encryption are not supported yet.
|
|
====
|
|
|
|
To access an ext file system, mount the ext volume by specifying its FreeBSD partition name and an existing mount point.
|
|
This example mounts [.filename]#/dev/ada1s1# on [.filename]#/mnt#:
|
|
|
|
[source,shell]
|
|
....
|
|
# mount -t ext2fs /dev/ada1s1 /mnt
|
|
....
|
|
|
|
[[filesystems-windows]]
|
|
== Windows(R) File Systems
|
|
|
|
FreeBSD supports FAT, exFAT, and NTFS file systems, enabling access to Windows-formatted storage.
|
|
|
|
[[fat]]
|
|
=== FAT File System
|
|
|
|
The FAT file system is a simple and robust file system.
|
|
Although it lacks the performance, reliability, and scalability of modern alternatives, its availability on many different operating systems makes it a common choice for data exchange between devices.
|
|
|
|
To access a FAT file system, mount the FAT volume by specifying its FreeBSD partition name and an existing mount point.
|
|
This example mounts [.filename]#/dev/ada0s1# on [.filename]#/mnt#:
|
|
|
|
[source,shell]
|
|
....
|
|
# mount -t msdosfs /dev/ada0s1 /mnt
|
|
....
|
|
|
|
[[ex-fat]]
|
|
=== exFAT File System
|
|
|
|
exFAT (Extended File Allocation Table) is a lightweight file system optimized for flash storage devices, such as USB drives and SD cards.
|
|
It supports large file sizes and is widely used across various platforms, making it ideal for external storage.
|
|
|
|
To use exFAT on FreeBSD, install the package:filesystems/exfat[] package, load the FUSE kernel module, and mount the file system as shown below:
|
|
|
|
Install the exFAT package:
|
|
|
|
[source,shell]
|
|
....
|
|
# pkg install fusefs-exfat
|
|
....
|
|
|
|
Before using a FUSE file system, load the man:fusefs[4] kernel module:
|
|
|
|
[source,shell]
|
|
....
|
|
# kldload fusefs
|
|
....
|
|
|
|
Use man:sysrc[8] to load the module at startup:
|
|
|
|
[source,shell]
|
|
....
|
|
# sysrc kld_list+=fusefs
|
|
....
|
|
|
|
Mount the exFAT volume by specifying its FreeBSD partition name and an existing mount point.
|
|
This example mounts [.filename]#/dev/ada0s1# on [.filename]#/mnt#:
|
|
|
|
[source,shell]
|
|
....
|
|
# mount.exfat /dev/ada0s1 /mnt
|
|
....
|
|
|
|
[[using-ntfs]]
|
|
=== NTFS File System
|
|
|
|
NTFS is a robust file system developed by Microsoft(R) and commonly used in Windows operating systems.
|
|
FreeBSD provides full read and write support for NTFS through the package:filesystems/ntfs[] package, making it easy to access and modify NTFS-formatted storage devices.
|
|
|
|
To use NTFS on FreeBSD, install the package:filesystems/ntfs[] package, load the FUSE kernel module, and mount the file system as shown below:
|
|
|
|
Install the NTFS package:
|
|
|
|
[source,shell]
|
|
....
|
|
# pkg install fusefs-ntfs
|
|
....
|
|
|
|
Before using a FUSE file system, load the man:fusefs[4] kernel module:
|
|
|
|
[source,shell]
|
|
....
|
|
# kldload fusefs
|
|
....
|
|
|
|
Use man:sysrc[8] to load the module at startup:
|
|
|
|
[source,shell]
|
|
....
|
|
# sysrc kld_list+=fusefs
|
|
....
|
|
|
|
Mount the NTFS volume by specifying its FreeBSD partition name and an existing mount point.
|
|
This example mounts [.filename]#/dev/ada0s1# on [.filename]#/mnt#:
|
|
|
|
[source,shell]
|
|
....
|
|
# ntfs-3g /dev/ada0s1 /mnt
|
|
....
|
|
|
|
[[filesystems-macos]]
|
|
== MacOS(R) File Systems
|
|
|
|
FreeBSD provides support for MacOS(R) file systems, including HFS/HFS+, allowing access to storage devices formatted for Apple(R) systems.
|
|
|
|
[[hfs]]
|
|
=== HFS/HFS+ File System
|
|
|
|
HFS/HFS+ was the primary file system for MacOS prior to APFS, commonly used on older Mac devices and external drives.
|
|
FreeBSD provides read-only support for HFS/HFS+ through the package:filesystems/hfsfuse[] package.
|
|
|
|
To use HFS/HFS+ on FreeBSD, install the package:filesystems/hfsfuse[] package, load the FUSE kernel module, and mount the file system as shown below:
|
|
|
|
Install the HFS/HFS+ package:
|
|
|
|
[source,shell]
|
|
....
|
|
# pkg install fusefs-hfsfuse
|
|
....
|
|
|
|
Before using a FUSE file system, load the man:fusefs[4] kernel module:
|
|
|
|
[source,shell]
|
|
....
|
|
# kldload fusefs
|
|
....
|
|
|
|
Use man:sysrc[8] to load the module at startup:
|
|
|
|
[source,shell]
|
|
....
|
|
# sysrc kld_list+=fusefs
|
|
....
|
|
|
|
Mount the HFS/HFS+ volume by specifying its FreeBSD partition name and an existing mount point.
|
|
This example mounts [.filename]#/dev/ada0s1# on [.filename]#/mnt#:
|
|
|
|
[source,shell]
|
|
....
|
|
# hfsfuse /dev/ada0s1 /mnt
|
|
....
|