1CHUNKFS(1) CHUNKFS(1)
2
3
4
6 chunkfs - mount arbitrary files via FUSE as a tree of chunk files
7
9 chunkfs { -h | -V | <chunk size> <image file> <mount point> }
10
11 unchunkfs { -h | -V | <chunk dir> <mount point> }
12
14 ChunkFS allows you to mount an arbitrary file or block device as a
15 directory tree of read-only files that each represent a chunk of user-
16 specified size of the mounted file.
17
18 A possible use for this is space-efficient incremental backups of
19 encrypted filesystem images using rsync's --link-dest option. That way
20 you can create incremental backups from the ChunkFS-mounted image where
21 any chunk that hasn't changed since the last backup will be a hard link
22 to the corresponding chunk from the previous backup. In order to
23 restore a revision, you simply have to concatenate all the chunks from
24 the backup. Or you could use UnCunkFS to mount a ChunkFS tree (or a
25 copy of one) as an image file.
26
27 <chunk size> is the size of the chunks into which <image file> is to be
28 divided when mounted at <mount point>, specified in bytes. If the
29 mounted file's size is not a multiple of the <chunk size>, the last
30 file in the tree simply will be smaller than the chunk size.
31
32 In case of UnChunkFS, <chunk dir> is the directory that contains a
33 ChunkFS tree (or a copy of one) that is to be mounted at <mount point>.
34
35 The chunk files of a ChunkFS are always at the eightth level of the
36 mounted directory tree, if there are any (that is: if the image file is
37 at least one byte in size). The concatenation of the path components
38 from the root of the filesystem to a file gives you the hexadecimal
39 representation of the number of the chunk that can be found in that
40 respective file. This layout allows you to even incrementally backup
41 files that have changed in size, as long as you do mount the ChunkFS
42 with the same chunk size.
43
44 Note, however, that ChunkFS does not cope well with image files that
45 change their size while they are mounted. It shouldn't crash, but you
46 will not be able to access any newly-allocated space and you will
47 immediately hit end of file, or maybe even get other errors, if you try
48 to read from a chunk file for which there is no data in the image file
49 anymore.
50
51 With UnChunkFS, you will always have exactly one file below the mount
52 point, named image.
53
54 The permissions of the files within the ChunkFS are derived from the
55 permissions of the image file. Owner and group are simply inherited.
56 The mode of all objects is the same as that of the image file, except
57 that any executable bits are cleared for files, while directories have
58 their executable bits set for exactly those entities (owner, group,
59 others) that also have read permission. In the same way, UnChunkFS
60 derives ownership and permissions for its root directory and the image
61 file from the root of the mounted ChunkFS tree. But see below for what
62 all these permissions actually effect.
63
65 -h Displays a short usage summary and all the options provided by the
66 FUSE library.
67
68 -V Prints the program version.
69
70 In addition to the options described above, there are quite a few
71 options provided by the FUSE library. For most of those, I don't even
72 know what they do and there doesn't seem to be any documentation. If
73 you run chunkfs with the -h option, you will get a list of those
74 options.
75
76 Note that, by default, the permissions described above are used for
77 presentation only, not for actual permission checking. You might want
78 to use -o default_permissions to change that, and maybe -o allow_other
79 to actually allow others to access your ChunkFS mount.
80
82 chunkfs 1048576 supersecretcryptoimage forbackup
83
84 This gives you 1 MiB chunks of supersecretcryptoimage mounted below
85 forbackup.
86
87 unchunkfs forbackup forrestore
88 mount -o loop forrestore/image gimmebackmydata
89
90 When it's time for a restore.
91
92 chunkfs 1 /dev/hda myharddiskinpieces
93
94 You always wanted to examine every byte on your hard disk individually,
95 right?
96
97 If you want to use (Un)ChunkFS with block device snapshots, you might
98 anticipate the problem that the snapshot of a journaling filesystem
99 usually will need a log replay before it can be mounted--but you can't
100 do any log replay on a read-only image like that provided by UnChunkFS,
101 of course. As a possible solution, there is a writeoverlay.sh script
102 included in this package's documentation directory that allows you to
103 create from an arbitrary read-only block device a writable one by the
104 means of the Linux device mapper's snapshot facility. Any writes to
105 that device will be redirected to a temporary file. Make sure you read
106 at the very least the comments within the script before you use it, as
107 I wouldn't consider it production quality.
108
110 chunksync(1)
111
112 <http://chunkfs.florz.de/>
113
115 Copyright (C) 2007-2010 Florian Zumbiehl <florz@florz.de>
116
117 This program is free software; you can redistribute it and/or modify it
118 under the terms of the GNU General Public License as published by the
119 Free Software Foundation; either version 2 of the License, or (at your
120 option) any later version.
121
122 This program is distributed in the hope that it will be useful, but
123 WITHOUT ANY WARRANTY; without even the implied warranty of
124 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
125 General Public License for more details.
126
127 You should have received a copy of the GNU General Public License along
128 with this program; if not, write to the Free Software Foundation, Inc.,
129 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
130
131
132
133ChunkFS 0.8 2022-01-19 CHUNKFS(1)