1 This directory contains some experimental work for capturing traces of
2 block device operations while filesystem operations are performed.
4 You can trace any operation that libguestfs supports, including
5 partitioning, mkfs, LVM operations, and filesystem operations. You
6 can enable and disable tracing in order to capture single operations
7 such as a single write, or groups of operations. You can examine the
8 traces by hand (as text files) or turn them into graphical
11 The *.qtr files are qemu trace files, produced using the unofficial
12 qemu patch in the current directory.
14 - guestfish-N-fs-10M.qtr
16 The command 'guestfish -N fs:ext2:10M' before we modified the
17 part-disk API to align the partition to 64 sectors.
19 - guestfish-N-fs-10M-aligned-part-disk.qtr
21 The command 'guestfish -N fs:ext2:10M' after we modified the
22 part-disk API to align the partition to 64 sectors.
24 - guestfish-add-mount.qtr
26 $ guestfish -a test1.img -m /dev/sda1
27 where test1.img was created by the previous command.
29 - guestfish-write-hello.qtr
31 $ guestfish -a test1.img -m /dev/sda1 \
32 debug qtrace "/dev/vda on" : \
33 write /hello "hello, world." : \
34 debug qtrace "/dev/vda off"
35 where test1.img was created by the command above.
37 This is just the creation of a new file with a small amount of content.
39 Within this trace file, the qtrace on/off commands appear as patterns
40 of reads. For on: 2, 21, 15, 2. For off: 2, 15, 21, 2.
42 - guestfish-lv-ext4-4k.qtr
45 alloc test1.img 40M : \
47 part-disk /dev/vda mbr : \
49 vgcreate VG /dev/vda : \
51 mkfs-b ext4 4096 /dev/VG/LV
54 * an ext4 filesystem, so it has a journal and extents
55 * 4K block size, so we expect writes to be aligned
56 * located inside an LV, so more realistic
58 - guestfish-lv-ext4-4k-write-hello.qtr
60 $ guestfish -a test1.img -m /dev/VG/LV \
61 debug qtrace "/dev/vda on" : \
62 write /hello "hello, world." : \
63 debug qtrace "/dev/vda off"
64 where test1.img was created by the previous command.