Skip to content

Instantly share code, notes, and snippets.

@pvalena
Last active June 5, 2020 11:57
Show Gist options
  • Save pvalena/5eac0fa25503f4236881f3efd41fa46e to your computer and use it in GitHub Desktop.
Save pvalena/5eac0fa25503f4236881f3efd41fa46e to your computer and use it in GitHub Desktop.
https://www.redhat.com/archives/libguestfs/2020-May/msg00053.html
https://www.redhat.com/archives/libguestfs/2020-May/msg00074.html
Easy set up is:
# rm -f /tmp/sock
# nbdkit -U /tmp/sock memory 100G
# nbd-client -b 512 -unix /tmp/sock /dev/nbd0 -connections 4
# mkfs.xfs /dev/nbd0
# mount /dev/nbd0 /var/lib/mock
or using http://libguestfs.org/nbdkit-tmpdisk-plugin.1.html:
# rm -f /tmp/sock
# nbdkit -U /tmp/sock tmpdisk size=100G
# nbd-client -b 512 -unix /tmp/sock /dev/nbd0 -connections 1
# mount /dev/nbd0 /var/lib/mock
or (requires bleeding edge nbdkit):
# rm -f /tmp/sock
# lvcreate -L 100G -n tmp /dev/fedora
# nbdkit -U /tmp/socket --filter=fua fuamode=discard file /dev/fedora/tmp
# nbd-client -b 512 -unix /tmp/sock /dev/nbd0 -connections 4
# mkfs.xfs /dev/nbd0
# mount /dev/nbd0 /var/lib/mock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment