LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-12-2008, 07:31 PM   #1
duyuyang
Member
 
Registered: Mar 2008
Posts: 56

Rep: Reputation: 16
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
 
Old 12-12-2008, 08:05 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,390

Rep: Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191
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.
 
Old 12-13-2008, 06:50 AM   #3
duyuyang
Member
 
Registered: Mar 2008
Posts: 56

Original Poster
Rep: Reputation: 16
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
 
Old 12-13-2008, 06:50 AM   #4
duyuyang
Member
 
Registered: Mar 2008
Posts: 56

Original Poster
Rep: Reputation: 16
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
 
Old 12-13-2008, 02:03 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,390

Rep: Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191
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.
 
Old 12-14-2008, 07:01 PM   #6
duyuyang
Member
 
Registered: Mar 2008
Posts: 56

Original Poster
Rep: Reputation: 16
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
 
Old 12-19-2008, 07:50 PM   #7
duyuyang
Member
 
Registered: Mar 2008
Posts: 56

Original Poster
Rep: Reputation: 16
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Download pcap traces trek413 Linux - Networking 2 06-03-2008 02:57 PM
an analogy for my Windows partition's performance newbiesforever General 12 11-21-2006 02:28 AM
Mousepointer leaves traces V!NCENT Linux - Software 3 12-31-2005 04:56 AM
Excessive downloads with no traces rblampain Linux - Security 1 03-02-2005 08:10 AM
Reading another partition's files using linux?? katana Linux - General 2 06-09-2001 02:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration