2011-08-18 04:25:38

by Ivan Shmakov

[permalink] [raw]
Subject: e2dis example usage pattern

>>>>> Steven Liu <[email protected]> writes:
>>>>> 2011/8/18 Ted Ts'o <[email protected]>:
>>>>> On Thu, Aug 18, 2011 at 01:50:48AM +0700, Ivan Shmakov wrote:

(Crossposting to debian-devel@, as there may be interested
parties there as well.)

[…]

>>> The code I've posted earlier is used in my e2dis [1–3] project.

>>> [1] http://article.gmane.org/gmane.linux.debian.devel.general/164488
>>> [2] http://article.gmane.org/gmane.comp.file-systems.ext4/27269
>>> [3] https://gitorious.org/e2dis/

[…]

> Do you want use mkfs.ext2 to make a small ext2 image file and write
> the image to mmc or some devices?

> when you write it to block device, the tool can modify the sb info
> about the file system size?

[…]

> Is this?

For that purpose, I'd probably use resize2fs(8).

However, my intent is different. Namely, my aim is to provide a
Jigdo-like [4] tool for Ext2+ FS, to be used to reduce the
burden to store and distribute Ext2+ FS images over the
Internet.

The example use for the tool would be as follows:

• one prepares a Debian GNU/Linux “Live” image (to be written to
a removable USB Flash medium, or used in “virtualized”
environments);

• the typical size of such an image is 1 GiB; it's cumbersome to
host, especially if one considers hosting an image for each
architecture (say, IA-32, AMD64, and ARM), suite (say, Debian
stable, testing and unstable) and variant (say, Gnome, KDE,
LXDE; thus totalling to 27 images);

• however, most of the files on such images would bytewise match
those in the .deb packages, which are universally available;

• therefore, one prepares a /mapping/ of the Ext2+ FS image
locations to the files contained within the .deb packages;

• this mapping, along with a compressed data of the parts of the
image for which no corresponding file is known (free blocks,
FS service areas, files generated at the installation time,
etc.) is hosted on an HTTP server for distribution;

• anyone interested in such an image downloads the mapping, the
compressed “dry remainder” of the image, and starts the image
download and reassembly software (yet to be developed);

• this software downloads the necessary .deb files off the
nearby Debian mirror, extracts the files therein, and uses
them to “fill the gaps” within the dry remainder;

• this results in an exact (bytewise) copy of the image
processed earlier with e2dis.

In addition to Jigdo, the operation of the suite is not unlike
that of the software supporting Metalink [5–7].

[4] http://atterer.org/jigdo/
[5] http://en.wikipedia.org/wiki/Metalink
[6] http://www.metalinker.org/
[7] http://www.rfc-editor.org/rfc/rfc5854.txt

--
FSF associate member #7257 Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)