Can GEOM be used to intercept the I/o calls to an existing
mounted device?
Tapan Chaudhari
tapan.list at gmail.com
Fri Jul 11 19:09:05 UTC 2008
Hi,
I got the problem resolved of not getting mails. It was the stupid of me
that changed the settings :-).. I have unchecked the digest.
Did Ivan sent some attachment with the mail? An attachment was scrubbed in
the digest I received. Sorry for the trouble but still, can anyone resend
it?
Expecting some help regarding "interception mechanism" from all of you.
Thanks,
--Tapan.
On Fri, Jul 11, 2008 at 11:59 PM, Tapan Chaudhari <tapan.list at gmail.com>
wrote:
> Hey guys,
> First of all, I was not able to receive your replies to my mail. I
> don't know the reason but I am already subscribed to the list. I got to know
> about your replies from the digest i received today. I have written a mail
> to the mailing list owner describing this problem. Hope this does not happen
> again.
>
>
> Well regarding GEOM as Poul mentioned he has already done this interception
> mechanism in GEOM, Poul can you please help me out by giving some directions
> as to how to move ahead and implement the interceptions of i/o to a
> particular device? I would be really happy to get any help regarding the
> interception mechanism.
>
> Thanks,
> --Tapan.
>
>
> On Thu, Jul 10, 2008 at 7:25 PM, Tapan Chaudhari <tapan.list at gmail.com>
> wrote:
>
>> Thanks Mark, but unmounting will anyways work. But the problem here will
>> be, a new device "/dev/mirror/gm0" and "/dev/mirror/gm0s1" will be created
>> after :-
>>
>> #gmirror label -v -n -b round-robin gm0 /dev/md0
>> #gmirror load
>> #gmirror configure -a gm0
>>
>> and "/dev/md0s1" gets deleted.
>> Now I will have to mount the new device "/dev/mirror/gm0s1" to get my
>> original contents.
>> Can't I do it on the fly while the device is already mounted? I just want
>> that all the calls going to the device "/dev/md0s1" first come to me and
>> then it goes to the original device. In short intercepting the i/o calls. Is
>> there some way I can achieve this?
>>
>> Thanks,
>>
>>
>> On Thu, Jul 10, 2008 at 6:39 PM, Mark Gladman <mark at legios.org> wrote:
>>
>>> On Thursday 10 July 2008 22:41:25 Tapan Chaudhari wrote:
>>> > Hi All,
>>> > I am a newbie to FreeBSD and GEOM. I wanted to intercept the i/o
>>> calls
>>> > going to a particular mounted device by writing some driver.
>>> > I came across geom and thought it might work. I tried to create a new
>>> > device, mount it and then tried using gmirror to mirror the device :-
>>> >
>>> > #dd if=/dev/zero of=file1 bs=1M count=10
>>> > #dd if=/dev/zero of=file2 bs=1M count=10
>>> > #mdconfig -f file1
>>> > #mdconfig -f file2
>>> > #fdisk -B /dev/mirror/md0
>>> > #newfs /dev/mirror/md0s1
>>> > #mkdir /mnt/mirror0
>>> > #mount /dev/mirror/md0s1 /mnt/mirror0/
>>> >
>>> > #gmirror label -v -n -b round-robin gm0 /dev/md0
>>> > gmirror: Can't store metadata on /dev/md0: Operation not permitted.
>>> >
>>> > It gave me this error "gmirror: Can't store metadata on /dev/md0:
>>> Operation
>>> > not permitted."
>>> >
>>> > Am I doing something wrong? Or GEOM does not permit me intercept the
>>> i/o
>>> > calls? If not geom, is there any other mechanism by which I can achieve
>>> it?
>>> >
>>> >
>>> > Thanks,
>>> > --Tapan.
>>> > _______________________________________________
>>> > freebsd-geom at freebsd.org mailing list
>>> > http://lists.freebsd.org/mailman/listinfo/freebsd-geom
>>> > To unsubscribe, send any mail to "freebsd-geom-unsubscribe at freebsd.org
>>> "
>>>
>>> Hey,
>>>
>>> You're attempting to set up gmirror on a mounted device.
>>> Unmount /dev/mirror/md0s1 then retry the gmirror command and it should
>>> work.
>>>
>>> Cheers!
>>> Mark
>>>
>>
>>
>
More information about the freebsd-geom
mailing list