public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Intercept write to disk
@ 2006-05-26 20:52 Mishael A Sibiryakov
  2006-05-26 21:21 ` Bernd Eckenfels
  0 siblings, 1 reply; 4+ messages in thread
From: Mishael A Sibiryakov @ 2006-05-26 20:52 UTC (permalink / raw)
  To: Linux Kernel

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]


Hi.

Probably i have a stupid question but i can't find adequate solution for
it. I want to intercept write to real disk partition or entire disk
(except of swap partition of course). As i understood vfs and Co i think
that i need to work on level between fs driver and disk driver. But it's
unclean for me. Please tell me is it possible and if possible then say
how or put me to some documentation.

I need a offset from start or CHS value with buffer for save it.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Intercept write to disk
  2006-05-26 20:52 Intercept write to disk Mishael A Sibiryakov
@ 2006-05-26 21:21 ` Bernd Eckenfels
  2006-05-26 21:40   ` Mishael A Sibiryakov
  0 siblings, 1 reply; 4+ messages in thread
From: Bernd Eckenfels @ 2006-05-26 21:21 UTC (permalink / raw)
  To: linux-kernel

Mishael A Sibiryakov <death@junki.org> wrote:
> Probably i have a stupid question but i can't find adequate solution for
> it. I want to intercept write to real disk partition or entire disk
> (except of swap partition of course). As i understood vfs and Co i think
> that i need to work on level between fs driver and disk driver. But it's
> unclean for me. Please tell me is it possible and if possible then say
> how or put me to some documentation.

You can write a devmapper module, or maybe pre-load a shared user mode
library.

Gruss
Bernd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Intercept write to disk
  2006-05-26 21:21 ` Bernd Eckenfels
@ 2006-05-26 21:40   ` Mishael A Sibiryakov
  2006-05-27  7:25     ` Michael Raskin
  0 siblings, 1 reply; 4+ messages in thread
From: Mishael A Sibiryakov @ 2006-05-26 21:40 UTC (permalink / raw)
  To: Bernd Eckenfels; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]

On Fri, 2006-05-26 at 23:21 +0200, Bernd Eckenfels wrote:
> Mishael A Sibiryakov <death@junki.org> wrote:
> > Probably i have a stupid question but i can't find adequate solution for
> > it. I want to intercept write to real disk partition or entire disk
> > (except of swap partition of course). As i understood vfs and Co i think
> > that i need to work on level between fs driver and disk driver. But it's
> > unclean for me. Please tell me is it possible and if possible then say
> > how or put me to some documentation.
> 
> You can write a devmapper module, or maybe pre-load a shared user mode
> library.

Hm, i need a somthing transparent, this tool is for make image of entire
disk/partition on fly. Because tool is get some time for work i need to
store changes between start and end of the process for append it to
image. Probably i thinking in wrong way and i need a something else.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Intercept write to disk
  2006-05-26 21:40   ` Mishael A Sibiryakov
@ 2006-05-27  7:25     ` Michael Raskin
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Raskin @ 2006-05-27  7:25 UTC (permalink / raw)
  To: linux-kernel

Mishael A Sibiryakov wrote:
> Hm, i need a somthing transparent, this tool is for make image of entire
> disk/partition on fly. Because tool is get some time for work i need to
> store changes between start and end of the process for append it to
> image. Probably i thinking in wrong way and i need a something else.

Maybe you want to back up a partition as it was at some moment in the 
past (exactly)? Then you have to make a device-mapper-snapshot out of 
it. You  need to install device-mapper module and userspace tools, and 
make the following:  original device is never used directly; instead a 
snapshot-origin mapping is made of it and is always used. When you need 
snapshot, you create a file (on another partition, of course; maybe even 
in the memory if you are sure you will do everything quickly enough), 
make it a loopback device, and make a snapshot out of snapshot-origin 
you have and this loopback for changes rollback. Maybe it is also better 
  to mount -o remount,sync the device for the time of creating snapshot 
device in order to have less problems with consistency. And remount it 
back when you start copying.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-27  7:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-26 20:52 Intercept write to disk Mishael A Sibiryakov
2006-05-26 21:21 ` Bernd Eckenfels
2006-05-26 21:40   ` Mishael A Sibiryakov
2006-05-27  7:25     ` Michael Raskin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox