[arch-releng] archiso's (?) /dev/dm-* and /dev/loop devices and how to ignore them in AIF

Thomas Bächler thomas at archlinux.org
Fri Dec 30 08:32:21 EST 2011


Am 27.12.2011 19:08, schrieb Dieter Plaetinck:
> /dev/dm-0
> /dev/dm-1
> /dev/dm-2
> /dev/loop0
> /dev/loop1
> /dev/loop100
> /dev/loop101
> /dev/loop102
> /dev/loop103
> /dev/loop104
> /dev/loop105
> /dev/loop106
> /dev/loop107
> /dev/loop108
> /dev/loop109
> /dev/loop110
> /dev/loop2
> /dev/loop3
> /dev/loop4
> /dev/loop5
> /dev/loop6
> /dev/loop7
> 
> are these all created by archiso? what exactly are they for?

I'll try to figure this out:

loop0-loop7 are loop devices allocated by default - this happens because
old userspace can't use the new loop-control device and needs
preallocated devices.

The rest (on the image I just booted):

/dev/loop100 is a block device for root-image.fs.sfs (squashfs,
read-only), which is mounted. /dev/loop101 is a block device for the
file root-image.fs, which is a (sparse) ext4 file system image (inside
squashfs, read-only). /dev/loop102 is a block device for the sparse file
/run/cowspace/root-image.cow (which is on tmpfs, read-write). The last
two loop devices are put together into a device mapper snapshot device
(dm-0), which is then mounted as /.

The exact same thing happens for lib-modules.fs.sfs and
usr-share.fs.sfs, creating loop103-loop108, dm-1 and dm-2.

You booted a core image, so you have loop109 and loop110 as well, which
are probably for the pkgs-$ARCH and pkgs-any squashfs.

This block-based unioning/snapshotting is certainly not optimal, but it
is stable and supported by unpatched kernels. We don't have a file-based
solution that fulfills these criteria.

> does anyone know what is the best way to ignore them?
> * some property in /sys/block/<dev>/ ?
> * how about just maintaining a list of exactly all these filenames .. or:
> * how about having archiso maintain a file called /var/aif-blockdevices or something? then aif can read that file and ignore blockdevices based on what it finds there.
> (just don't call it archiso-blockdevices or something, because AIF is supposed to be able to run in several environments)

Maybe not /var, but /run. Another way: use
 udevadm control --property=AIF_IGNORE=1 [...]
This should work :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-releng/attachments/20111230/6fe71b72/attachment.asc>


More information about the arch-releng mailing list