From owner-freebsd-questions@FreeBSD.ORG Mon Feb 18 08:14:49 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 561F516A417 for ; Mon, 18 Feb 2008 08:14:49 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 7A9E013C447 for ; Mon, 18 Feb 2008 08:14:37 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.13.8/8.13.8) with ESMTP id m1I8DHpr001571; Mon, 18 Feb 2008 09:13:17 +0100 (CET) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.13.8/8.13.8/Submit) with ESMTP id m1I8D3d0001564; Mon, 18 Feb 2008 09:13:07 +0100 (CET) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 18 Feb 2008 09:13:03 +0100 (CET) From: Wojciech Puchar To: perryh@pluto.rain.com In-Reply-To: <47b92e38.PPjllqvtMAVuJE1V%perryh@pluto.rain.com> Message-ID: <20080218091206.M1189@wojtek.tensor.gdynia.pl> References: <47b92e38.PPjllqvtMAVuJE1V%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-questions@freebsd.org Subject: Re: Mounting a read-only md FS as read-only X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 08:14:49 -0000 > want to change the image, just examine it, I specified -o readonly > to mdconfig and the equivalent to mount. Is there some reason why > this should not work? The backing file, and the mountpoint, do > exist. does mount_ext2fs support readonly at all? try -o readonly before -f filename in mdconfig but i don't know if it does matter. > > # ls -ld [filename] > -rw-r--r-- 1 perryh perryh 104857600 Mar 16 2007 [filename] > # mdconfig -a -t vnode -f [filename] -o readonly > md0 > # ls -ld /dev/md0 /[mountpoint] > crw-r----- 1 root operator 1, 15 Nov 24 21:17 /dev/md0 > drwxr-xr-x 2 perryh perryh 512 Feb 17 21:57 /[mountpoint] > # mount -r -o noexec -t ext2fs /dev/md0 /[mountpoint] > mount_ext2fs: /dev/md0: Read-only file system > # mount -o ro,noexec -t ext2fs /dev/md0 /[mountpoint] > mount_ext2fs: /dev/md0: Read-only file system > # /sbin/mount_ext2fs -o ro,noexec /dev/md0 /[mountpoint] > mount_ext2fs: /dev/md0: Read-only file system > # mdconfig -l -u 0 > md0 vnode 100M /[mountpoint] > # uname -a > FreeBSD fbsd61 6.1-RELEASE FreeBSD 6.1-RELEASE #30: Mon Jan 1 23:01:34 PST 2007 perryh@fbsd61:/usr/src/sys/i386/compile/GENERIC i386 > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > >