completed overlay option
[rrq/fusefile.git] / fusefile.8
1 .mso www.tmac
2 .TH fusefile 8
3 .SH NAME
4 fusefile \- FUSE file mount for combining file fragments
5
6 .SH SYNOPSIS
7 .B fusefile \fR[\fIfuse-opts\fR] \fBmountpoint\fR \fR[\fIoverlay\fR] \fIfilename/from-to\fR ...
8
9 .SH DESCRIPTION
10
11 \fBfusefile\fR is FUSE file mount that presents a series of fragments
12 of other files as a contiguous concatenation. It bind mounts a driver
13 on top of the file mountpoint to present the nominated file fragments
14 as a single, contiguous file. It accepts over-writing on the fused
15 file which gets distributed accordingly to the fragments, but cannot
16 change size.
17
18 An optional overlay file is declared with the "-overlay:filename"
19 argument between the mount point and the fragments. This file is then
20 set up as an overlay for capturing writes to the fused file. The
21 overlay file will contain the written fused file regions, followed by
22 meta data to distinguish between written content and "holes" (where
23 content comes from the fused fragments).
24
25 The fragment arguments include the filename of a source file, and
26 optionally start and end byte positions. All in all there five
27 variations:
28
29 .TP
30 \fIfilename\fR or \fIfilename/\fR
31 include all of the file. A pathname that includes "/" must be ended
32 with an extra "/" since that last "/" separates the filename from the
33 range detail.
34
35 .TP
36 \fIfilename/start:end\fR
37 include the range from the given start to end. Either "start" or "end"
38 or both may be omitted, to mean the beginning and end of the file
39 respectively. If "start" or "end" are less than 0 then it means
40 relative to the end of the file.
41
42 .TP
43 \fIfilename/start+length\fR
44 include "length" bytes from the given start. A negative "start" means
45 relative to the end of the file. If "length" is negative or omitted it
46 means that position relative to the end.
47
48 .TP
49 \fIfilename/start\fR
50 include bytes from the given start. This is the same as "/start+"
51
52 .P
53 Note that a negative start position is clipped to 0 and a too large
54 end position  is clipped to the end of the file.
55
56 .P
57 Charater devices are treated as being of any given finite size, but
58 have size 0 by default. For example, "/dev/zero/:100" means a fragment
59 of 100 NUL bytes.
60
61 .SH EXAMPLES
62
63 Insert file "y" into file "x" at position 1200:
64 .RS
65 \fB$ fusefile -ononempty x x/:1200 y x/1200:\fR
66 .RE
67 The bind mount shadows the original file "x", and presents the
68 fused file instead.
69
70 Make fused file y be a swap of the beginning and end of file "x", at
71 position 2442:
72 .RS
73 \fB$ fusefile y x/2442: x/:2442\fR
74 .RE
75
76 Protect raw disk image file with an overlay:
77 .RS
78 \fB# fusefile -ononempty disk.raw -overlay:today disk.raw
79 .RE
80 By this set up, the overlay file, "today", will protect the disk image
81 file, "disk.raw" from changes, and also override the pathname
82 "disk.raw" to be the fused file.
83
84 .SH NOTES
85
86 Note that \fBfusefile\fR opens the nominated source file or files
87 before bind mounting. With the fuse option \fI-ononempty\fR it will
88 bind over an non-empty file, which may be useful. The source file
89 descriptors remain open, but the source fragments are not recomputed.
90 If a source file changes the fused file will present the new content.
91 If a source is reduced in size, access will be inconsistent.
92
93 If the mountpoint file doesn't exist, then \fBfusefile\fR creates it,
94 and removes it when unmounted.
95
96 Using an overlay file makes the fused file writable regardless of the
97 fused fragemnts with the overlay file containing any changes to the
98 original. The overlay file is reusable for subsequent fusing of the
99 same fragments for reconstructing a prior session.
100
101 .SH AUTHOR
102
103 Ralph Rönnquist <ralph.ronnquist@gmail.com>