Can GEOM be used to intercept the I/o calls to an existing
mounted device?
Poul-Henning Kamp
phk at phk.freebsd.dk
Thu Jul 10 22:02:37 UTC 2008
In message <g55nc9$art$1 at ger.gmane.org>, Ivan Voras writes:
>> Can't I do it on the fly while the device is already mounted? I just wa=
>nt
>> that all the calls going to the device "/dev/md0s1" first come to me an=
>d
>> then it goes to the original device. In short intercepting the i/o call=
>s. Is
>> there some way I can achieve this?
>
>It would be very nice if GEOM could do this, since it would then=20
>trivially allow things like data replication, log/rollback, etc. but it=20
>doesn't work like that. In short, no, you cannot listen to IO between=20
>providers.
>
>(not that it isn't possible to do at all, it just isn't implemented).
The GEOM design allows for insertions, where a 1:1 GEOM class is
inserted in an existing provider-consumer connection.
The traditional example was:
insert mirror module
add disk to mirror
replicate
drop original disk from mirror
remove mirror module.
I may still have the code that can do this in a src tree somewhere,
but it never got to the surface of my TODO list.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-geom
mailing list