Date: Thu, 10 Jul 2008 22:02:34 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Ivan Voras <ivoras@freebsd.org> Cc: freebsd-geom@freebsd.org Subject: Re: Can GEOM be used to intercept the I/o calls to an existing mounted device? Message-ID: <50705.1215727354@critter.freebsd.dk> In-Reply-To: Your message of "Thu, 10 Jul 2008 21:19:35 %2B0200." <g55nc9$art$1@ger.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <g55nc9$art$1@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@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50705.1215727354>