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