lkml.org 
[lkml]   [2003]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectVirtual WORM device
Date
> There is a project waiting for someone who wants
> to contribute. It only slightly involves the kernel,
> but is quite useful.

> Somebody should then modify `rm` and the kernel unlink
> to `mv' files to the dumpster directory on the
> file-system, instead of really deleting them.

Another possibility would be to create a meta-device that works like a
cross between the loopback device, and WORM device, I.E. start at the
begining, and allocate sectors sequentially. Whenever a sector would
normally be overwritten, a new one is allocated instead. This way,
you could always access the filesystem as it was at any mount in time.

Hypothetically, you could do something like:

mkmetawormdevice /dev/mw0 /dev/hda2

to create a device /dev/mw0, which uses /dev/hda2 for physical
storage.

Then:

write foo to sector 0 of /dev/mw0 - actually writes foo to sector 0 of
/dev/hda2

write bar to sector 1 of /dev/mw0 - actually writes foo to sector 1 of
/dev/hda2

write foobar to sector 0 of /dev/mw0 - actually writes foobar to
sector 2 of /dev/hda2, and notes the date and time that the virtual
'overwrite' happened.

Due to the sequential nature of the writes, the data could even be
compressed quite easily.

John.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.072 / U:1.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site