[Libguestfs] e2fsprogs concurrency questions

Richard W.M. Jones rjones at redhat.com
Mon Sep 20 16:33:26 UTC 2021


On Sun, Sep 19, 2021 at 04:39:01AM -0600, Andreas Dilger wrote:
> What I don't understand here is why not just use a network
> filesystem that is explicitly designed for this task (eg. NFS or
> Ganesha on to of ext4)?

nbdkit-ext2-filter is very niche, but it's quite different from
anything NFS can do.  For example:

  $ nbdkit --filter=ext2 --filter=xz \
    	 curl http://oirase.annexia.org/tmp/disk.img.xz \
  	      ext2file=/disk/fedora-33.img

  $ nbdinfo nbd://localhost
  protocol: newstyle-fixed without TLS
  export="":
  	export-size: 6442450944
  	content: DOS/MBR boot sector
  	uri: nbd://localhost:10809/
  	contexts:
  		base:allocation
  		is_rotational: false
  		is_read_only: true
  		can_cache: true
  		can_df: true
  		can_fast_zero: false
  		can_flush: true
  		can_fua: false
  		can_multi_conn: false
  		can_trim: false
		can_zero: false

  $ guestfish --ro --format=raw -a nbd://localhost -i
  [...]
  Operating system: Fedora 33 (Thirty Three)
  /dev/sda3 mounted on /
  /dev/sda2 mounted on /boot

What we're doing here is exporting a compressed ext4 image over HTTP
and then accessing a VM image inside it.

(This is a contrived example but it's similar to something called the
Containerized Data Importer in Kubernetes.)

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list