mount_unionfs.8 (99501) | mount_unionfs.8 (102231) |
---|---|
1.\" Copyright (c) 1994 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software donated to Berkeley by 5.\" Jan-Simon Pendry. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)mount_union.8 8.6 (Berkeley) 3/27/94 | 1.\" Copyright (c) 1994 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software donated to Berkeley by 5.\" Jan-Simon Pendry. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)mount_union.8 8.6 (Berkeley) 3/27/94 |
36.\" $FreeBSD: head/sbin/mount_unionfs/mount_unionfs.8 99501 2002-07-06 19:34:18Z charnier $ | 36.\" $FreeBSD: head/sbin/mount_unionfs/mount_unionfs.8 102231 2002-08-21 18:11:48Z trhodes $ |
37.\" 38.Dd March 27, 1994 39.Dt MOUNT_UNIONFS 8 40.Os 41.Sh NAME 42.Nm mount_unionfs | 37.\" 38.Dd March 27, 1994 39.Dt MOUNT_UNIONFS 8 40.Os 41.Sh NAME 42.Nm mount_unionfs |
43.Nd mount union filesystems | 43.Nd mount union file systems |
44.Sh SYNOPSIS 45.Nm 46.Op Fl br 47.Op Fl o Ar options 48.Ar directory 49.Ar uniondir 50.Sh DESCRIPTION 51The --- 31 unchanged lines hidden (view full) --- 83See the 84.Xr mount 8 85man page for possible options and their meanings. 86.It Fl r 87Hide the lower layer completely in the same way as mounting with 88.Xr mount_nullfs 8 . 89.El 90.Pp | 44.Sh SYNOPSIS 45.Nm 46.Op Fl br 47.Op Fl o Ar options 48.Ar directory 49.Ar uniondir 50.Sh DESCRIPTION 51The --- 31 unchanged lines hidden (view full) --- 83See the 84.Xr mount 8 85man page for possible options and their meanings. 86.It Fl r 87Hide the lower layer completely in the same way as mounting with 88.Xr mount_nullfs 8 . 89.El 90.Pp |
91To enforce filesystem security, the user mounting the filesystem | 91To enforce file system security, the user mounting the file system |
92must be superuser or else have write permission on the mounted-on 93directory. 94.Pp 95Filenames are looked up in the upper layer and then in the 96lower layer. 97If a directory is found in the lower layer, and there is no entry 98in the upper layer, then a 99.Em shadow --- 5 unchanged lines hidden (view full) --- 105.Pp 106If a file exists in the upper layer then there is no way to access 107a file with the same name in the lower layer. 108If necessary, a combination of loopback and union mounts can be made 109which will still allow the lower files to be accessed by a different 110pathname. 111.Pp 112Except in the case of a directory, | 92must be superuser or else have write permission on the mounted-on 93directory. 94.Pp 95Filenames are looked up in the upper layer and then in the 96lower layer. 97If a directory is found in the lower layer, and there is no entry 98in the upper layer, then a 99.Em shadow --- 5 unchanged lines hidden (view full) --- 105.Pp 106If a file exists in the upper layer then there is no way to access 107a file with the same name in the lower layer. 108If necessary, a combination of loopback and union mounts can be made 109which will still allow the lower files to be accessed by a different 110pathname. 111.Pp 112Except in the case of a directory, |
113access to an object is granted via the normal filesystem access checks. | 113access to an object is granted via the normal file system access checks. |
114For directories, the current user must have access to both the upper 115and lower directories (should they both exist). 116.Pp 117Requests to create or modify objects in 118.Ar uniondir 119are passed to the upper layer with the exception of a few special cases. 120An attempt to open for writing a file which exists in the lower layer 121causes a copy of the 122.Em entire 123file to be made to the upper layer, and then for the upper layer copy 124to be opened. 125Similarly, an attempt to truncate a lower layer file to zero length 126causes an empty file to be created in the upper layer. 127Any other operation which would ultimately require modification to 128the lower layer fails with 129.Er EROFS . 130.Pp | 114For directories, the current user must have access to both the upper 115and lower directories (should they both exist). 116.Pp 117Requests to create or modify objects in 118.Ar uniondir 119are passed to the upper layer with the exception of a few special cases. 120An attempt to open for writing a file which exists in the lower layer 121causes a copy of the 122.Em entire 123file to be made to the upper layer, and then for the upper layer copy 124to be opened. 125Similarly, an attempt to truncate a lower layer file to zero length 126causes an empty file to be created in the upper layer. 127Any other operation which would ultimately require modification to 128the lower layer fails with 129.Er EROFS . 130.Pp |
131The union filesystem manipulates the namespace, rather than 132individual filesystems. | 131The union file system manipulates the namespace, rather than 132individual file systems. |
133The union operation applies recursively down the directory tree 134now rooted at 135.Ar uniondir . | 133The union operation applies recursively down the directory tree 134now rooted at 135.Ar uniondir . |
136Thus any filesystems which are mounted under | 136Thus any file systems which are mounted under |
137.Ar uniondir 138will take part in the union operation. 139This differs from the 140.Em union 141option to 142.Xr mount 8 143which only applies the union operation to the mount point itself, 144and then only for lookups. --- 42 unchanged lines hidden (view full) --- 187OWN RISK. BEWARE OF DOG. SLIPPERY WHEN WET. 188.Pp 189This code also needs an owner in order to be less dangerous - serious 190hackers can apply by sending mail to 191.Aq hackers@FreeBSD.org 192and announcing 193their intent to take it over. 194.Pp | 137.Ar uniondir 138will take part in the union operation. 139This differs from the 140.Em union 141option to 142.Xr mount 8 143which only applies the union operation to the mount point itself, 144and then only for lookups. --- 42 unchanged lines hidden (view full) --- 187OWN RISK. BEWARE OF DOG. SLIPPERY WHEN WET. 188.Pp 189This code also needs an owner in order to be less dangerous - serious 190hackers can apply by sending mail to 191.Aq hackers@FreeBSD.org 192and announcing 193their intent to take it over. 194.Pp |
195Without whiteout support from the filesystem backing the upper layer, | 195Without whiteout support from the file system backing the upper layer, |
196there is no way that delete and rename operations on lower layer 197objects can be done. 198.Er EROFS 199is returned for this kind of operations along with any others 200which would make modifications to the lower layer, such as 201.Xr chmod 1 . 202.Pp 203Running 204.Xr find 1 205over a union tree has the side-effect of creating 206a tree of shadow directories in the upper layer. 207.Sh HISTORY 208The 209.Nm 210utility first appeared in 211.Bx 4.4 . 212It first worked in 213.Fx Ns -(fill this in) . | 196there is no way that delete and rename operations on lower layer 197objects can be done. 198.Er EROFS 199is returned for this kind of operations along with any others 200which would make modifications to the lower layer, such as 201.Xr chmod 1 . 202.Pp 203Running 204.Xr find 1 205over a union tree has the side-effect of creating 206a tree of shadow directories in the upper layer. 207.Sh HISTORY 208The 209.Nm 210utility first appeared in 211.Bx 4.4 . 212It first worked in 213.Fx Ns -(fill this in) . |