-
Notifications
You must be signed in to change notification settings - Fork 4
/
filesystem.xml
87 lines (76 loc) · 3.29 KB
/
filesystem.xml
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
<chapter id='thefilesystem'><title>The Filesystem</title>
<para>This standard assumes that the operating system underlying an
FHS-compliant file system supports the same basic security features
found in most UNIX filesystems.</para>
<para>It is possible to define two independent distinctions among
files: shareable vs. unshareable and variable vs. static. In general,
files that differ in either of these respects should be located in
different directories. This makes it easy to store files with
different usage characteristics on different filesystems.</para>
<para>"Shareable" files are those that can be stored on one host
and used on others. "Unshareable" files are those that are not
shareable. For example, the files in user home directories are
shareable whereas device lock files are not.</para>
<para>"Static" files include binaries, libraries, documentation
files and other files that do not change without system administrator
intervention. "Variable" files are files that are not static.</para>
<tip><title>Rationale</title>
<para>Shareable files can be stored on one host and used on several
others. Typically, however, not all files in the filesystem
hierarchy are shareable and so each system has local storage
containing at least its unshareable files. It is convenient if all
the files a system requires that are stored on a foreign host can be
made available by mounting one or a few directories from the foreign
host.</para>
<para>Static and variable files should be segregated because static
files, unlike variable files, can be stored on read-only media and
do not need to be backed up on the same schedule as variable
files.</para>
<para>Historical UNIX-like filesystem hierarchies contained both
static and variable files under both <filename>/usr</filename> and
<filename>/etc</filename>. In order to realize the advantages
mentioned above, the <filename>/var</filename> hierarchy was
created and all variable files were transferred from
<filename>/usr</filename> to <filename>/var</filename>.
Consequently <filename>/usr</filename> can now be mounted read-only
(if it is a separate filesystem). Variable files have been
transferred from <filename>/etc</filename> to
<filename>/var</filename> over a longer period as technology has
permitted.</para>
<para>Here is an example of a FHS-compliant system.
(Other FHS-compliant layouts are possible.)</para>
<informaltable frame='topbot'>
<tgroup cols='3' align='left'>
<thead>
<row rowsep='1'>
<entry><emphasis></emphasis></entry>
<entry>shareable</entry>
<entry>unshareable</entry>
</row>
</thead>
<tbody>
<row rowsep='0'>
<entry>static</entry>
<entry><filename>/usr</filename></entry>
<entry><filename>/etc</filename></entry>
</row>
<row rowsep='1'>
<entry></entry>
<entry><filename>/opt</filename></entry>
<entry><filename>/boot</filename></entry>
</row>
<row rowsep='0'>
<entry>variable</entry>
<entry><filename>/var/mail</filename></entry>
<entry><filename>/var/run</filename></entry>
</row>
<row>
<entry></entry>
<entry><filename>/var/spool/news</filename></entry>
<entry><filename>/var/lock</filename></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</tip>
</chapter>