From: Richard W.M. Jones Date: Fri, 12 Feb 2021 14:02:59 +0000 (+0000) Subject: Slides 3000. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=a8b5e02815a0f727125cdb8ad1e9dc4b73b41f7a;p=libguestfs-talks.git Slides 3000. --- diff --git a/2021-pipelines/3000-disk-images-1.svg b/2021-pipelines/3000-disk-images-1.svg new file mode 100644 index 0000000..417f23f --- /dev/null +++ b/2021-pipelines/3000-disk-images-1.svg @@ -0,0 +1,293 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + fedora-33.img + + + + /boot + root + /home + + + + + data + deleted + + + + + + + diff --git a/2021-pipelines/3000-disk-images.html b/2021-pipelines/3000-disk-images.html new file mode 100644 index 0000000..c2ffaf0 --- /dev/null +++ b/2021-pipelines/3000-disk-images.html @@ -0,0 +1,8 @@ + + + + +

Disk images

+ + diff --git a/2021-pipelines/3100-disk-metadata-1.svg b/2021-pipelines/3100-disk-metadata-1.svg new file mode 100644 index 0000000..491c7dc --- /dev/null +++ b/2021-pipelines/3100-disk-metadata-1.svg @@ -0,0 +1,302 @@ + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + data + deleted + + + + + allocated + hole + + + + diff --git a/2021-pipelines/3100-disk-metadata.html b/2021-pipelines/3100-disk-metadata.html new file mode 100644 index 0000000..37c478d --- /dev/null +++ b/2021-pipelines/3100-disk-metadata.html @@ -0,0 +1,15 @@ + + + + +

Disk metadata

+ + + +
+ls -lsh
+filefrag -v
+qemu-img map
+nbdinfo --map
+
diff --git a/2021-pipelines/3200-sparsification-1.svg b/2021-pipelines/3200-sparsification-1.svg new file mode 100644 index 0000000..2987553 --- /dev/null +++ b/2021-pipelines/3200-sparsification-1.svg @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + data + deleted + + + + + allocated + hole + allocated + + + + + data + deleted + + + + allocated + hole + + "sparsification" + + diff --git a/2021-pipelines/3200-sparsification.html b/2021-pipelines/3200-sparsification.html new file mode 100644 index 0000000..c638bb8 --- /dev/null +++ b/2021-pipelines/3200-sparsification.html @@ -0,0 +1,17 @@ + + + + +

Sparsifying disk images

+ + + +
+
+ +
+ioctl(fd, FITRIM, ...)
+fstrim
+virt-sparsify --in-place
+
diff --git a/2021-pipelines/3300-sparsification-snapshot.html b/2021-pipelines/3300-sparsification-snapshot.html new file mode 100644 index 0000000..1e59edf --- /dev/null +++ b/2021-pipelines/3300-sparsification-snapshot.html @@ -0,0 +1,13 @@ + + + + +

Sparsifying into a snapshot

+ +
+┌───────────────┐ssh ┌────────────┐
+│ fedora-33.img │───▶│ qcow2 file │◀─── virt-sparsify --in-place
+└───────────────┘    └────────────┘                           ┌───────────┐
+                                   ───▶ qemu-img convert ────▶│ local.img │
+                                                              └───────────┘
+
diff --git a/2021-pipelines/3400-sparsification.term b/2021-pipelines/3400-sparsification.term new file mode 100755 index 0000000..8d8a672 --- /dev/null +++ b/2021-pipelines/3400-sparsification.term @@ -0,0 +1,13 @@ +#!/bin/bash - + +source functions + +# Title. +export title="Sparsification + copying" + +# History. +remember 'qemu-img create -f qcow2 -F raw -b ssh://kool/mnt/scratch/pipes/fedora-33.img snapshot.qcow2' +remember 'virt-sparsify --in-place snapshot.qcow2' +remember 'qemu-img convert -f qcow2 snapshot.qcow2 -O raw local.img -p' + +terminal diff --git a/2021-pipelines/notes.txt b/2021-pipelines/notes.txt index fbdc5ad..447e397 100644 --- a/2021-pipelines/notes.txt +++ b/2021-pipelines/notes.txt @@ -118,7 +118,7 @@ long time accumulate lots of deleted files and other stuff that isn't needed by the operating system but also isn't zeroes. -Meta-data +Disk metadata ---------------------------------------------------------------------- DIAGRAM: diff --git a/2021-pipelines/run b/2021-pipelines/run index b86d6b3..c7a1959 100755 --- a/2021-pipelines/run +++ b/2021-pipelines/run @@ -12,6 +12,12 @@ unset http_proxy unset https_proxy unset ftp_proxy +# Don't use libvirt. +export LIBGUESTFS_BACKEND=direct + +# Pre-cache libguestfs appliance. +guestfish -a /dev/null run & + # Clean up after previous run. talkdir=$PWD ./restore