From owner-freebsd-geom@FreeBSD.ORG Thu Jul 10 12:55:15 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1FB21065685 for ; Thu, 10 Jul 2008 12:55:15 +0000 (UTC) (envelope-from tapan.list@gmail.com) Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.238]) by mx1.freebsd.org (Postfix) with ESMTP id 8F95B8FC24 for ; Thu, 10 Jul 2008 12:55:15 +0000 (UTC) (envelope-from tapan.list@gmail.com) Received: by qb-out-0506.google.com with SMTP id q12so7304081qba.13 for ; Thu, 10 Jul 2008 05:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=ifFIrK+xYIr3NW44SXjlVofPOvU7LXZHhqiYNfgwbjg=; b=Lt1mFdU1EC1lqlNeQSN17VpN8fWXtqOYowcnhvBO/3alGOexEMe6r0OusqiV0+1ZpS Y8IdSMFRyW49EXzS1EOOCDcpEWCcHvycl6BQ9MniXbagbJebYti5pYV70bnbvbkyHEMv RyofBrARq8xlm8l2kQqNA9hO1VPYeZAhb6cUY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=Vo61JEVLj4E8aue0MnR6G0rVdMQmWzPDCbBruDUWFyzd9FUX1iD43FUZRgNwYgp35f xUlD9mWpbl9uvdYwmePN2rYk5lL2EBXtgYRSi0IELcWIF2SM3Xi1c2E6wTOQJYoHigkS RQxdfL26deA/oOn9u+P3mcOcHf+fAhO1vs96A= Received: by 10.103.40.5 with SMTP id s5mr4800545muj.133.1215693686508; Thu, 10 Jul 2008 05:41:26 -0700 (PDT) Received: by 10.103.227.19 with HTTP; Thu, 10 Jul 2008 05:41:25 -0700 (PDT) Message-ID: <482257ad0807100541s2d2c3d1eo6cd57c3a1bc338d1@mail.gmail.com> Date: Thu, 10 Jul 2008 18:11:25 +0530 From: "Tapan Chaudhari" To: freebsd-geom@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Can GEOM be used to intercept the I/o calls to an existing mounted device? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2008 12:55:15 -0000 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.