3 nbdkit-ext2-plugin - read and write files inside ext2, ext3 or
8 nbdkit ext2 disk=fs.img file=/disks/disk.raw
12 C<nbdkit-ext2-plugin> is an nbdkit plugin which can read and
13 write files inside ext2, ext3 or ext4 filesystem images.
15 Suppose you have an ext2/3/4 filesystem image called F<fs.img>
16 which contains inside itself a file called F<disk.raw>
17 inside a directory on the filesystem called F</disks>, then
18 you could serve that file over NBD using:
20 nbdkit ext2 disk=fs.img file=/disks/disk.raw
22 This plugin can both read and write to the file inside the filesystem.
23 Use the I<-r> flag to force a readonly connection, but note this does
24 I<not> guarantee that no writes are made to the filesystem. In
25 particular we may have to replay the ext3 journal in order to open a
26 filesystem even read-only.
28 The plugin does I<not> support multiple parallel connections, because
29 there is a risk of corrupting the filesystem (as if the filesystem was
30 mounted by multiple machines). If a second connection is made to
31 nbdkit, it will block until the first connection closes.
33 The plugin is implemented using the ext2fs library which is provided
34 in most Linux distros, and also available as part of the e2fsprogs
37 L<nbdkit-guestfs-plugin(1)> is a more generic plugin which can read
38 files from all kinds of different filesystem types, even if they are
39 partitioned or use logical volumes. It uses libguestfs instead of
46 =item B<disk=>FILENAME
48 The ext2, ext3 or ext4 filesystem, a file on the host.
50 You could also use a device name here if the filesystem is located on
51 a device. Be careful that the filesystem is not being accessed in
52 parallel by another program and is not mounted, as that will almost
53 certainly result in disk corruption in the filesystem.
55 The plugin expects a raw filesystem. If the file/device is
56 partitioned, use L<nbdkit-partition-filter(1)>.
60 The full path of the file within the filesystem that will be exposed
61 over NBD. The path must be absolute (starts with C</>).
69 =item F<$plugindir/nbdkit-ext2-plugin.so>
73 Use C<nbdkit --dump-config> to find the location of C<$plugindir>.
79 C<nbdkit-ext2-plugin> first appeared in nbdkit 1.4.
85 L<nbdkit-partition-filter(1)>,
86 L<nbdkit-guestfs-plugin(1)>,
87 L<http://e2fsprogs.sourceforge.net/>,
96 Copyright (C) 2018 Red Hat Inc.