See previous posting for more information on visualizing block device operations.
I’ve added the ability to turn tracing on and off, so now single libguestfs operations can be visualized at the block device level.
Taking an empty ext2 filesystem in a single disk partition, we trace what happens when we write a single file containing less than a block of content. The command is:
$ guestfish -a test1.img -m /dev/sda1 \
debug qtrace "/dev/vda on" : \
write /hello "hello, world." : \
debug qtrace "/dev/vda off"
Note that tracing is switched on and off around the write command. Those debug qtrace commands implicitly sync and drop caches.
This is what the trace looks like. Click on the image to see it at full size:


Pingback: Visualizing #3: write a file on an ext4 filesystem « Richard WM Jones