LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   blktrace: how to discern a partition's traces (https://www.linuxquestions.org/questions/linux-software-2/blktrace-how-to-discern-a-partitions-traces-690216/)

duyuyang 12-12-2008 07:31 PM

blktrace: how to discern a partition's traces
 
I am using blktrace to log block device operations.

However, I find that blktrace can not differentiate a given partition's traces. Say, the physical disk has four partitions, btrace one of which obtains all the physical disk's traces. What if I just want to trace a single partition?

Thanks,
Shawn

syg00 12-12-2008 08:05 PM

That's a block layer tool - it doesn't know or care about partitions. If you're paddling around in blktrace, I suspect you're expected to know what I/O is what.
Although it's been a while since I used it in anger - since before it became an "official" released tool.

duyuyang 12-13-2008 06:50 AM

Thanks.

I figured out that blktrace can merely trace a whole physical disk, not an exclusive partition in it. How come blktrace does not make this clear is beyond me.

Actually, what I want is to synchronize a partition's state to a remote secondary backup disk partiton at block level (not file system journaling). I tried to use blktrace as a start point (by modifying it somehow), but since blktrace is not that fit, maybe you could give me some advice on this kind of task.

How I can do a partition's logging clean and clear?

Thanks,
Shawn

duyuyang 12-13-2008 06:50 AM

Thanks.

I figured out that blktrace can merely trace a whole physical disk, not an exclusive partition in it. How come blktrace does not make this clear is beyond me.

Actually, what I want is to synchronize a partition's state to a remote secondary backup disk partiton at block level (not file system journaling). I tried to use blktrace as a start point (by modifying it somehow), but since blktrace is not that fit, maybe you could give me some advice on this kind of task.

How I can do a partition's logging clean and clear?

Thanks,
Shawn

syg00 12-13-2008 02:03 PM

Continuously ?.
You can't.

It'd be meaningless anyway - without access to VFS layer you can't know when a block has been updated. What objection do you have to using the tools provided by the filesystem. Or use LVM to handle the "physical" layer and use snapshot.

duyuyang 12-14-2008 07:01 PM

Thanks.

The partition is indeed a virtual machine disk in dom0 (Xen). So the abstraction should not reside in the VFS layer.
Blktrace can trace block updates, why can't I? Is LVM at the same layer as blktrace?

Cheers,
Shawn

duyuyang 12-19-2008 07:50 PM

I have made some changes to blktrace, and submit a patch to the linux-btrace mailing list.
The patch is to make blktrace able to trace a partition only as specified by the -d option.

FYI.

Cheers,
Shawn


All times are GMT -5. The time now is 01:54 PM.