editorial
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Tue, 9 Aug 2022 13:27:51 +0000 (23:27 +1000)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Tue, 9 Aug 2022 13:27:51 +0000 (23:27 +1000)
README.adoc
fusefile.8

index 500e81bb528e3abffbff7e2c968a738ec75b5fc4..efd47b29e2abdf2ca069ced8eaa028496b30744f 100644 (file)
@@ -1,5 +1,7 @@
 fusefile
 ========
 fusefile
 ========
+:colon: :
+:noop:
 
 This project implements a "fuse" device to mount as a single file that
 is a concatenation of fragments of one or more files. The fused file
 
 This project implements a "fuse" device to mount as a single file that
 is a concatenation of fragments of one or more files. The fused file
@@ -11,7 +13,7 @@ FUSE file mount for combining file fragments.
 == SYNOPSIS
 
 ====
 == SYNOPSIS
 
 ====
-*fusefile* [ _fuse options_ ] *mountpoint*  +_filename_/from:to+ ...
+*fusefile* [ _fuse options_ ] *mountpoint*  [ _overlay_ ] +_filename_/from:to+ ...
 ====
 
 ## DESCRIPTION
 ====
 
 ## DESCRIPTION
@@ -19,8 +21,18 @@ FUSE file mount for combining file fragments.
 *fusefile* is FUSE file mount that presents a series of fragments of
 other files as a contiguous concatenation. It bind mounts a driver on
 top of the file mountpoint to present the nominated file fragments as
 *fusefile* is FUSE file mount that presents a series of fragments of
 other files as a contiguous concatenation. It bind mounts a driver on
 top of the file mountpoint to present the nominated file fragments as
-a single, contiguous file.
-
+a single, contiguous file. single, contiguous file. It accepts
+over-writing on the fused file which gets distributed accordingly to
+the fragments, but cannot change size.
+
+An optional overlay file is declared with an
+**-overlay:**__filename__ argument between the mount point and
+the fragments. This file is then set up as an overlay for capturing
+writes to the fused file. The overlay file will contain the written
+fused file regions, followed by meta data to distinguish between
+written content and "holes" (where content comes from the fused
+fragments).
+       
 The fragment arguments include the filename of a source file, and
 optionally start and end byte positions. All in all there five
 variations:
 The fragment arguments include the filename of a source file, and
 optionally start and end byte positions. All in all there five
 variations:
@@ -62,6 +74,13 @@ fused file instead.
          insert.fat/0:$(( 409600*512 )) \
          disk.raw/$(( (2099200+409600)*512 )):
 
          insert.fat/0:$(( 409600*512 )) \
          disk.raw/$(( (2099200+409600)*512 )):
 
+.Protect raw disk image file with an overlay:
+    $ fusefile -ononempty disk.raw -overlay:today disk.raw
+
+By that set up, the overlay file, "today", will protect the disk image
+file, "disk.raw" from changes, and also override the pathname
+"disk.raw" to be the fused file.
+
 
 ## NOTES
 
 
 ## NOTES
 
@@ -72,11 +91,15 @@ remain open, but the source fragments are not recomputed. If a source
 file changes or reduces in size "behind" the fused file, then anything
 may happen.
 
 file changes or reduces in size "behind" the fused file, then anything
 may happen.
 
-If the mountpoint file doesn't exist, then **fusefile** creates it and
-removes it when unmounted.
+If the mountpoint file doesn't exist, then **fusefile** creates it.
+
+Unmounting is done with "**fusermount -u** __mountpoint__" as usual.
 
 
-Unmounting is done with "fusermount -u __fused file__" as usual.
+Using an overlay file makes the fused file writable regardless of the
+fused fragments with the overlay file containing any changes to the
+original. The overlay file is reusable for subsequent fusing of the
+same fragments for reconstructing a prior session with changes.
 
 ## AUTHOR
 
 
 ## AUTHOR
 
-Ralph Rönnquist <ralph.ronnquist@gmail.com> 
+Ralph Rönnquist <ralph.ronnquist@gmail.com>.
index 183a362bce8c42bff4b27764ba01a4930625b37e..f9ca25db611e0a89d1ef3ef2d4d4cf07abd1d316 100644 (file)
@@ -15,12 +15,12 @@ as a single, contiguous file. It accepts over-writing on the fused
 file which gets distributed accordingly to the fragments, but cannot
 change size.
 
 file which gets distributed accordingly to the fragments, but cannot
 change size.
 
-An optional overlay file is declared with the "-overlay:filename"
-argument between the mount point and the fragments. This file is then
-set up as an overlay for capturing writes to the fused file. The
-overlay file will contain the written fused file regions, followed by
-meta data to distinguish between written content and "holes" (where
-content comes from the fused fragments).
+An optional overlay file is declared with an
+\fB-overlay:\fIfilename\fR argument between the mount point and the
+fragments. This file is then set up as an overlay for capturing writes
+to the fused file. The overlay file will contain the written fused
+file regions, followed by meta data to distinguish between written
+content and "holes" (where content comes from the fused fragments).
 
 The fragment arguments include the filename of a source file, and
 optionally start and end byte positions. All in all there five
 
 The fragment arguments include the filename of a source file, and
 optionally start and end byte positions. All in all there five
@@ -73,11 +73,31 @@ position 2442:
 \fB$ fusefile y x/2442: x/:2442\fR
 .RE
 
 \fB$ fusefile y x/2442: x/:2442\fR
 .RE
 
+Replace a partition in an image file with a different file
+.RS
+# Check the partition table
+.br
+\fB$ partx -oNR,START,SECTORS disk.raw\fR
+    NR   START  SECTORS
+     1    2048  2097152
+     2 2099200   409600
+     3 2508800 14268383
+.br
+# Replace partition 2 of 409600 sectors from 2099200 with
+.br
+# the file "insert.fat" clipped to 409600 sectors.
+.br
+\fB$ fusefile -ononempty disk.raw \\
+         disk.raw/0:$(( 2099200*512 )) \\
+         insert.fat/0:$(( 409600*512 )) \\
+         disk.raw/$(( (2099200+409600)*512 )):\fR
+.RE
+
 Protect raw disk image file with an overlay:
 .RS
 Protect raw disk image file with an overlay:
 .RS
-\fB# fusefile -ononempty disk.raw -overlay:today disk.raw
+\fB$ fusefile -ononempty disk.raw -overlay:today disk.raw\fR
 .RE
 .RE
-By this set up, the overlay file, "today", will protect the disk image
+By that set up, the overlay file, "today", will protect the disk image
 file, "disk.raw" from changes, and also override the pathname
 "disk.raw" to be the fused file.
 
 file, "disk.raw" from changes, and also override the pathname
 "disk.raw" to be the fused file.
 
@@ -90,14 +110,17 @@ descriptors remain open, but the source fragments are not recomputed.
 If a source file changes the fused file will present the new content.
 If a source is reduced in size, access will be inconsistent.
 
 If a source file changes the fused file will present the new content.
 If a source is reduced in size, access will be inconsistent.
 
-If the mountpoint file doesn't exist, then \fBfusefile\fR creates it,
-and removes it when unmounted.
+If the mountpoint file doesn't exist, then \fBfusefile\fR creates it.
+
+Unmounting is done with "\fBfusermount -u\fR \fImountpoint\fR" as
+usual.
 
 Using an overlay file makes the fused file writable regardless of the
 
 Using an overlay file makes the fused file writable regardless of the
-fused fragemnts with the overlay file containing any changes to the
+fused fragments with the overlay file containing any changes to the
 original. The overlay file is reusable for subsequent fusing of the
 original. The overlay file is reusable for subsequent fusing of the
-same fragments for reconstructing a prior session.
+same fragments for reconstructing a prior session with changes.
 
 .SH AUTHOR
 
 
 .SH AUTHOR
 
-Ralph Rönnquist <ralph.ronnquist@gmail.com>
+Ralph Rönnquist <ralph.ronnquist@gmail.com>.
+