1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
The FreeBSD Documentation Project
$FreeBSD$
-->
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="filesystems">
<info>
<title>Other File Systems</title>
<authorgroup>
<author><personname><firstname>Tom</firstname><surname>Rhodes</surname></personname><contrib>Written
by </contrib></author>
</authorgroup>
</info>
<sect1 xml:id="filesystems-synopsis">
<title>Synopsis</title>
<indexterm><primary>File Systems</primary></indexterm>
<indexterm>
<primary>File Systems Support</primary>
<see>File Systems</see>
</indexterm>
<para>File systems are an integral part of any operating system.
They allow users to upload and store files, provide access
to data, and make hard drives useful. Different operating
systems differ in their native file system. Traditionally, the
native &os; file system has been the Unix File System
<acronym>UFS</acronym> which has been modernized as
<acronym>UFS2</acronym>. Since &os; 7.0, the Z File
System (<acronym>ZFS</acronym>) is also available as a native file
system. See <xref linkend="zfs"/> for more information.</para>
<para>In addition to its native file systems, &os; supports a
multitude of other file systems so that data from other
operating systems can be accessed locally, such as data stored
on locally attached <acronym>USB</acronym> storage devices,
flash drives, and hard disks. This includes support for the
&linux; Extended File System (<acronym>EXT</acronym>) and the
Reiser file system.</para>
<para>There are different levels of &os; support for the various
file systems. Some require a kernel module to be loaded and
others may require a toolset to be installed. Some non-native
file system support is full read-write while others are
read-only.</para>
<para>After reading this chapter, you will know:</para>
<itemizedlist>
<listitem>
<para>The difference between native and supported file
systems.</para>
</listitem>
<listitem>
<para>Which file systems are supported by &os;.</para>
</listitem>
<listitem>
<para>How to enable, configure, access, and make use of
non-native file systems.</para>
</listitem>
</itemizedlist>
<para>Before reading this chapter, you should:</para>
<itemizedlist>
<listitem>
<para>Understand &unix; and <link
linkend="basics">&os; basics</link>.</para>
</listitem>
<listitem>
<para>Be familiar with the basics of <link
linkend="kernelconfig">kernel configuration and
compilation</link>.</para>
</listitem>
<listitem>
<para>Feel comfortable <link linkend="ports">installing
software</link> in &os;.</para>
</listitem>
<listitem>
<para>Have some familiarity with <link
linkend="disks">disks</link>, storage, and device names in
&os;.</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 xml:id="filesystems-linux">
<title>&linux; File Systems</title>
<para>&os; 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.</para>
<sect2>
<title><acronym>ext2</acronym></title>
<para>Kernel support for ext2 file systems has
been available since &os; 2.2. In &os; 8.x and
earlier, the code is licensed under the
<acronym>GPL</acronym>. Since &os; 9.0, the code has
been rewritten and is now <acronym>BSD</acronym>
licensed.</para>
<para>The &man.ext2fs.5; driver allows the &os; kernel to both
read and write to ext2 file systems.</para>
<note>
<para>
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.</para>
</note>
<para>To access an ext file system, first
load the kernel loadable module:</para>
<screen>&prompt.root; <userinput>kldload ext2fs</userinput></screen>
<para>Then, mount the ext volume by specifying its &os;
partition name and an existing mount point. This example
mounts <filename>/dev/ad1s1</filename> on
<filename>/mnt</filename>:</para>
<screen>&prompt.root; <userinput>mount -t ext2fs <replaceable>/dev/ad1s1</replaceable> <replaceable>/mnt</replaceable></userinput></screen>
</sect2>
<sect2>
<title>XFS</title>
<para>A &os; kernel can be configured to provide read-only
support for <acronym>XFS</acronym>
file systems.</para>
<para>To compile in <acronym>XFS</acronym> support, add the
following option to a custom kernel configuration file and
recompile the kernel using the instructions in <xref
linkend="kernelconfig"/>:</para>
<programlisting>options XFS</programlisting>
<para>Then, to mount an <acronym>XFS</acronym> volume located on
<filename>/dev/ad1s1</filename>:</para>
<screen>&prompt.root; <userinput>mount -t xfs <replaceable>/dev/ad1s1</replaceable> <replaceable>/mnt</replaceable></userinput></screen>
<para>The <package>sysutils/xfsprogs</package> package or
port provides additional
utilities, with man pages, for using, analyzing, and repairing
<acronym>XFS</acronym> file systems.</para>
</sect2>
<sect2>
<title>ReiserFS</title>
<para>&os; provides read-only support for The Reiser file
system, ReiserFS.</para>
<para>To load the &man.reiserfs.5; driver:</para>
<screen>&prompt.root; <userinput>kldload reiserfs</userinput></screen>
<para>Then, to mount a ReiserFS volume located on
<filename>/dev/ad1s1</filename>:</para>
<screen>&prompt.root; <userinput>mount -t reiserfs <replaceable>/dev/ad1s1</replaceable> <replaceable>/mnt</replaceable></userinput></screen>
</sect2>
</sect1>
<!--
<sect1>
<title>Device File System</title>
</sect1>
<sect1>
<title>DOS and NTFS File Systems</title>
<para>This is a good section for those who transfer files, using
USB devices, from Windows to FreeBSD and vice-versa. My camera,
and many other cameras I have seen default to using FAT16. There
is (was?) a kde utility, I think called kamera, that could be used
to access camera devices. A section on this would be useful.</para>
<para>XXXTR: Though! The disks chapter, covers a bit of this and
devfs under it's USB devices. It leaves a lot to be desired though,
see:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/usb-disks.html
It may be better to flesh out that section a bit more. Add the
word "camera" to it so that others can easily notice.</para>
</sect1>
<sect1>
<title>Linux EXT File System</title>
<para>Probably NOT as useful as the other two, but it requires
knowledge of the existence of the tools. Which are hidden in
the ports collection. Most Linux guys would probably only use
Linux, BSD guys would be smarter and use NFS.</para>
</sect1>
<sect1>
<title>HFS</title>
<para>I think this is the file system used on Apple OSX. There are
tools in the ports collection, and with Apple being a big
FreeBSD supporter and user of our technologies, surely there
is enough cross over to cover this?</para>
</sect1>
-->
</chapter>
|