views:

138

answers:

2

I need to record in some kind of file, the specific time at which blocks are written to in a filesystem, over a number of physical disks (RAID). I intend to do this by periodically by interrogating the writing device to find out which block it is writing to at that specific time.

At some later date it will be necessary to locate and read from the disks the data which was written during a specific time period, by specifying the number of blocks.

The data throughput could be high and the block size could be small.
So my questions are:
1) how do I accurately determine the time at which a specific block was written to...
2) what is the best way to store this information.. should I just write it out to a binary file.. or text file?
3) Is some kind of C++ streamwriter sufficient for maintaining this index file?

+2  A: 

If you don't mention an OS, nobody has a chance of being able to really help. It sounds like you need to write a device driver that acts as a virtual disk, which would mean that the basic premise of being able to use standard library functions for I/O is shot.

A: 

OK, thanks for that, I think I need to think a bit more about this. :)

Krakkos