xref: /netbsd/sbin/mount_overlay/mount_overlay.8 (revision 6550d01e)
1.\"	$NetBSD: mount_overlay.8,v 1.9 2004/06/10 14:13:36 uebayasi Exp $
2.\"
3.\" Copyright (c) 1992, 1993, 1994
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" This code is derived from software donated to Berkeley by
7.\" John Heidemann of the UCLA Ficus project.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\" 3. Neither the name of the University nor the names of its contributors
18.\"    may be used to endorse or promote products derived from this software
19.\"    without specific prior written permission.
20.\"
21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31.\" SUCH DAMAGE.
32.\"
33.\"     @(#)mount_null.8	8.6 (Berkeley) 5/1/95
34.\"
35.\"
36.Dd January 18, 2000
37.Dt MOUNT_OVERLAY 8
38.Os
39.Sh NAME
40.Nm mount_overlay
41.Nd mount an overlay filesystem;
42demonstrate the use of an overlay file system layer
43.Sh SYNOPSIS
44.Nm
45.Op Fl o Ar options
46.Ar /overlay
47.Ar mount-point
48.Sh DESCRIPTION
49The
50.Nm
51command creates an
52overlay layer, interposing the overlay filesystem between the over-mounted
53file store and future pathname lookups.
54.Pp
55A different device number for the virtual copy is returned by
56.Xr stat 2 ,
57but in other respects it is indistinguishable from the original.
58.Pp
59The
60.Nm
61filesystem differs from the null filesystem in that the
62.Nm
63filesystem does not replicate the sub-tree, it places itself between
64the sub-tree and all future access.
65.Pp
66The overlay layer has two purposes.
67First, it serves as a demonstration of layering by providing a layer
68which does nothing other than insert itself over the over-mounted
69file system.
70Second, the overlay layer can serve as a prototype layer.
71Since it provides all necessary layer framework,
72new file system layers which need to block access to the overlayed
73file system can be created very easily by starting
74with an overlay layer.
75.Pp
76The internal operation of the overlay layer is identical to that of the
77null layer.
78See its documentation for details.
79.Sh SEE ALSO
80.Xr mount 8 ,
81.Xr mount_null 8
82.Pp
83UCLA Technical Report CSD-910056,
84.Em "Stackable Layers: an Architecture for File System Development" .
85.Sh HISTORY
86The
87.Nm
88utility first appeared in
89.Nx 1.5 .
90