From owner-freebsd-fs@FreeBSD.ORG Sun Mar 11 14:57:05 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E4B3816A400 for ; Sun, 11 Mar 2007 14:57:05 +0000 (UTC) (envelope-from s.behrens@kon.de) Received: from mail.kon.de (mail.kon.de [81.88.34.125]) by mx1.freebsd.org (Postfix) with ESMTP id AAEB713C455 for ; Sun, 11 Mar 2007 14:57:05 +0000 (UTC) (envelope-from s.behrens@kon.de) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.kon.de (Postfix) with ESMTP id BDDCD4016CF91 for ; Sun, 11 Mar 2007 15:41:25 +0100 (CET) X-Virus-Scanned: spam-virus-check at kon.de Received: from mail.kon.de ([127.0.0.1]) by localhost (mail.kon.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id eDIG4EvIGBcj for ; Sun, 11 Mar 2007 15:41:24 +0100 (CET) Received: from [192.168.0.4] (dslb-084-060-015-060.pools.arcor-ip.net [84.60.15.60]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kon.de (Postfix) with ESMTP id D4C9D4012EA15 for ; Sun, 11 Mar 2007 15:41:24 +0100 (CET) Message-ID: <45F41514.1090304@kon.de> Date: Sun, 11 Mar 2007 15:41:24 +0100 From: Stan Behrens User-Agent: Thunderbird 1.5.0.10 (X11/20070306) MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: fsck_ufs: cannot alloc %u bytes for inoinfo X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2007 14:57:06 -0000 Hi, recently i killed my fs with `swapon /dev/ad0s2a` (only a few mbyte got in) and i`d like to restore it, so i tried to fsck it getting this output: # fsck_ufs /dev/ad0s2a ** /dev/ad0s2a Cannot find file system superblock /dev/ad0s2a: INCOMPLETE LABEL: type 4.2BSD fsize 0, frag 0, cpg 0, size 14952164 I looked up `newfs -N -U -n /dev/ad0s2a` for alternative super-blocks. While trying some random backup-super-block i always get this output: # fsck_ufs -b 14677888 /dev/ad0s2a Alternate super block location: 14677888 ** /dev/ad0s2a ** Last Mounted on ** Phase 1 - Check Blocks and Sizes fsck_ufs: cannot alloc 3570453704 bytes for inoinfo According to Thread http://lists.freebsd.org/pipermail/freebsd-current/2005-February/047061.html this still seems to be a problem. Some infos: # dumpfs /dev/ad0s2a dumpfs: /dev/ad0s2a: could not read superblock to fill out disk # uname -r 6.2-STABLE # bsdlabel /dev/ad0s2 # /dev/ad0s2: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 14952164 1048576 4.2BSD 0 0 0 b: 1048576 0 swap c: 16000740 0 unused 0 0 # "raw" part, don't edit Bye. From owner-freebsd-fs@FreeBSD.ORG Mon Mar 12 09:06:58 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F35C16A402 for ; Mon, 12 Mar 2007 09:06:58 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id C466713C45E for ; Mon, 12 Mar 2007 09:06:57 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id CD642207E; Mon, 12 Mar 2007 10:06:49 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 430172049; Mon, 12 Mar 2007 10:06:49 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 1001) id 27C48B88E; Mon, 12 Mar 2007 10:06:49 +0100 (CET) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Barry Pederson References: <20070120073117.GB60202@x12.dk> <200703061246.09687.antik@bsd.ee> <45ED5850.6050506@nipsi.de> <200703061420.36980.antik@bsd.ee> <20070307135017.GC2864@garage.freebsd.pl> <45F2EEBD.6070007@barryp.org> Date: Mon, 12 Mar 2007 10:06:49 +0100 In-Reply-To: <45F2EEBD.6070007@barryp.org> (Barry Pederson's message of "Sat, 10 Mar 2007 11:45:33 -0600") Message-ID: <86ps7evniu.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@FreeBSD.org, Pawel Jakub Dawidek , freebsd-geom@freebsd.org Subject: Re: zfs_20070303.patch on current X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2007 09:06:58 -0000 Barry Pederson writes: > Is there any hope for someday optionally using ZFS as a root filesystem? For that to be possible, both /boot/boot2 and /boot/loader need to understand ZFS well enough to read files from it. There isn't much room to spare in /boot/boot2, so we'd have to have a separate version for ZFS and teach 'disklabel -B' how to pick the right one. > I was sort of imagining a setup where /boot resided in a UFS > filesystem so it could hold the kernel/modules/regular booting info > and - > /boot/loader.conf would specify 'zfs_load=3D"YES"' along with another > directive to tell which zfs filesystem to use as root. Unlike Linux, where this is a common configuration, FreeBSD can't mount a root filesystem underneath an already mounted /boot filesystem. Nor do we have anything resembling Linux's pivot_root which would allow us to mount the root filesystem on top of /boot and then switch them around. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-fs@FreeBSD.ORG Mon Mar 12 14:30:18 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E7EEE16A403; Mon, 12 Mar 2007 14:30:18 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 751CD13C448; Mon, 12 Mar 2007 14:30:18 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 02C68487F3; Mon, 12 Mar 2007 15:30:12 +0100 (CET) Received: from localhost (pc-ab234.wlan.inet.fi [193.211.2.234]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id E31D445CD9; Mon, 12 Mar 2007 15:30:05 +0100 (CET) Date: Mon, 12 Mar 2007 15:28:46 +0100 From: Pawel Jakub Dawidek To: Dag-Erling Sm?rgrav Message-ID: <20070312142846.GA3747@garage.freebsd.pl> References: <20070120073117.GB60202@x12.dk> <200703061246.09687.antik@bsd.ee> <45ED5850.6050506@nipsi.de> <200703061420.36980.antik@bsd.ee> <20070307135017.GC2864@garage.freebsd.pl> <45F2EEBD.6070007@barryp.org> <86ps7evniu.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: <86ps7evniu.fsf@dwp.des.no> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@FreeBSD.org, freebsd-geom@freebsd.org Subject: Re: zfs_20070303.patch on current X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2007 14:30:19 -0000 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 12, 2007 at 10:06:49AM +0100, Dag-Erling Sm?rgrav wrote: > Barry Pederson writes: > > Is there any hope for someday optionally using ZFS as a root filesystem? >=20 > For that to be possible, both /boot/boot2 and /boot/loader need to > understand ZFS well enough to read files from it. There isn't much > room to spare in /boot/boot2, so we'd have to have a separate version > for ZFS and teach 'disklabel -B' how to pick the right one. This would be hard, I fully agree. > > I was sort of imagining a setup where /boot resided in a UFS > > filesystem so it could hold the kernel/modules/regular booting info > > and - > > /boot/loader.conf would specify 'zfs_load=3D"YES"' along with another > > directive to tell which zfs filesystem to use as root. >=20 > Unlike Linux, where this is a common configuration, FreeBSD can't > mount a root filesystem underneath an already mounted /boot > filesystem. [...] We don't have to mount /boot/ to read from it. The loader reads directly =66rom boot partition, so bascially we could make /dev/ad0s1a a small UFS partition that contains the kernel, zfs kernel module and /etc/fstab and it should work. Note that we currently allow for encrypting root file system the same way with geli(8). > [...] Nor do we have anything resembling Linux's pivot_root > which would allow us to mount the root filesystem on top of /boot and > then switch them around. Actually we do something like this for devfs, AFAIK - we first mount devfs as root file system, then we mount the right root on top of it and move devfs to /dev/. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --/04w6evG8XlLl3ft Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF9WOeForvXbEpPzQRAkrGAKD4V0rKEcLNG7i8eB0oNkZQuaCmcgCePvmv 3BOSUErlCSClU/sJ03f+mHA= =ghFL -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft-- From owner-freebsd-fs@FreeBSD.ORG Mon Mar 12 14:42:18 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C64EE16A402; Mon, 12 Mar 2007 14:42:18 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 7C49A13C459; Mon, 12 Mar 2007 14:42:18 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id A8EFA208C; Mon, 12 Mar 2007 15:42:11 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 9400D2089; Mon, 12 Mar 2007 15:42:11 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 1001) id 11D6FB88E; Mon, 12 Mar 2007 15:42:11 +0100 (CET) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Pawel Jakub Dawidek References: <20070120073117.GB60202@x12.dk> <200703061246.09687.antik@bsd.ee> <45ED5850.6050506@nipsi.de> <200703061420.36980.antik@bsd.ee> <20070307135017.GC2864@garage.freebsd.pl> <45F2EEBD.6070007@barryp.org> <86ps7evniu.fsf@dwp.des.no> <20070312142846.GA3747@garage.freebsd.pl> Date: Mon, 12 Mar 2007 15:42:11 +0100 In-Reply-To: <20070312142846.GA3747@garage.freebsd.pl> (Pawel Jakub Dawidek's message of "Mon, 12 Mar 2007 15:28:46 +0100") Message-ID: <86ejnur0ak.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@FreeBSD.org, freebsd-geom@freebsd.org Subject: Re: zfs_20070303.patch on current X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2007 14:42:18 -0000 Pawel Jakub Dawidek writes: > We don't have to mount /boot to read from it. The loader reads directly > from boot partition, so bascially we could make /dev/ad0s1a a small UFS > partition that contains the kernel, zfs kernel module and /etc/fstab > and it should work. Note that we currently allow for encrypting root > file system the same way with geli(8). Yeah, but it makes 'make installkernel' a bit non-obvious. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-fs@FreeBSD.ORG Mon Mar 12 14:51:52 2007 Return-Path: X-Original-To: fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C8B616A401 for ; Mon, 12 Mar 2007 14:51:52 +0000 (UTC) (envelope-from mi+kde@aldan.algebra.com) Received: from mail1.sea5.speakeasy.net (mail1.sea5.speakeasy.net [69.17.117.3]) by mx1.freebsd.org (Postfix) with ESMTP id 45AEF13C455 for ; Mon, 12 Mar 2007 14:51:52 +0000 (UTC) (envelope-from mi+kde@aldan.algebra.com) Received: (qmail 16826 invoked from network); 12 Mar 2007 14:25:11 -0000 Received: from aldan.algebra.com ([216.254.65.224]) (envelope-sender ) by mail1.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 12 Mar 2007 14:25:11 -0000 Received: from aldan.algebra.com (aldan [127.0.0.1]) by aldan.algebra.com (8.13.8/8.13.8) with ESMTP id l2CEP6G0021082 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Mar 2007 09:25:06 -0500 (EST) (envelope-from mi+kde@aldan.algebra.com) Received: from localhost (localhost [[UNIX: localhost]]) by aldan.algebra.com (8.13.8/8.13.8/Submit) id l2CEP5th021081; Mon, 12 Mar 2007 10:25:05 -0400 (EDT) (envelope-from mi+kde@aldan.algebra.com) From: Mikhail Teterin To: fs@FreeBSD.org Date: Mon, 12 Mar 2007 10:25:05 -0400 User-Agent: KMail/1.9.5 References: <200702151631.l1FGVHIg042246@freefall.freebsd.org> <20070312081133.GA70090@elvandar.org> In-Reply-To: <20070312081133.GA70090@elvandar.org> X-Face: %UW#n0|w>ydeGt/b@1-.UFP=K^~-:0f#O:D7whJ5G_<5143Bb3kOIs9XpX+"V+~$adGP:J|SLieM31VIhqXeLBli" Cc: Remko Lodder Subject: Re: kern/105056: FS can not be remounted read-only, if a running process' executable was modified X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2007 14:51:52 -0000 On Monday 12 March 2007 04:11, Remko Lodder wrote: = Hi Mikhail, = = As far as I am aware, the filesystem can only be closed when the consumers = stopped consuming the disk. Perhaps we should move this discussion to -fs = to see what the FileSystem guru's think so that we know for sure? Moving... Of course, the filesystem can only be closed, when the consumers stop consuming. The point is, however, there are NO read-write consumers -- and yet a read-only remount remains impossible. The problem detailed in the PR is that locking an FS back down to read-only is impossible, when earlier-started processes are still running, but have had their executables overwritten. The usual scenario, again, is: * remount / read-write for `installworld' to succeed; * try to remount / back read-only, and fail... Note, that no new "consumers" of the FS have started, or have they?.. Yours, -mi From owner-freebsd-fs@FreeBSD.ORG Mon Mar 12 18:57:12 2007 Return-Path: X-Original-To: fs@freebsd.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C07E316A400 for ; Mon, 12 Mar 2007 18:57:12 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id 94FCD13C45E for ; Mon, 12 Mar 2007 18:57:12 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from [192.168.42.21] (andersonbox1.centtech.com [192.168.42.21]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l2CIv0D3059225; Mon, 12 Mar 2007 13:57:01 -0500 (CDT) (envelope-from anderson@freebsd.org) Message-ID: <45F5A27C.8090406@freebsd.org> Date: Mon, 12 Mar 2007 13:57:00 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.9 (X11/20070204) MIME-Version: 1.0 To: Mikhail Teterin References: <200702151631.l1FGVHIg042246@freefall.freebsd.org> <20070312081133.GA70090@elvandar.org> <200703121025.05538@aldan> In-Reply-To: <200703121025.05538@aldan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2824/Mon Mar 12 11:52:54 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: Remko Lodder , fs@freebsd.org Subject: Re: kern/105056: FS can not be remounted read-only, if a running process' executable was modified X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2007 18:57:12 -0000 On 03/12/07 09:25, Mikhail Teterin wrote: > On Monday 12 March 2007 04:11, Remko Lodder wrote: > = Hi Mikhail, > = > = As far as I am aware, the filesystem can only be closed when the consumers > = stopped consuming the disk. Perhaps we should move this discussion to -fs > = to see what the FileSystem guru's think so that we know for sure? > > Moving... Of course, the filesystem can only be closed, when the consumers > stop consuming. The point is, however, there are NO read-write consumers -- > and yet a read-only remount remains impossible. > > The problem detailed in the PR is that locking an FS back down to read-only is > impossible, when earlier-started processes are still running, but have had > their executables overwritten. > > The usual scenario, again, is: > > * remount / read-write for `installworld' to succeed; > * try to remount / back read-only, and fail... > > Note, that no new "consumers" of the FS have started, or have they?.. This probably won't work because there is still meta-data that needs to be written once the open files are closed. That is because a currently in-use (open) file was replaced, so the delete still needs to occur once the file is closed. That pending delete is probably what is causing the fs to not allow it to be downgraded. Eric From owner-freebsd-fs@FreeBSD.ORG Mon Mar 12 21:28:32 2007 Return-Path: X-Original-To: fs@freebsd.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A038716A40A for ; Mon, 12 Mar 2007 21:28:32 +0000 (UTC) (envelope-from mohan_srinivasan@yahoo.com) Received: from web30810.mail.mud.yahoo.com (web30810.mail.mud.yahoo.com [68.142.200.153]) by mx1.freebsd.org (Postfix) with SMTP id 4636613C48C for ; Mon, 12 Mar 2007 21:28:32 +0000 (UTC) (envelope-from mohan_srinivasan@yahoo.com) Received: (qmail 7198 invoked by uid 60001); 12 Mar 2007 21:28:28 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=Q+6SIt7aFDSZ1lb6R6OvxJGTiuqgbgQRKuG14wudtkmFgOTuaX1+21J4JxiSV/J4YCreuccFgGMUY/cywoV6nZfmH2+qXK5FePisswXPGVJ79Mu7Rboe5p6aTFOCBYsXI/dUP3yrmr5GhhAuPW6lsH+fJJOH+GrQnC4bLm6Q5QU=; X-YMail-OSG: xivRHdsVM1kg9VxyKdg5butBwdYIyeaOXzSWSQ__NocL5j2QWahi2m6scIryETGSyxxdqc0bdsEXjD4gkRrFTovbCwlstqJvTje0_NVPsqcT7FyMFUJrsvcUzWUAMog8dd81V3UAk9q7NAdlhRZ.zUTg60EHHN2Cag-- Received: from [207.126.239.39] by web30810.mail.mud.yahoo.com via HTTP; Mon, 12 Mar 2007 14:28:28 PDT Date: Mon, 12 Mar 2007 14:28:28 -0700 (PDT) From: Mohan Srinivasan To: bde@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <556315.7186.qm@web30810.mail.mud.yahoo.com> Cc: src-committers@FreeBSD.org, fs@freebsd.org Subject: Re: cvs commit: src/sys/amd64/amd64 trap.c src/sys/i386/i386 trap.c src/sys/ia64/ia64 trap.c src/sys/kern kern_thread.c src/sys/nfsclient nfs_socket.c nfs_subs.c nfs_vnops.c nfsnode.h src/sys/powerpc/powerpc trap.c src/sys/sparc64/sparc64 trap.c ... X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2007 21:28:32 -0000 Bruce Somehow I missed your e-mail about the change I committed to reduce the Getattrs from the open() path over NFS. You're a complete idiot. It amazes me that not understanding something (in this case NFS consistency or NFS close-to-open consistency) does not prevent you from commenting on it. If you would like to get enlightened on the said matter, send e-mail to me, asking me nicely and I might oblige. You're doing a fine job of driving away the few remaining FreeBSD developers with your attitude. Good job ! mohan From owner-freebsd-fs@FreeBSD.ORG Mon Mar 12 21:28:43 2007 Return-Path: X-Original-To: fs@freebsd.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 345DB16A400 for ; Mon, 12 Mar 2007 21:28:43 +0000 (UTC) (envelope-from mohan_srinivasan@yahoo.com) Received: from web30812.mail.mud.yahoo.com (web30812.mail.mud.yahoo.com [68.142.201.138]) by mx1.freebsd.org (Postfix) with SMTP id CE94513C448 for ; Mon, 12 Mar 2007 21:28:42 +0000 (UTC) (envelope-from mohan_srinivasan@yahoo.com) Received: (qmail 7494 invoked by uid 60001); 12 Mar 2007 21:28:42 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=p9NyYjkcgffOlvrlwfXIVMCmWnxASLCDLHXwEZ2r0ja37BdnYbJW8CBrGcn+MJw/z7fiDxD1tNb91qBR6Wa36Lb5HpyTZ88l+6j6viMscorPeOWqD9VBIKdIcIhS7KnChm9qgDCCyOziD6r9bC8CSh03KM0yJqRlaq/LuYGycxY=; X-YMail-OSG: ihiACkcVM1nW7KIi7oyumjlErch.mkB0O.hPrKKbPUdKMHp95lrZrKYE6KYgW.g8hdrMWF.R9ZAjcwdiHfqeBoFD7xI12IiS8L21NAWD8cB6_K0AJO.s.MhfQ01SlZShmso4IiAzIBQGrss- Received: from [207.126.239.39] by web30812.mail.mud.yahoo.com via HTTP; Mon, 12 Mar 2007 14:28:42 PDT Date: Mon, 12 Mar 2007 14:28:42 -0700 (PDT) From: Mohan Srinivasan To: bde@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <321212.7491.qm@web30812.mail.mud.yahoo.com> Cc: src-committers@FreeBSD.org, fs@freebsd.org Subject: Re: cvs commit: src/sys/amd64/amd64 trap.c src/sys/i386/i386 trap.c src/sys/ia64/ia64 trap.c src/sys/kern kern_thread.c src/sys/nfsclient nfs_socket.c nfs_subs.c nfs_vnops.c nfsnode.h src/sys/powerpc/powerpc trap.c src/sys/sparc64/sparc64 trap.c ... X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2007 21:28:43 -0000 Bruce Somehow I missed your e-mail about the change I committed to reduce the Getattrs from the open() path over NFS. You're a complete idiot. It amazes me that not understanding something (in this case NFS consistency or NFS close-to-open consistency) does not prevent you from commenting on it. If you would like to get enlightened on the said matter, send e-mail to me, asking me nicely and I might oblige. You're doing a fine job of driving away the few remaining FreeBSD developers with your attitude. Good job ! mohan From owner-freebsd-fs@FreeBSD.ORG Mon Mar 12 21:32:19 2007 Return-Path: X-Original-To: fs@freebsd.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D1DAA16A405 for ; Mon, 12 Mar 2007 21:32:19 +0000 (UTC) (envelope-from mohan_srinivasan@yahoo.com) Received: from web30813.mail.mud.yahoo.com (web30813.mail.mud.yahoo.com [68.142.201.139]) by mx1.freebsd.org (Postfix) with SMTP id ED26C13C457 for ; Mon, 12 Mar 2007 21:32:18 +0000 (UTC) (envelope-from mohan_srinivasan@yahoo.com) Received: (qmail 60175 invoked by uid 60001); 12 Mar 2007 21:05:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=1Rp0CSj03dyCrU+ckyiPcvQwz00GC9kuoRKBnqLP6bYMt1IWQ9jW5qCcg6QhZk5eiaj56O47SMYtZszvpD+t52Kog4uXT3xhz25T9+1eaDxj+gRVWjPGchc/OSk+LpYcq93vKBStAHs1iL67hHac7ce16DPRmuu6lQzg02cEODY=; X-YMail-OSG: Pc_Z_DEVM1kvidlw6MzsUJOSNGGSqVhzY.V4HN3pU8q_dDf_oscRdilOmYm_mE14yDhGhhggOPopBLml0WmgO1tpP__5f45GRBKp8T68zlcZHrSBP23ClLTm9DzUkp2esoZRWCQVLntEcW0- Received: from [207.126.239.39] by web30813.mail.mud.yahoo.com via HTTP; Mon, 12 Mar 2007 14:05:37 PDT Date: Mon, 12 Mar 2007 14:05:37 -0700 (PDT) From: Mohan Srinivasan To: bde@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <37485.60076.qm@web30813.mail.mud.yahoo.com> Cc: src-committers@FreeBSD.org, fs@freebsd.org Subject: Re: cvs commit: src/sys/amd64/amd64 trap.c src/sys/i386/i386 trap.c src/sys/ia64/ia64 trap.c src/sys/kern kern_thread.c src/sys/nfsclient nfs_socket.c nfs_subs.c nfs_vnops.c nfsnode.h src/sys/powerpc/powerpc trap.c src/sys/sparc64/sparc64 trap.c ... X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2007 21:32:19 -0000 Bruce Somehow I missed your e-mail about the change I committed to reduce the Getattrs from the open() path over NFS. You're a complete idiot. It amazes me that not understanding something (in this case NFS consistency or NFS close-to-open consistency) does not prevent you from commenting on it. If you would like to get enlightened on the said matter, send e-mail to me, asking me nicely and I might oblige. You're doing a fine job of driving away the few remaining FreeBSD developers with your attitude. Good job ! mohan From owner-freebsd-fs@FreeBSD.ORG Mon Mar 12 22:11:11 2007 Return-Path: X-Original-To: fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6356616A404; Mon, 12 Mar 2007 22:11:11 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mrout1-b.corp.dcn.yahoo.com (mrout1-b.corp.dcn.yahoo.com [216.109.112.27]) by mx1.freebsd.org (Postfix) with ESMTP id 2C7D213C45B; Mon, 12 Mar 2007 22:11:11 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from minion.local.neville-neil.com (proxy8.corp.yahoo.com [216.145.48.13]) by mrout1-b.corp.dcn.yahoo.com (8.13.8/8.13.8/y.out) with ESMTP id l2CM0iAu035490; Mon, 12 Mar 2007 15:00:46 -0700 (PDT) Date: Tue, 13 Mar 2007 07:00:34 +0900 Message-ID: From: gnn@FreeBSD.org To: Mohan Srinivasan In-Reply-To: <37485.60076.qm@web30813.mail.mud.yahoo.com> References: <37485.60076.qm@web30813.mail.mud.yahoo.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.0.95 (i386-apple-darwin8.8.2) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: bde@FreeBSD.org, fs@FreeBSD.org Subject: Re: cvs commit: src/sys/amd64/amd64 trap.c src/sys/i386/i386 trap.c src/sys/ia64/ia64 trap.c src/sys/kern kern_thread.c src/sys/nfsclient nfs_socket.c nfs_subs.c nfs_vnops.c nfsnode.h src/sys/powerpc/powerpc trap.c src/sys/sparc64/sparc64 trap.c ... X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2007 22:11:11 -0000 At Mon, 12 Mar 2007 14:05:37 -0700 (PDT), Mohan Srinivasan wrote: > > Bruce > > Somehow I missed your e-mail about the change I committed to reduce the > Getattrs from the open() path over NFS. > > You're a complete idiot. It amazes me that not understanding something > (in this case NFS consistency or NFS close-to-open consistency) does > not prevent you from commenting on it. > > If you would like to get enlightened on the said matter, send e-mail to > me, asking me nicely and I might oblige. > > You're doing a fine job of driving away the few remaining FreeBSD developers > with your attitude. Good job ! > > mohan > Hi, I am really hoping that this was sent to the lists by mistake, and that y'all can take this, and keep this, off list. It was not a good thing to wake up to this morning. That being said if there are real issues here then I'm up for hearing them and helping to work them out. Later, George (NOT speak for core just yet) From owner-freebsd-fs@FreeBSD.ORG Mon Mar 12 23:33:08 2007 Return-Path: X-Original-To: fs@FreeBSD.ORG Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02B9916A403; Mon, 12 Mar 2007 23:33:08 +0000 (UTC) (envelope-from wb@freebie.xs4all.nl) Received: from smtp-vbr15.xs4all.nl (smtp-vbr15.xs4all.nl [194.109.24.35]) by mx1.freebsd.org (Postfix) with ESMTP id 9091513C468; Mon, 12 Mar 2007 23:33:07 +0000 (UTC) (envelope-from wb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (obsolete.xs4all.nl [82.95.250.254]) by smtp-vbr15.xs4all.nl (8.13.8/8.13.8) with ESMTP id l2CNHUxd015267; Tue, 13 Mar 2007 00:17:31 +0100 (CET) (envelope-from wb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (localhost [127.0.0.1]) by freebie.xs4all.nl (8.13.8/8.13.3) with ESMTP id l2CNHFRn036043; Tue, 13 Mar 2007 00:17:15 +0100 (CET) (envelope-from wb@freebie.xs4all.nl) Received: (from wb@localhost) by freebie.xs4all.nl (8.13.8/8.13.6/Submit) id l2CNHDCf036042; Tue, 13 Mar 2007 00:17:13 +0100 (CET) (envelope-from wb) Date: Tue, 13 Mar 2007 00:17:12 +0100 From: Wilko Bulte To: Mohan Srinivasan Message-ID: <20070312231712.GA36024@freebie.xs4all.nl> References: <37485.60076.qm@web30813.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37485.60076.qm@web30813.mail.mud.yahoo.com> User-Agent: Mutt/1.5.11 X-Virus-Scanned: by XS4ALL Virus Scanner Cc: src-committers@FreeBSD.ORG, bde@FreeBSD.ORG, fs@FreeBSD.ORG Subject: Re: cvs commit: src/sys/amd64/amd64 trap.c src/sys/i386/i386 trap.c src/sys/ia64/ia64 trap.c src/sys/kern kern_thread.c src/sys/nfsclient nfs_socket.c nfs_subs.c nfs_vnops.c nfsnode.h src/sys/powerpc/powerpc trap.c src/sys/sparc64/sparc64 trap.c ... X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2007 23:33:08 -0000 On Mon, Mar 12, 2007 at 02:05:37PM -0700, Mohan Srinivasan wrote.. > Bruce > > Somehow I missed your e-mail about the change I committed to reduce the > Getattrs from the open() path over NFS. > > You're a complete idiot. It amazes me that not understanding something > (in this case NFS consistency or NFS close-to-open consistency) does > not prevent you from commenting on it. > > If you would like to get enlightened on the said matter, send e-mail to > me, asking me nicely and I might oblige. > > You're doing a fine job of driving away the few remaining FreeBSD developers > with your attitude. Good job ! Hang on... what is this please? This, regardless of any technical background discussion, is not the way the project members are supposed to communicate. Can everybody please take a chill pill first? -- Wilko Bulte wilko@FreeBSD.org From owner-freebsd-fs@FreeBSD.ORG Tue Mar 13 07:48:54 2007 Return-Path: X-Original-To: fs@freebsd.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 99DD016A400; Tue, 13 Mar 2007 07:48:54 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6037113C45D; Tue, 13 Mar 2007 07:48:54 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 2C007207E; Tue, 13 Mar 2007 08:28:04 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 9D23B2049; Tue, 13 Mar 2007 08:28:03 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 1001) id 64E40B88E; Tue, 13 Mar 2007 08:28:03 +0100 (CET) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Mohan Srinivasan References: <556315.7186.qm@web30810.mail.mud.yahoo.com> Date: Tue, 13 Mar 2007 08:28:03 +0100 In-Reply-To: <556315.7186.qm@web30810.mail.mud.yahoo.com> (Mohan Srinivasan's message of "Mon, 12 Mar 2007 14:28:28 -0700 (PDT)") Message-ID: <86k5xl38n0.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: src-committers@FreeBSD.org, bde@freebsd.org, fs@freebsd.org Subject: Re: cvs commit: src/sys/amd64/amd64 trap.c src/sys/i386/i386 trap.c src/sys/ia64/ia64 trap.c src/sys/kern kern_thread.c src/sys/nfsclient nfs_socket.c nfs_subs.c nfs_vnops.c nfsnode.h src/sys/powerpc/powerpc trap.c src/sys/sparc64/sparc64 trap.c ... X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2007 07:48:54 -0000 Mohan Srinivasan writes: > You're a complete idiot. It amazes me that not understanding something > (in this case NFS consistency or NFS close-to-open consistency) does > not prevent you from commenting on it. On the contrary, Bruce is one of our most experienced and perceptive committers. I am sure you have a lot to learn from him, if you take the time to listen. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-fs@FreeBSD.ORG Tue Mar 13 11:44:55 2007 Return-Path: X-Original-To: fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E26816A402; Tue, 13 Mar 2007 11:44:55 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2-3.pacific.net.au [61.8.2.226]) by mx1.freebsd.org (Postfix) with ESMTP id 0670F13C455; Tue, 13 Mar 2007 11:44:55 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 809206E110; Tue, 13 Mar 2007 22:44:49 +1100 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 7A7808C0F; Tue, 13 Mar 2007 22:44:52 +1100 (EST) Date: Tue, 13 Mar 2007 22:44:50 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= In-Reply-To: <86k5xl38n0.fsf@dwp.des.no> Message-ID: <20070313220024.D52031@delplex.bde.org> References: <556315.7186.qm@web30810.mail.mud.yahoo.com> <86k5xl38n0.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1236418884-1173786290=:52031" Cc: src-committers@FreeBSD.org, Mohan Srinivasan , fs@FreeBSD.org, bde@FreeBSD.org Subject: Re: cvs commit: src/sys/amd64/amd64 trap.c src/sys/i386/i386 trap.c src/sys/ia64/ia64 trap.c src/sys/kern kern_thread.c src/sys/nfsclient nfs_socket.c nfs_subs.c nfs_vnops.c nfsnode.h src/sys/powerpc/powerpc trap.c src/sys/sparc64/sparc64 trap.c ... X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2007 11:44:55 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1236418884-1173786290=:52031 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 13 Mar 2007, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote: > Mohan Srinivasan writes: >> You're a complete idiot. It amazes me that not understanding something >> (in this case NFS consistency or NFS close-to-open consistency) does >> not prevent you from commenting on it. > > On the contrary, Bruce is one of our most experienced and perceptive > committers. I am sure you have a lot to learn from him, if you take > the time to listen. Thanks for the support everyone. Google fails to confirm that I don't understand the close-to-open consistency protocol, but gives too many hits for us in discussions of it. This thread is now sorted #7. It should not become the top hit. Bruce --0-1236418884-1173786290=:52031-- From owner-freebsd-fs@FreeBSD.ORG Tue Mar 13 15:50:11 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DD75016A400; Tue, 13 Mar 2007 15:50:11 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 678CF13C459; Tue, 13 Mar 2007 15:50:11 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 6660545696; Tue, 13 Mar 2007 16:50:09 +0100 (CET) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id BA4F748803; Tue, 13 Mar 2007 16:49:53 +0100 (CET) Date: Tue, 13 Mar 2007 16:49:53 +0100 From: Pawel Jakub Dawidek To: Dag-Erling Sm?rgrav Message-ID: <20070313154953.GA3108@garage.freebsd.pl> References: <20070120073117.GB60202@x12.dk> <200703061246.09687.antik@bsd.ee> <45ED5850.6050506@nipsi.de> <200703061420.36980.antik@bsd.ee> <20070307135017.GC2864@garage.freebsd.pl> <45F2EEBD.6070007@barryp.org> <86ps7evniu.fsf@dwp.des.no> <20070312142846.GA3747@garage.freebsd.pl> <86ejnur0ak.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <86ejnur0ak.fsf@dwp.des.no> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@FreeBSD.org, freebsd-geom@freebsd.org Subject: Re: zfs_20070303.patch on current X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2007 15:50:12 -0000 --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 12, 2007 at 03:42:11PM +0100, Dag-Erling Sm?rgrav wrote: > Pawel Jakub Dawidek writes: > > We don't have to mount /boot to read from it. The loader reads directly > > from boot partition, so bascially we could make /dev/ad0s1a a small UFS > > partition that contains the kernel, zfs kernel module and /etc/fstab > > and it should work. Note that we currently allow for encrypting root > > file system the same way with geli(8). >=20 > Yeah, but it makes 'make installkernel' a bit non-obvious. You can still always mount /boot/ from /etc/fstab, I think... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF9sghForvXbEpPzQRAgMUAJ4lWLHWI1kvX4qr+gSgLMZuMOJf4wCgmYNL COqD/3LXaw4tnI0jyrXmSPw= =cyzv -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1-- From owner-freebsd-fs@FreeBSD.ORG Tue Mar 13 15:57:15 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1250516A401; Tue, 13 Mar 2007 15:57:15 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id B3CF213C4B8; Tue, 13 Mar 2007 15:57:14 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id D74A2208C; Tue, 13 Mar 2007 16:57:07 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id C58AD2087; Tue, 13 Mar 2007 16:57:07 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 1001) id 9C140B88E; Tue, 13 Mar 2007 16:57:07 +0100 (CET) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Pawel Jakub Dawidek References: <20070120073117.GB60202@x12.dk> <200703061246.09687.antik@bsd.ee> <45ED5850.6050506@nipsi.de> <200703061420.36980.antik@bsd.ee> <20070307135017.GC2864@garage.freebsd.pl> <45F2EEBD.6070007@barryp.org> <86ps7evniu.fsf@dwp.des.no> <20070312142846.GA3747@garage.freebsd.pl> <86ejnur0ak.fsf@dwp.des.no> <20070313154953.GA3108@garage.freebsd.pl> Date: Tue, 13 Mar 2007 16:57:07 +0100 In-Reply-To: <20070313154953.GA3108@garage.freebsd.pl> (Pawel Jakub Dawidek's message of "Tue, 13 Mar 2007 16:49:53 +0100") Message-ID: <86k5xl5e7g.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@FreeBSD.org, freebsd-geom@freebsd.org Subject: Re: zfs_20070303.patch on current X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2007 15:57:15 -0000 Pawel Jakub Dawidek writes: > On Mon, Mar 12, 2007 at 03:42:11PM +0100, Dag-Erling Sm?rgrav wrote: > > Pawel Jakub Dawidek writes: > > > We don't have to mount /boot to read from it. The loader reads direct= ly > > > from boot partition, so bascially we could make /dev/ad0s1a a small U= FS > > > partition that contains the kernel, zfs kernel module and /etc/fstab > > > and it should work. Note that we currently allow for encrypting root > > > file system the same way with geli(8). > > Yeah, but it makes 'make installkernel' a bit non-obvious. > You can still always mount /boot/ from /etc/fstab, I think... Your boot filesystem needs to have roughly the following layout: /boot.config /boot/beastie.4th /boot/device.hints /boot/frames.4th /boot/kernel/kernel /boot/kernel/zfs.ko /boot/loader /boot/loader.4th /boot/loader.conf /boot/loader.rc /boot/screen.4th /boot/support.4th /etc/fstab You can't mount that somewhere and have it "just work" - you'll need to mount it somewhere out of the way and have symlinks in your root directory. Not very convenient. Easier to just use UFS on your root filesystem, and use ZFS where it can make a difference (/var, /usr/local, /home etc) Your average root filesystem is small and fairly quiet, so the chances of something going wrong are low and it only takes an instant to fsck. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-fs@FreeBSD.ORG Tue Mar 13 16:11:08 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6677D16A400; Tue, 13 Mar 2007 16:11:08 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id D936513C465; Tue, 13 Mar 2007 16:11:07 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 7BDBD48801; Tue, 13 Mar 2007 17:11:06 +0100 (CET) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 3D2F7456AB; Tue, 13 Mar 2007 17:10:50 +0100 (CET) Date: Tue, 13 Mar 2007 17:10:49 +0100 From: Pawel Jakub Dawidek To: Dag-Erling Sm?rgrav Message-ID: <20070313161049.GB3108@garage.freebsd.pl> References: <200703061246.09687.antik@bsd.ee> <45ED5850.6050506@nipsi.de> <200703061420.36980.antik@bsd.ee> <20070307135017.GC2864@garage.freebsd.pl> <45F2EEBD.6070007@barryp.org> <86ps7evniu.fsf@dwp.des.no> <20070312142846.GA3747@garage.freebsd.pl> <86ejnur0ak.fsf@dwp.des.no> <20070313154953.GA3108@garage.freebsd.pl> <86k5xl5e7g.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mojUlQ0s9EVzWg2t" Content-Disposition: inline In-Reply-To: <86k5xl5e7g.fsf@dwp.des.no> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@FreeBSD.org, freebsd-geom@freebsd.org Subject: Re: zfs_20070303.patch on current X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2007 16:11:08 -0000 --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 13, 2007 at 04:57:07PM +0100, Dag-Erling Sm?rgrav wrote: > Pawel Jakub Dawidek writes: > > On Mon, Mar 12, 2007 at 03:42:11PM +0100, Dag-Erling Sm?rgrav wrote: > > > Pawel Jakub Dawidek writes: > > > > We don't have to mount /boot to read from it. The loader reads dire= ctly > > > > from boot partition, so bascially we could make /dev/ad0s1a a small= UFS > > > > partition that contains the kernel, zfs kernel module and /etc/fstab > > > > and it should work. Note that we currently allow for encrypting root > > > > file system the same way with geli(8). > > > Yeah, but it makes 'make installkernel' a bit non-obvious. > > You can still always mount /boot/ from /etc/fstab, I think... >=20 > Your boot filesystem needs to have roughly the following layout: >=20 > /boot.config > /boot/beastie.4th > /boot/device.hints > /boot/frames.4th > /boot/kernel/kernel > /boot/kernel/zfs.ko > /boot/loader > /boot/loader.4th > /boot/loader.conf > /boot/loader.rc > /boot/screen.4th > /boot/support.4th > /etc/fstab >=20 > You can't mount that somewhere and have it "just work" - you'll need > to mount it somewhere out of the way and have symlinks in your root > directory. Not very convenient. Easier to just use UFS on your root > filesystem, and use ZFS where it can make a difference (/var, > /usr/local, /home etc) >=20 > Your average root filesystem is small and fairly quiet, so the chances > of something going wrong are low and it only takes an instant to fsck. Actually this is what I suggest to do when someone is asking about booting from ZFS, but just wanted to clearify that it should be possible to have root ZFS file system, maybe not nice, but possible. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --mojUlQ0s9EVzWg2t Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF9s0JForvXbEpPzQRAm0lAJ4uStO0fTN5tcoh5IgUG5zpaFEh0wCdFDEP XdZYKiduMsNoj6AHUVxo74Q= =tbBD -----END PGP SIGNATURE----- --mojUlQ0s9EVzWg2t-- From owner-freebsd-fs@FreeBSD.ORG Tue Mar 13 16:18:01 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7282A16A402; Tue, 13 Mar 2007 16:18:01 +0000 (UTC) (envelope-from bp@barryp.org) Received: from eden.barryp.org (host-42-60-230-24.midco.net [24.230.60.42]) by mx1.freebsd.org (Postfix) with ESMTP id 396BD13C45B; Tue, 13 Mar 2007 16:18:01 +0000 (UTC) (envelope-from bp@barryp.org) Received: from geo.med.und.nodak.edu ([134.129.166.11]) by eden.barryp.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1HR9hH-000PVe-4c; Tue, 13 Mar 2007 11:17:59 -0500 Message-ID: <45F6CEB5.7030305@barryp.org> Date: Tue, 13 Mar 2007 11:17:57 -0500 From: Barry Pederson User-Agent: Thunderbird 1.5.0.8 (X11/20061025) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <20070120073117.GB60202@x12.dk> <200703061246.09687.antik@bsd.ee> <45ED5850.6050506@nipsi.de> <200703061420.36980.antik@bsd.ee> <20070307135017.GC2864@garage.freebsd.pl> <45F2EEBD.6070007@barryp.org> <86ps7evniu.fsf@dwp.des.no> <20070312142846.GA3747@garage.freebsd.pl> In-Reply-To: <20070312142846.GA3747@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org, Dag-Erling Sm?rgrav , freebsd-geom@freebsd.org Subject: Re: zfs_20070303.patch on current X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2007 16:18:01 -0000 Pawel Jakub Dawidek wrote: > > We don't have to mount /boot/ to read from it. The loader reads directly > from boot partition, so bascially we could make /dev/ad0s1a a small UFS > partition that contains the kernel, zfs kernel module and /etc/fstab > and it should work. Note that we currently allow for encrypting root > file system the same way with geli(8). From what I've been able to make out of the loader source, it seems like /etc/fstab is only read if the 'vfs.root.mountfrom' variable is not already set - so that may be one less thing to worry about. Maybe having a loader.conf with zfs_load="YES" vfs.root.mountfrom="zfs:/dev/???" although maybe you also need some environment variable to tell the zfs module to forcibly import some pool? zfs.zpool.import="tank"? After that, maybe /etc/fstab (within a ZFS filesystem), could mount /dev/ad0s1a as something like /bootpart and then have a symlink setup /boot -> /bootpart/boot so 'make installworld' would be fairly normal. Barry From owner-freebsd-fs@FreeBSD.ORG Wed Mar 14 04:39:06 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67A4216A400 for ; Wed, 14 Mar 2007 04:39:06 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from mgw-ext11.nokia.com (smtp.nokia.com [131.228.20.170]) by mx1.freebsd.org (Postfix) with ESMTP id EE5CC13C457 for ; Wed, 14 Mar 2007 04:39:05 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-ext11.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l2E4FVrl030474 for ; Wed, 14 Mar 2007 06:15:35 +0200 Received: from siebh101.NOE.Nokia.com ([172.30.195.27]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Mar 2007 06:14:56 +0200 Received: from syebe101.NOE.Nokia.com ([172.30.128.65]) by siebh101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Mar 2007 12:14:41 +0800 Received: from [172.30.67.234] ([172.30.67.234]) by syebe101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Mar 2007 15:14:39 +1100 Message-ID: <45F776AE.8090702@nokia.com> Date: Wed, 14 Mar 2007 14:14:38 +1000 From: David Cecil User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 14 Mar 2007 04:14:39.0672 (UTC) FILETIME=[48D2EB80:01C765EF] X-eXpurgate-Category: 1/0 X-eXpurgate-ID: 149371::070314061535-75B50BB0-67772880/0-0/0-1 X-Nokia-AV: Clean Subject: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 04:39:06 -0000 Hi, I have seen the following message (or equivalent) occasionally on a FreeBSD 6.1 system: g_vfs_done():mirror/gm0s1a[WRITE(offset=1349091328, length=16384)]error = 1 The partition in question is the root partition, and it is mounted read-only. I have verified that the problem occurs due to the write request returning EPERM due to the check in g_io_check: case BIO_WRITE: case BIO_DELETE: if (cp->acw == 0) return (EPERM); I have been trying to determine what within FFS would be trying to write to the partition. The "bio_from" in the bio structure indicates (in the geom) that it's ffs.mirror/gm0s1a that's trying to write. The contents of the buffer looks somewhat like a directory (lots of files listed, but comparison to the actual directory that contians these files reveals it's somewhat different), followed by a binary (ELF header). However, I'm at a loss to understand who's actually doing the writing. Is it coming from within FFS or is there an application that's done the write? (I can't understand how an application would be permitted to do it though.) I have seen this sort of problem (same error number) reported on the Internet occasionally, but it doesn't seem it's been satisfactorily resolved in all instances. Any help you can provide would be much appreciated. Thanks, Dave From owner-freebsd-fs@FreeBSD.ORG Wed Mar 14 16:10:57 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6DFB016A406 for ; Wed, 14 Mar 2007 16:10:57 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id F07D013C487 for ; Wed, 14 Mar 2007 16:10:56 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 73134487F3; Wed, 14 Mar 2007 17:10:54 +0100 (CET) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 42CE54569A; Wed, 14 Mar 2007 17:10:43 +0100 (CET) Date: Wed, 14 Mar 2007 17:10:41 +0100 From: Pawel Jakub Dawidek To: David Cecil Message-ID: <20070314161041.GI7847@garage.freebsd.pl> References: <45F776AE.8090702@nokia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aFi3jz1oiPowsTUB" Content-Disposition: inline In-Reply-To: <45F776AE.8090702@nokia.com> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@freebsd.org Subject: Re: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 16:10:57 -0000 --aFi3jz1oiPowsTUB Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 14, 2007 at 02:14:38PM +1000, David Cecil wrote: > Hi, >=20 > I have seen the following message (or equivalent) occasionally on a FreeB= SD 6.1 system: > g_vfs_done():mirror/gm0s1a[WRITE(offset=3D1349091328, length=3D16384)]err= or =3D 1 >=20 > The partition in question is the root partition, and it is mounted read-o= nly. I have verified that the problem occurs due to the write request retu= rning EPERM due to the=20 > check in g_io_check: > case BIO_WRITE: > case BIO_DELETE: > if (cp->acw =3D=3D 0) > return (EPERM); >=20 > I have been trying to determine what within FFS would be trying to write = to the partition. The "bio_from" in the bio structure indicates (in the ge= om) that it's=20 > ffs.mirror/gm0s1a that's trying to write. The contents of the buffer loo= ks somewhat like a directory (lots of files listed, but comparison to the a= ctual directory that=20 > contians these files reveals it's somewhat different), followed by a bina= ry (ELF header). However, I'm at a loss to understand who's actually doing= the writing. Is it=20 > coming from within FFS or is there an application that's done the write? = (I can't understand how an application would be permitted to do it though.) >=20 > I have seen this sort of problem (same error number) reported on the Inte= rnet occasionally, but it doesn't seem it's been satisfactorily resolved in= all instances. >=20 > Any help you can provide would be much appreciated. Will be good if you could place kdb_enter() into g_vfs_done() error path and once in DDB try which processes wait for I/O and collect their backtraces or just put output of 'alltrace' on some web page. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --aFi3jz1oiPowsTUB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF+B6BForvXbEpPzQRAsmUAJ9q1BSCE2MK3t5A6FbOCbWm6x09+wCg5Lso 7/uhJVDJt/nw9ZFsc9o6FNQ= =3qfq -----END PGP SIGNATURE----- --aFi3jz1oiPowsTUB-- From owner-freebsd-fs@FreeBSD.ORG Wed Mar 14 19:22:56 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7547916A401 for ; Wed, 14 Mar 2007 19:22:56 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id 4712113C455 for ; Wed, 14 Mar 2007 19:22:56 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from [192.168.42.21] (andersonbox1.centtech.com [192.168.42.21]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l2EJMqQL079341; Wed, 14 Mar 2007 14:22:53 -0500 (CDT) (envelope-from anderson@freebsd.org) Message-ID: <45F84B8C.5030209@freebsd.org> Date: Wed, 14 Mar 2007 14:22:52 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.9 (X11/20070204) MIME-Version: 1.0 To: Stan Behrens References: <45F41514.1090304@kon.de> In-Reply-To: <45F41514.1090304@kon.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2839/Wed Mar 14 04:24:32 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=8.0 tests=BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: freebsd-fs@freebsd.org Subject: Re: fsck_ufs: cannot alloc %u bytes for inoinfo X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 19:22:56 -0000 On 03/11/07 09:41, Stan Behrens wrote: > Hi, > > recently i killed my fs with `swapon /dev/ad0s2a` (only a few mbyte got > in) and i`d like to restore it, so i tried to fsck it getting this output: > > # fsck_ufs /dev/ad0s2a > ** /dev/ad0s2a > Cannot find file system superblock > /dev/ad0s2a: INCOMPLETE LABEL: type 4.2BSD fsize 0, frag 0, cpg 0, size > 14952164 > > I looked up `newfs -N -U -n /dev/ad0s2a` for alternative super-blocks. > While trying some random backup-super-block i always get this output: > > # fsck_ufs -b 14677888 /dev/ad0s2a > Alternate super block location: 14677888 > ** /dev/ad0s2a > ** Last Mounted on > ** Phase 1 - Check Blocks and Sizes > fsck_ufs: cannot alloc 3570453704 bytes for inoinfo > > According to Thread > http://lists.freebsd.org/pipermail/freebsd-current/2005-February/047061.html > this still seems to be a problem. > > Some infos: > > # dumpfs /dev/ad0s2a > dumpfs: /dev/ad0s2a: could not read superblock to fill out disk > # uname -r > 6.2-STABLE > # bsdlabel /dev/ad0s2 > # /dev/ad0s2: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 14952164 1048576 4.2BSD 0 0 0 > b: 1048576 0 swap > c: 16000740 0 unused 0 0 # "raw" part, > don't edit Since you blasted some considerable amount of the file system, fsck is not going to be able to repair it. You'll need to use a tool like /usr/src/tools/tools/recoverdisk or /usr/ports/sysutils/ffs2recov probably to get back what you can. Eric From owner-freebsd-fs@FreeBSD.ORG Wed Mar 14 20:46:21 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87F1616A400 for ; Wed, 14 Mar 2007 20:46:21 +0000 (UTC) (envelope-from s.behrens@kon.de) Received: from mail.kon.de (mail.kon.de [81.88.34.125]) by mx1.freebsd.org (Postfix) with ESMTP id 3DEF513C44B for ; Wed, 14 Mar 2007 20:46:21 +0000 (UTC) (envelope-from s.behrens@kon.de) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.kon.de (Postfix) with ESMTP id 3AD85400F77FE; Wed, 14 Mar 2007 21:46:19 +0100 (CET) X-Virus-Scanned: spam-virus-check at kon.de Received: from mail.kon.de ([127.0.0.1]) by localhost (mail.kon.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id riDqWwGpi13S; Wed, 14 Mar 2007 21:46:18 +0100 (CET) Received: from [192.168.0.4] (dslb-084-060-042-131.pools.arcor-ip.net [84.60.42.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kon.de (Postfix) with ESMTP id 5A77D400F77FC; Wed, 14 Mar 2007 21:46:18 +0100 (CET) Message-ID: <45F85F1B.8050309@kon.de> Date: Wed, 14 Mar 2007 21:46:19 +0100 From: Stan Behrens User-Agent: Thunderbird 1.5.0.10 (X11/20070306) MIME-Version: 1.0 To: Eric Anderson References: <45F41514.1090304@kon.de> <45F84B8C.5030209@freebsd.org> In-Reply-To: <45F84B8C.5030209@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: fsck_ufs: cannot alloc %u bytes for inoinfo X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 20:46:21 -0000 Thanks for that hint. But it's not the dataloss which runs me writing here, it's this 3570453704 bytes (means 3.3 gigabytes of ram) it tries to alloc what confuses me. From owner-freebsd-fs@FreeBSD.ORG Wed Mar 14 22:13:40 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0507D16A4CB for ; Wed, 14 Mar 2007 22:13:40 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from noop.in-addr.com (noop.in-addr.com [208.58.23.51]) by mx1.freebsd.org (Postfix) with ESMTP id 980DC13C457 for ; Wed, 14 Mar 2007 22:13:39 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by noop.in-addr.com with local (Exim 4.54 (FreeBSD)) id 1HRbRy-0002q9-PP; Wed, 14 Mar 2007 17:56:02 -0400 Date: Wed, 14 Mar 2007 16:56:02 -0500 From: Gary Palmer To: Stan Behrens Message-ID: <20070314215602.GB32936@in-addr.com> Mail-Followup-To: Stan Behrens , freebsd-fs@freebsd.org References: <45F41514.1090304@kon.de> <45F84B8C.5030209@freebsd.org> <45F85F1B.8050309@kon.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45F85F1B.8050309@kon.de> Cc: freebsd-fs@freebsd.org Subject: Re: fsck_ufs: cannot alloc %u bytes for inoinfo X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 22:13:40 -0000 On Wed, Mar 14, 2007 at 09:46:19PM +0100, Stan Behrens wrote: > Thanks for that hint. > > But it's not the dataloss which runs me writing here, it's this 3570453704 > bytes (means 3.3 gigabytes of ram) it tries to alloc what confuses me. Don't be confused. You completely overwrote at least one cylinder group and probably the direct/indirect blocks relating to the root inode. Overwriting the CG alone is enough to make the fs unrecoverable through fsck, the further damage just adds more nails to the coffin. All that the error means is that fsck tried to read in the cylinder group, got a garbage value for the number of inodes in use and tried to allocate enough memory to handle that. Could fsck_ffs be smarter about recovering from this? Possibly. However, recovering a filesystem that go so thoroughly toasted is better left to specialised data recovery tools. Regards, Gary From owner-freebsd-fs@FreeBSD.ORG Thu Mar 15 06:58:58 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D7B516A401 for ; Thu, 15 Mar 2007 06:58:58 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from mgw-ext13.nokia.com (smtp.nokia.com [131.228.20.172]) by mx1.freebsd.org (Postfix) with ESMTP id C940913C455 for ; Thu, 15 Mar 2007 06:58:57 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-ext13.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l2F6wdOr027798; Thu, 15 Mar 2007 08:58:54 +0200 Received: from siebh102.NOE.Nokia.com ([172.30.195.29]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 15 Mar 2007 08:58:42 +0200 Received: from syebe101.NOE.Nokia.com ([172.30.128.65]) by siebh102.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 15 Mar 2007 14:56:41 +0800 Received: from [172.30.67.234] ([172.30.67.234]) by syebe101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 15 Mar 2007 17:56:39 +1100 Message-ID: <45F8EE27.6070208@nokia.com> Date: Thu, 15 Mar 2007 16:56:39 +1000 From: David Cecil User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: ext Pawel Jakub Dawidek References: <45F776AE.8090702@nokia.com> <20070314161041.GI7847@garage.freebsd.pl> In-Reply-To: <20070314161041.GI7847@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Mar 2007 06:56:39.0734 (UTC) FILETIME=[14D86D60:01C766CF] X-eXpurgate-Category: 1/0 X-eXpurgate-ID: 149371::070315085854-6B072BB0-265DF6C4/0-0/0-1 X-Nokia-AV: Clean Cc: freebsd-fs@FreeBSD.org Subject: Re: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2007 06:58:58 -0000 Hi Pawel, here is what I've found. Note that this problem doesn't occur frequently, but does happen often enough to be a problem. I am still debugging the live system. I put breakpoints in g_print_bio and g_io_request. I then continued until the breakpoint at g_print_bio breakpoint was hit, but each time g_io_request was hit, I printed the backtrace. Then, at g_print_bio I could identify the struct bio * and look for the corresponding g_io_request trace with a matching struct bio *. That trace looks like this: db> bt Tracing pid 47 tid 100050 td 0x860d0640 g_io_request(864258c4,860ec440,a0020024,98b92188,a5281bf0,...) at g_io_request+0x107 g_vfs_strategy(86104ce4,98b92188,a0020024,98b92188,86104c30,...) at g_vfs_strategy+0x63 ffs_geom_strategy(86104ce4,98b92188) at ffs_geom_strategy+0x129 bufwrite(98b92188,4000,98b92188,a5281c54,805b20c1,...) at bufwrite+0x146 ffs_bufwrite(98b92188) at ffs_bufwrite+0x282 vfs_bio_awrite(98b92188) at vfs_bio_awrite+0x221 vop_stdfsync(a5281cbc,a5281cbc,a5281c98,806eff3e,a5281cbc,...) at vop_stdfsync+0x121 devfs_fsync(a5281cbc) at devfs_fsync+0x23 VOP_FSYNC_APV(80795080,a5281cbc) at VOP_FSYNC_APV+0x7e sync_vnode(86104ce4,860d0640) at sync_vnode+0x100 sched_sync(0,a5281d38,0,805c068c,0,...) at sched_sync+0x1ed fork_exit(805c068c,0,a5281d38) at fork_exit+0xa0 fork_trampoline() at fork_trampoline+0x8 From ps, it identifies pid 47 as "syncer". So it appears that all I've discovered is that the syncer thread is writing all the dirty buffers for gm0s1a to the disk :-( I guess the question is, why are there any dirty buffers for the read-only partition? I think the partition was mounted rw for a short while during the boot process. Maybe something there that didn't get flushed? Or is it something internal to FFS? The output of ps is listed below. Note that some processes might differ from a standard FreeBSD system as we're modifying the code. As this problem seems to be generic to some FreeBSD systems, I thought it valid to pursue the problem here. I hope that's okay, and anticipate the fix would apply to FBSD, as I've seen what appears to be the same problem logged elsewhere. db> ps pid ppid pgrp uid state wmesg wchan cmd 856 841 856 0 S+ ttyin 0x858bd810 csh 841 1 841 0 Ss+ wait 0x8612f800 login 791 551 791 0 Ss select 0x8081231c sshd-x 790 551 790 0 Ss nanslp 0x807c6400 cron 789 551 789 0 Ss select 0x8081231c monitord 788 551 788 0 Ss select 0x8081231c snmpd 787 551 787 0 Ss select 0x8081231c clishd 785 551 785 0 Ss select 0x8081231c inetd 731 727 727 80 S accept 0x861cde7e httpd 730 727 727 80 S accept 0x861cde7e httpd 729 551 729 0 Ss select 0x8081231c ifm 728 551 728 0 Ss select 0x8081231c xpand 727 551 727 0 Ss select 0x8081231c httpd 725 551 725 0 Ss select 0x8081231c ipsrd 559 551 559 0 Ss select 0x8081231c syslogd 551 1 551 0 Ss select 0x8081231c pm 49 0 0 0 SL - 0xa5071d04 [schedcpu] 48 0 0 0 SL sdflush 0x808ca6cc [softdepflush] 47 0 0 0 SL syncer 0x807c5da4 [syncer] 46 0 0 0 SL vlruwt 0x860ce600 [vnlru] 45 0 0 0 SL psleep 0x8081276c [bufdaemon] 44 0 0 0 SL pgzero 0x808cb41c [pagezero] 43 0 0 0 SL psleep 0x808caf84 [vmdaemon] 42 0 0 0 SL psleep 0x808caf40 [pagedaemon] 41 0 0 0 SL m:w1 0x860a1800 [g_mirror gm0s1] 40 0 0 0 SL ip_inp 0x80854c00 [ip_in_0] 39 0 0 0 SL ip6_inpu 0x808c9560 [ip6 input [1]] 38 0 0 0 SL ip6_inpu 0x808c9560 [ip6 input [0]] 37 0 0 0 WL [swi0: sio] 36 0 0 0 WL [irq17: ichsmb0] 35 0 0 0 WL [irq18: atapci1] 34 0 0 0 WL [irq15: ata1] 33 0 0 0 WL [irq14: ata0] 32 0 0 0 SL usbevt 0x84b7d210 [usb2] 31 0 0 0 WL [irq23: ehci0] 30 0 0 0 SL usbevt 0x8588c210 [usb1] 29 0 0 0 WL [irq19: uhci1] 28 0 0 0 SL usbtsk 0x807c2c64 [usbtask] 27 0 0 0 SL usbevt 0x8587a210 [usb0] 26 0 0 0 WL [irq16: uhci0] 25 0 0 0 WL [irq144: cavium0] 24 0 0 0 SL cbb cv 0x84b7dbe4 [cbb1] 23 0 0 0 SL cbb cv 0x84b7f3e4 [cbb0] 22 0 0 0 WL [irq96: cbb0 cbb1] 21 0 0 0 WL [irq9: acpi0] 20 0 0 0 WL [swi5: +] 9 0 0 0 SL - 0x84b56bc0 [thread taskq] 19 0 0 0 WL [swi6: +] 18 0 0 0 WL [swi6: task queue] 8 0 0 0 SL - 0x84b56d00 [acpi_task2] 7 0 0 0 SL - 0x84b56d00 [acpi_task1] 6 0 0 0 SL - 0x84b56d00 [acpi_task0] 17 0 0 0 WL [swi2: cambio] 5 0 0 0 SL - 0x84b56e80 [kqueue taskq] 16 0 0 0 SL - 0x807c2440 [yarrow] 4 0 0 0 SL - 0x807c335c [g_down] 3 0 0 0 RL CPU 0 [g_up] 2 0 0 0 SL - 0x807c3350 [g_event] 15 0 0 0 WL [swi1: net] 14 0 0 0 WL [swi3: vm] 13 0 0 0 WL [swi4: clock sio] 12 0 0 0 RL [idle: cpu0] 11 0 0 0 RL CPU 1 [idle: cpu1] 1 0 1 0 SLs wait 0x84ac8e00 [init] 10 0 0 0 SL ktrace 0x807c4610 [ktrace] 0 0 0 0 WLs [swapper] One list member asked if I have mounted the root partition with noatime as well as ro. I have not specified noatime. It's worth noting that files in / are regularly read/accessed, as you'd expect, but this bug only occurs once a week or so on a number of machines. Thanks a lot for your time. Regards, Dave ext Pawel Jakub Dawidek wrote: > On Wed, Mar 14, 2007 at 02:14:38PM +1000, David Cecil wrote: > >> Hi, >> >> I have seen the following message (or equivalent) occasionally on a FreeBSD 6.1 system: >> g_vfs_done():mirror/gm0s1a[WRITE(offset=1349091328, length=16384)]error = 1 >> >> The partition in question is the root partition, and it is mounted read-only. I have verified that the problem occurs due to the write request returning EPERM due to the >> check in g_io_check: >> case BIO_WRITE: >> case BIO_DELETE: >> if (cp->acw == 0) >> return (EPERM); >> >> I have been trying to determine what within FFS would be trying to write to the partition. The "bio_from" in the bio structure indicates (in the geom) that it's >> ffs.mirror/gm0s1a that's trying to write. The contents of the buffer looks somewhat like a directory (lots of files listed, but comparison to the actual directory that >> contians these files reveals it's somewhat different), followed by a binary (ELF header). However, I'm at a loss to understand who's actually doing the writing. Is it >> coming from within FFS or is there an application that's done the write? (I can't understand how an application would be permitted to do it though.) >> >> I have seen this sort of problem (same error number) reported on the Internet occasionally, but it doesn't seem it's been satisfactorily resolved in all instances. >> >> Any help you can provide would be much appreciated. >> > > Will be good if you could place kdb_enter() into g_vfs_done() error path > and once in DDB try which processes wait for I/O and collect their > backtraces or just put output of 'alltrace' on some web page. > > -- Software Engineer Secure and Mobile Connectivity Nokia Enterprise Solutions +61 7 5553 8307 (office) +61 412 728 222 (cell) From owner-freebsd-fs@FreeBSD.ORG Thu Mar 15 09:00:52 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5BB6516A403; Thu, 15 Mar 2007 09:00:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.freebsd.org (Postfix) with ESMTP id B147013C448; Thu, 15 Mar 2007 09:00:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.227] (helo=fw.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.60) (envelope-from ) id 1HRlpB-000985-Ns; Thu, 15 Mar 2007 11:00:50 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id l2F90VF4097508 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Mar 2007 11:00:32 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id l2F90VTR062253; Thu, 15 Mar 2007 11:00:31 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id l2F90Vwt062252; Thu, 15 Mar 2007 11:00:31 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Mar 2007 11:00:31 +0200 From: Kostik Belousov To: David Cecil Message-ID: <20070315090031.GB80993@deviant.kiev.zoral.com.ua> References: <45F776AE.8090702@nokia.com> <20070314161041.GI7847@garage.freebsd.pl> <45F8EE27.6070208@nokia.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qcHopEYAB45HaUaB" Content-Disposition: inline In-Reply-To: <45F8EE27.6070208@nokia.com> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.7, clamav-milter version 0.88.7 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-0.1 required=5.0 tests=ALL_TRUSTED,SPF_NEUTRAL autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on fw.zoral.com.ua X-Scanner-Signature: 7c8287b6d6bc80c263c8a353e80fadf7 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 874 [Mar 15 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-fs@freebsd.org, Pawel Jakub Dawidek Subject: Re: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2007 09:00:52 -0000 --qcHopEYAB45HaUaB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 15, 2007 at 04:56:39PM +1000, David Cecil wrote: > Hi Pawel, >=20 > here is what I've found. Note that this problem doesn't occur=20 > frequently, but does happen often enough to be a problem. I am still=20 > debugging the live system. >=20 > I put breakpoints in g_print_bio and g_io_request. I then continued=20 > until the breakpoint at g_print_bio breakpoint was hit, but each time=20 > g_io_request was hit, I printed the backtrace. Then, at g_print_bio I=20 > could identify the struct bio * and look for the corresponding=20 > g_io_request trace with a matching struct bio *. >=20 > That trace looks like this: > db> bt > Tracing pid 47 tid 100050 td 0x860d0640 > g_io_request(864258c4,860ec440,a0020024,98b92188,a5281bf0,...) at=20 > g_io_request+0x107 > g_vfs_strategy(86104ce4,98b92188,a0020024,98b92188,86104c30,...) at=20 > g_vfs_strategy+0x63 > ffs_geom_strategy(86104ce4,98b92188) at ffs_geom_strategy+0x129 > bufwrite(98b92188,4000,98b92188,a5281c54,805b20c1,...) at bufwrite+0x146 > ffs_bufwrite(98b92188) at ffs_bufwrite+0x282 > vfs_bio_awrite(98b92188) at vfs_bio_awrite+0x221 > vop_stdfsync(a5281cbc,a5281cbc,a5281c98,806eff3e,a5281cbc,...) at=20 > vop_stdfsync+0x121 It would be helpful, at this frame, to print the actual vnode, as well as the dirty buffer header together with dump of buffer data. It seems that the easiest way to do that would be to obtain coredump and then use kgdb. > devfs_fsync(a5281cbc) at devfs_fsync+0x23 > VOP_FSYNC_APV(80795080,a5281cbc) at VOP_FSYNC_APV+0x7e > sync_vnode(86104ce4,860d0640) at sync_vnode+0x100 > sched_sync(0,a5281d38,0,805c068c,0,...) at sched_sync+0x1ed > fork_exit(805c068c,0,a5281d38) at fork_exit+0xa0 > fork_trampoline() at fork_trampoline+0x8 >=20 > From ps, it identifies pid 47 as "syncer". >=20 > So it appears that all I've discovered is that the syncer thread is=20 > writing all the dirty buffers for gm0s1a to the disk :-( I guess the=20 > question is, why are there any dirty buffers for the read-only=20 > partition? I think the partition was mounted rw for a short while=20 > during the boot process. Maybe something there that didn't get=20 > flushed? Or is it something internal to FFS? >=20 > The output of ps is listed below. Note that some processes might differ= =20 > from a standard FreeBSD system as we're modifying the code. As this=20 > problem seems to be generic to some FreeBSD systems, I thought it valid= =20 > to pursue the problem here. I hope that's okay, and anticipate the fix= =20 > would apply to FBSD, as I've seen what appears to be the same problem=20 > logged elsewhere. >=20 > db> ps > pid ppid pgrp uid state wmesg wchan cmd > 856 841 856 0 S+ ttyin 0x858bd810 csh > 841 1 841 0 Ss+ wait 0x8612f800 login > 791 551 791 0 Ss select 0x8081231c sshd-x > 790 551 790 0 Ss nanslp 0x807c6400 cron > 789 551 789 0 Ss select 0x8081231c monitord > 788 551 788 0 Ss select 0x8081231c snmpd > 787 551 787 0 Ss select 0x8081231c clishd > 785 551 785 0 Ss select 0x8081231c inetd > 731 727 727 80 S accept 0x861cde7e httpd > 730 727 727 80 S accept 0x861cde7e httpd > 729 551 729 0 Ss select 0x8081231c ifm > 728 551 728 0 Ss select 0x8081231c xpand > 727 551 727 0 Ss select 0x8081231c httpd > 725 551 725 0 Ss select 0x8081231c ipsrd > 559 551 559 0 Ss select 0x8081231c syslogd > 551 1 551 0 Ss select 0x8081231c pm > 49 0 0 0 SL - 0xa5071d04 [schedcpu] > 48 0 0 0 SL sdflush 0x808ca6cc [softdepflush] > 47 0 0 0 SL syncer 0x807c5da4 [syncer] > 46 0 0 0 SL vlruwt 0x860ce600 [vnlru] > 45 0 0 0 SL psleep 0x8081276c [bufdaemon] > 44 0 0 0 SL pgzero 0x808cb41c [pagezero] > 43 0 0 0 SL psleep 0x808caf84 [vmdaemon] > 42 0 0 0 SL psleep 0x808caf40 [pagedaemon] > 41 0 0 0 SL m:w1 0x860a1800 [g_mirror gm0s1] > 40 0 0 0 SL ip_inp 0x80854c00 [ip_in_0] > 39 0 0 0 SL ip6_inpu 0x808c9560 [ip6 input [1]] > 38 0 0 0 SL ip6_inpu 0x808c9560 [ip6 input [0]] > 37 0 0 0 WL [swi0: sio] > 36 0 0 0 WL [irq17: ichsmb0] > 35 0 0 0 WL [irq18: atapci1] > 34 0 0 0 WL [irq15: ata1] > 33 0 0 0 WL [irq14: ata0] > 32 0 0 0 SL usbevt 0x84b7d210 [usb2] > 31 0 0 0 WL [irq23: ehci0] > 30 0 0 0 SL usbevt 0x8588c210 [usb1] > 29 0 0 0 WL [irq19: uhci1] > 28 0 0 0 SL usbtsk 0x807c2c64 [usbtask] > 27 0 0 0 SL usbevt 0x8587a210 [usb0] > 26 0 0 0 WL [irq16: uhci0] > 25 0 0 0 WL [irq144: cavium0] > 24 0 0 0 SL cbb cv 0x84b7dbe4 [cbb1] > 23 0 0 0 SL cbb cv 0x84b7f3e4 [cbb0] > 22 0 0 0 WL [irq96: cbb0 cbb1] > 21 0 0 0 WL [irq9: acpi0] > 20 0 0 0 WL [swi5: +] > 9 0 0 0 SL - 0x84b56bc0 [thread taskq] > 19 0 0 0 WL [swi6: +] > 18 0 0 0 WL [swi6: task queue] > 8 0 0 0 SL - 0x84b56d00 [acpi_task2] > 7 0 0 0 SL - 0x84b56d00 [acpi_task1] > 6 0 0 0 SL - 0x84b56d00 [acpi_task0] > 17 0 0 0 WL [swi2: cambio] > 5 0 0 0 SL - 0x84b56e80 [kqueue taskq] > 16 0 0 0 SL - 0x807c2440 [yarrow] > 4 0 0 0 SL - 0x807c335c [g_down] > 3 0 0 0 RL CPU 0 [g_up] > 2 0 0 0 SL - 0x807c3350 [g_event] > 15 0 0 0 WL [swi1: net] > 14 0 0 0 WL [swi3: vm] > 13 0 0 0 WL [swi4: clock sio] > 12 0 0 0 RL [idle: cpu0] > 11 0 0 0 RL CPU 1 [idle: cpu1] > 1 0 1 0 SLs wait 0x84ac8e00 [init] > 10 0 0 0 SL ktrace 0x807c4610 [ktrace] > 0 0 0 0 WLs [swapper] >=20 > One list member asked if I have mounted the root partition with noatime= =20 > as well as ro. I have not specified noatime. It's worth noting that=20 > files in / are regularly read/accessed, as you'd expect, but this bug=20 > only occurs once a week or so on a number of machines. >=20 > Thanks a lot for your time. >=20 > Regards, > Dave >=20 > ext Pawel Jakub Dawidek wrote: > >On Wed, Mar 14, 2007 at 02:14:38PM +1000, David Cecil wrote: > > =20 > >>Hi, > >> > >>I have seen the following message (or equivalent) occasionally on a=20 > >>FreeBSD 6.1 system: > >>g_vfs_done():mirror/gm0s1a[WRITE(offset=3D1349091328, length=3D16384)]e= rror =3D=20 > >>1 > >> > >>The partition in question is the root partition, and it is mounted=20 > >>read-only. I have verified that the problem occurs due to the write=20 > >>request returning EPERM due to the check in g_io_check: > >>case BIO_WRITE: > >>case BIO_DELETE: > >> if (cp->acw =3D=3D 0) > >> return (EPERM); > >> > >>I have been trying to determine what within FFS would be trying to writ= e=20 > >>to the partition. The "bio_from" in the bio structure indicates (in th= e=20 > >>geom) that it's ffs.mirror/gm0s1a that's trying to write. The contents= =20 > >>of the buffer looks somewhat like a directory (lots of files listed, bu= t=20 > >>comparison to the actual directory that contians these files reveals it= 's=20 > >>somewhat different), followed by a binary (ELF header). However, I'm a= t=20 > >>a loss to understand who's actually doing the writing. Is it coming fr= om=20 > >>within FFS or is there an application that's done the write? (I can't= =20 > >>understand how an application would be permitted to do it though.) > >> > >>I have seen this sort of problem (same error number) reported on the=20 > >>Internet occasionally, but it doesn't seem it's been satisfactorily=20 > >>resolved in all instances. > >> > >>Any help you can provide would be much appreciated. > >> =20 > > > >Will be good if you could place kdb_enter() into g_vfs_done() error path > >and once in DDB try which processes wait for I/O and collect their > >backtraces or just put output of 'alltrace' on some web page. > > > > =20 >=20 >=20 > --=20 > Software Engineer > Secure and Mobile Connectivity > Nokia Enterprise Solutions > +61 7 5553 8307 (office) > +61 412 728 222 (cell) >=20 > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" --qcHopEYAB45HaUaB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFF+QsuC3+MBN1Mb4gRAoUzAKCtaA3JA8mLU9K2xE5iJnaSojyOVwCdH6uy mmrcLNQXhl9I3ywn4F32qIw= =FJAx -----END PGP SIGNATURE----- --qcHopEYAB45HaUaB-- From owner-freebsd-fs@FreeBSD.ORG Thu Mar 15 09:27:14 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A526D16A400 for ; Thu, 15 Mar 2007 09:27:14 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 0154F13C45A for ; Thu, 15 Mar 2007 09:27:13 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 8A51A456B1; Thu, 15 Mar 2007 10:27:12 +0100 (CET) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id C058745681; Thu, 15 Mar 2007 10:27:04 +0100 (CET) Date: Thu, 15 Mar 2007 10:26:59 +0100 From: Pawel Jakub Dawidek To: Kostik Belousov Message-ID: <20070315092659.GA14080@garage.freebsd.pl> References: <45F776AE.8090702@nokia.com> <20070314161041.GI7847@garage.freebsd.pl> <45F8EE27.6070208@nokia.com> <20070315090031.GB80993@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline In-Reply-To: <20070315090031.GB80993@deviant.kiev.zoral.com.ua> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@freebsd.org Subject: Re: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2007 09:27:14 -0000 --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 15, 2007 at 11:00:31AM +0200, Kostik Belousov wrote: > On Thu, Mar 15, 2007 at 04:56:39PM +1000, David Cecil wrote: > > Hi Pawel, > >=20 > > here is what I've found. Note that this problem doesn't occur=20 > > frequently, but does happen often enough to be a problem. I am still= =20 > > debugging the live system. > >=20 > > I put breakpoints in g_print_bio and g_io_request. I then continued=20 > > until the breakpoint at g_print_bio breakpoint was hit, but each time= =20 > > g_io_request was hit, I printed the backtrace. Then, at g_print_bio I= =20 > > could identify the struct bio * and look for the corresponding=20 > > g_io_request trace with a matching struct bio *. > >=20 > > That trace looks like this: > > db> bt > > Tracing pid 47 tid 100050 td 0x860d0640 > > g_io_request(864258c4,860ec440,a0020024,98b92188,a5281bf0,...) at=20 > > g_io_request+0x107 > > g_vfs_strategy(86104ce4,98b92188,a0020024,98b92188,86104c30,...) at=20 > > g_vfs_strategy+0x63 > > ffs_geom_strategy(86104ce4,98b92188) at ffs_geom_strategy+0x129 > > bufwrite(98b92188,4000,98b92188,a5281c54,805b20c1,...) at bufwrite+0x146 > > ffs_bufwrite(98b92188) at ffs_bufwrite+0x282 > > vfs_bio_awrite(98b92188) at vfs_bio_awrite+0x221 > > vop_stdfsync(a5281cbc,a5281cbc,a5281c98,806eff3e,a5281cbc,...) at=20 > > vop_stdfsync+0x121 > It would be helpful, at this frame, to print the actual vnode, as well as > the dirty buffer header together with dump of buffer data. [...] This comes from devfs_fsync(), so I suspect it's devvp, and we are synchronizing entire file system here. > [...] It seems that > the easiest way to do that would be to obtain coredump and then use kgdb. On successfull remount to read-only we could walk (under DIAGNOSTIC) the list of vnodes and assert there are no dirty buffers, but I don't think this is the case... The thing that worries me is that it doesn't happen from what I understand just after remount to read-only. Syncer wakeups every 30 seconds by default, right? So it should generates errors on first time he synchronizes file system. Which bascially means, that something tries to write to read-only file system later. Will be good to assert it somehow earlier. One thing that comes to my mind is to assert: KASSERT(((struct g_consumer *)buf->b_bufobj.bo_private)->acw > 0); in each b*write() function. This is probably not the only way to write to a file system... I still don't feel too familiar with the code, so not sure if my comments are usable:) how-to-reproduce procedure would be the best of course... David, do you use something which can be considered non-standard, like snapshots? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF+RFjForvXbEpPzQRAvYiAJ0ZU4xcQbTA3uh4g/DGPrWoVdiHLgCgmK1y hWJIJkQGGSwy3KHE4zlnPCY= =Wcdo -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM-- From owner-freebsd-fs@FreeBSD.ORG Thu Mar 15 10:55:21 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23A2316A407; Thu, 15 Mar 2007 10:55:21 +0000 (UTC) (envelope-from etc@fluffles.net) Received: from auriate.fluffles.net (cust.95.160.adsl.cistron.nl [195.64.95.160]) by mx1.freebsd.org (Postfix) with ESMTP id C76D213C469; Thu, 15 Mar 2007 10:55:20 +0000 (UTC) (envelope-from etc@fluffles.net) Received: from destiny ([10.0.0.21]) by auriate.fluffles.net with esmtpa (Exim 4.63 (FreeBSD)) (envelope-from ) id 1HRn0J-0006sJ-G1; Thu, 15 Mar 2007 11:16:15 +0100 Message-ID: <45F91CF0.6010506@fluffles.net> Date: Thu, 15 Mar 2007 11:16:16 +0100 From: Fluffles User-Agent: Thunderbird 1.5.0.8 (X11/20061114) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= References: <20070120073117.GB60202@x12.dk> <200703061246.09687.antik@bsd.ee> <45ED5850.6050506@nipsi.de> <200703061420.36980.antik@bsd.ee> <20070307135017.GC2864@garage.freebsd.pl> <45F2EEBD.6070007@barryp.org> <86ps7evniu.fsf@dwp.des.no> In-Reply-To: <86ps7evniu.fsf@dwp.des.no> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-fs@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-questions@FreeBSD.org Subject: boot2 can't boot from USB? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2007 10:55:21 -0000 Dag-Erling Smørgrav wrote: > Barry Pederson writes: > >> Is there any hope for someday optionally using ZFS as a root filesystem? >> > > For that to be possible, both /boot/boot2 and /boot/loader need to > understand ZFS well enough to read files from it. There isn't much > room to spare in /boot/boot2, so we'd have to have a separate version > for ZFS and teach 'disklabel -B' how to pick the right one. > Sorry if this is offtopic. Am i right to assume that: - boot0 and boot1 both read from the disk via BIOS - boot2 tries to read from the disk directly, without BIOS ? If so, i may have found some bugs / problems with boot2. Long ago i tried to make a bootable USB pendrive with FreeBSD 6.1 on it. It failed to boot with the message "invalid slice" and i got a prompt like: FreeBSD/i386 BOOT Default: 0:ad(0,a)/boot/loader boot: Whatever i tried, it fails to load "Loader" or the kernel. Later, i tried FreeNAS which enables the user to write an image to an USB pendrive which contains a bootable FreeNAS installation. The copying went ok, but i got the same boot problem. I then tried it on three different systems with two different USB pendrives and they all had the same problem. All of the systems supported USB boot, and it does actually boot from USB how else could i see that FreeBSD boot prompt? Some systems are brand new: dualcore SLI motherboards, etc. It appears to me the boot2 program fails to read from USB. boot0 and boot1 appear not to have this problem since it uses the BIOS to read from the disk. Is this correct? Are USB boot problems by boot2 known, should i file a PR? Thanks, - Veronica From owner-freebsd-fs@FreeBSD.ORG Thu Mar 15 11:11:22 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.ORG Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 780B916A406; Thu, 15 Mar 2007 11:11:22 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id 0BB6613C458; Thu, 15 Mar 2007 11:11:21 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lclejq@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l2FBB9C0006935; Thu, 15 Mar 2007 12:11:14 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l2FBB9ah006934; Thu, 15 Mar 2007 12:11:09 +0100 (CET) (envelope-from olli) Date: Thu, 15 Mar 2007 12:11:09 +0100 (CET) Message-Id: <200703151111.l2FBB9ah006934@lurza.secnetix.de> From: Oliver Fromme To: freebsd-fs@FreeBSD.ORG, etc@fluffles.net, Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= , freebsd-bugs@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG In-Reply-To: X-Newsgroups: list.freebsd-fs User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 15 Mar 2007 12:11:15 +0100 (CET) Cc: Subject: Re: boot2 can't boot from USB? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-fs@FreeBSD.ORG, Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= , freebsd-bugs@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2007 11:11:22 -0000 Fluffles wrote: > Sorry if this is offtopic. Am i right to assume that: > - boot0 and boot1 both read from the disk via BIOS > - boot2 tries to read from the disk directly, without BIOS > ? No, only the kernel contains drivers that are independent from the BIOS. Everything else (the boot* blocks and /boot/loader) use BIOS calls. > If so, i may have found some bugs / problems with boot2. Long ago i > tried to make a bootable USB pendrive with FreeBSD 6.1 on it. It failed > to boot with the message "invalid slice" and i got a prompt like: > > FreeBSD/i386 BOOT > Default: 0:ad(0,a)/boot/loader > boot: > > Whatever i tried, it fails to load "Loader" or the kernel. Later, i > tried FreeNAS which enables the user to write an image to an USB > pendrive which contains a bootable FreeNAS installation. The copying > went ok, but i got the same boot problem. I then tried it on three > different systems with two different USB pendrives and they all had the > same problem. All of the systems supported USB boot, and it does > actually boot from USB how else could i see that FreeBSD boot prompt? > Some systems are brand new: dualcore SLI motherboards, etc. > > It appears to me the boot2 program fails to read from USB. boot0 and > boot1 appear not to have this problem since it uses the BIOS to read > from the disk. Is this correct? No, see above, they all use the BIOS. The difference is that boot2 needs to understand UFS, locate the correct slice and partition with /boot/loader in it and load it. The earlier boot blocks are relatively dumb and only know how to load boot2 from a fixed location on the media. So, if boot2 doesn't work for you, it's probably unable to locate your FreeBSD slice and/or partition. How did you create them? (Another difference is that boot2 enters protected mode in order to be able to access memory above 1 MB, while the earlier boot blocks use pure real mode. But that should not be related to the problem that you see.) > Are USB boot problems by boot2 known, should i file a PR? boot2 doesn't know about USB at all. It only knows about BIOS-accessible drives (which may include USB drives if that's enabled in the BIOS setup). Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead." -- RFC 1925 From owner-freebsd-fs@FreeBSD.ORG Thu Mar 15 12:10:24 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2694B16A417 for ; Thu, 15 Mar 2007 12:10:24 +0000 (UTC) (envelope-from freebsd-fs@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id CD74413C44C for ; Thu, 15 Mar 2007 12:10:23 +0000 (UTC) (envelope-from freebsd-fs@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HRomU-0004cP-82 for freebsd-fs@freebsd.org; Thu, 15 Mar 2007 13:10:06 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Mar 2007 13:10:06 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Mar 2007 13:10:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-fs@freebsd.org From: Ivan Voras Date: Thu, 15 Mar 2007 13:09:52 +0100 Lines: 26 Message-ID: References: <20070120073117.GB60202@x12.dk> <200703061246.09687.antik@bsd.ee> <45ED5850.6050506@nipsi.de> <200703061420.36980.antik@bsd.ee> <20070307135017.GC2864@garage.freebsd.pl> <45F2EEBD.6070007@barryp.org> <86ps7evniu.fsf@dwp.des.no> <45F91CF0.6010506@fluffles.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 1.5.0.10 (X11/20060911) In-Reply-To: <45F91CF0.6010506@fluffles.net> Sender: news Cc: freebsd-bugs@freebsd.org, freebsd-questions@freebsd.org Subject: Re: boot2 can't boot from USB? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2007 12:10:24 -0000 Fluffles wrote: > If so, i may have found some bugs / problems with boot2. Long ago i > tried to make a bootable USB pendrive with FreeBSD 6.1 on it. It failed > to boot with the message "invalid slice" and i got a prompt like: > > FreeBSD/i386 BOOT > Default: 0:ad(0,a)/boot/loader > boot: > It appears to me the boot2 program fails to read from USB. boot0 and > boot1 appear not to have this problem since it uses the BIOS to read > from the disk. Is this correct? > Are USB boot problems by boot2 known, should i file a PR? As people said, early boot stages can read from anything that has BIOS support. If you have SCSI cards you might see messages like "Installing BIOS firmware as drive 0x80" - this is the part that allows you to boot from such devices. Some BIOSes have built-in support for USB media, some don't. Those that do might emulate the media as a "SCSI-ish" drive or as a floppy, and might or might not make an error in the drives "geometry". OTOH, it might be boot2's fault. Maybe you could try sysutils/extipl boot loader. From owner-freebsd-fs@FreeBSD.ORG Thu Mar 15 21:33:11 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7A9616A402 for ; Thu, 15 Mar 2007 21:33:11 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.200.82]) by mx1.freebsd.org (Postfix) with ESMTP id 56A3413C43E for ; Thu, 15 Mar 2007 21:33:11 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from c-66-31-35-94.hsd1.ma.comcast.net (c-71-192-57-29.hsd1.ma.comcast.net[71.192.57.29](misconfigured sender)) by comcast.net (sccrmhc12) with ESMTP id <20070315213306012008qe54e>; Thu, 15 Mar 2007 21:33:10 +0000 Received: from dibbler.crodrigues.org (localhost.crodrigues.org [127.0.0.1]) by c-66-31-35-94.hsd1.ma.comcast.net (8.13.8/8.13.8) with ESMTP id l2FLVUcr011192; Thu, 15 Mar 2007 17:32:05 -0400 (EDT) (envelope-from rodrigc@c-71-192-57-29.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by dibbler.crodrigues.org (8.13.8/8.13.8/Submit) id l2FLVT76011191; Thu, 15 Mar 2007 17:31:29 -0400 (EDT) (envelope-from rodrigc) Date: Thu, 15 Mar 2007 17:30:45 -0400 From: Craig Rodrigues To: Fluffles Message-ID: <20070315213045.GA11147@crodrigues.org> References: <20070120073117.GB60202@x12.dk> <200703061246.09687.antik@bsd.ee> <45ED5850.6050506@nipsi.de> <200703061420.36980.antik@bsd.ee> <20070307135017.GC2864@garage.freebsd.pl> <45F2EEBD.6070007@barryp.org> <86ps7evniu.fsf@dwp.des.no> <45F91CF0.6010506@fluffles.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45F91CF0.6010506@fluffles.net> User-Agent: Mutt/1.4.2.1i Cc: freebsd-fs@freebsd.org, freebsd-bugs@freebsd.org, freebsd-questions@freebsd.org Subject: Re: boot2 can't boot from USB? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2007 21:33:11 -0000 On Thu, Mar 15, 2007 at 11:16:16AM +0100, Fluffles wrote: > If so, i may have found some bugs / problems with boot2. Long ago i > tried to make a bootable USB pendrive with FreeBSD 6.1 on it. It failed > to boot with the message "invalid slice" and i got a prompt like: I have worked a lot with getting FreeBSD to boot off of USB devices, and have gotten it to work. Specifically, I have worked with USB pen drives, and USB CD-ROM drives. It *is* possible, but what I have found is the following: - on some motherboards, you need to explicitly configure the BIOS to boot off of a USB device (either a disk, a CD-ROM, or a "Zip drive") - booting off of USB-CDROM devices seems to be much more reliable than booting off of USB pen drives - if you have an "older" motherboard BIOS, say from about 3-4 years ago, booting off of USB devices is more unreliable, than a "newer" motherboard BIOS - if I have 5 different models of USB pen drives, each model may behave differently, and may or may not boot. Same for USB CD-ROM drives, but I've found CD-ROM drives to be more reliable than pen drives. So to summarize: - booting off of USB devices seems to be sensitive to your motherboard BIOS, and the firmware written into your USB device. - booting off of USB CD-ROM drives seems to be more reliable than booting off of USB pen drives There is no logic to this, I've just found this out from trial and error, and banging my head a lot. -- Craig Rodrigues rodrigc@crodrigues.org From owner-freebsd-fs@FreeBSD.ORG Thu Mar 15 22:33:34 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB9F416A400; Thu, 15 Mar 2007 22:33:33 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from mgw-ext12.nokia.com (smtp.nokia.com [131.228.20.171]) by mx1.freebsd.org (Postfix) with ESMTP id 793A913C448; Thu, 15 Mar 2007 22:33:33 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from esebh108.NOE.Nokia.com (esebh108.ntc.nokia.com [172.21.143.145]) by mgw-ext12.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l2FMXHGh008456; Fri, 16 Mar 2007 00:33:30 +0200 Received: from siebh101.NOE.Nokia.com ([172.30.195.27]) by esebh108.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Mar 2007 00:33:30 +0200 Received: from syebe101.NOE.Nokia.com ([172.30.128.65]) by siebh101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Mar 2007 06:33:27 +0800 Received: from [172.30.67.240] ([172.30.67.240]) by syebe101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Mar 2007 09:33:25 +1100 Message-ID: <45F9C9B4.4030508@nokia.com> Date: Fri, 16 Mar 2007 08:33:24 +1000 From: David Cecil User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: ext Pawel Jakub Dawidek References: <45F776AE.8090702@nokia.com> <20070314161041.GI7847@garage.freebsd.pl> <45F8EE27.6070208@nokia.com> <20070315090031.GB80993@deviant.kiev.zoral.com.ua> <20070315092659.GA14080@garage.freebsd.pl> In-Reply-To: <20070315092659.GA14080@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Mar 2007 22:33:25.0891 (UTC) FILETIME=[F2535D30:01C76751] X-eXpurgate-Category: 1/0 X-eXpurgate-ID: 149371::070316003330-1D180BB0-4EBCD686/0-0/0-1 X-Nokia-AV: Clean Cc: freebsd-fs@FreeBSD.org Subject: Re: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2007 22:33:34 -0000 Hi guys, > On Thu, Mar 15, 2007 at 11:00:31AM +0200, Kostik Belousov wrote: > >> On Thu, Mar 15, 2007 at 04:56:39PM +1000, David Cecil wrote: >> >>> Hi Pawel, >>> >>> here is what I've found. Note that this problem doesn't occur >>> frequently, but does happen often enough to be a problem. I am still >>> debugging the live system. >>> >>> I put breakpoints in g_print_bio and g_io_request. I then continued >>> until the breakpoint at g_print_bio breakpoint was hit, but each time >>> g_io_request was hit, I printed the backtrace. Then, at g_print_bio I >>> could identify the struct bio * and look for the corresponding >>> g_io_request trace with a matching struct bio *. >>> >>> That trace looks like this: >>> db> bt >>> Tracing pid 47 tid 100050 td 0x860d0640 >>> g_io_request(864258c4,860ec440,a0020024,98b92188,a5281bf0,...) at >>> g_io_request+0x107 >>> g_vfs_strategy(86104ce4,98b92188,a0020024,98b92188,86104c30,...) at >>> g_vfs_strategy+0x63 >>> ffs_geom_strategy(86104ce4,98b92188) at ffs_geom_strategy+0x129 >>> bufwrite(98b92188,4000,98b92188,a5281c54,805b20c1,...) at bufwrite+0x146 >>> ffs_bufwrite(98b92188) at ffs_bufwrite+0x282 >>> vfs_bio_awrite(98b92188) at vfs_bio_awrite+0x221 >>> vop_stdfsync(a5281cbc,a5281cbc,a5281c98,806eff3e,a5281cbc,...) at >>> vop_stdfsync+0x121 >>> >> It would be helpful, at this frame, to print the actual vnode, as well as >> the dirty buffer header together with dump of buffer data. [...] >> > > This comes from devfs_fsync(), so I suspect it's devvp, and we are > synchronizing entire file system here. > I think my interpretation corresponds with yours. The loop in vop_stdfsync is syncing the dirty buffers associated with the vnode that maps to /dev/mirror/gm0s1a >> [...] It seems that >> the easiest way to do that would be to obtain coredump and then use kgdb. >> > > On successfull remount to read-only we could walk (under DIAGNOSTIC) the > list of vnodes and assert there are no dirty buffers, but I don't think > this is the case... > I am still debugging the system in ddb, so I assume I could do that now. > The thing that worries me is that it doesn't happen from what I > understand just after remount to read-only. Syncer wakeups every 30 > seconds by default, right? Yes. > So it should generates errors on first time > he synchronizes file system. Which bascially means, that something tries > to write to read-only file system later. Will be good to assert it > somehow earlier. One thing that comes to my mind is to assert: > > KASSERT(((struct g_consumer *)buf->b_bufobj.bo_private)->acw > 0); > > in each b*write() function. This is probably not the only way to write > to a file system... > Okay, that's something for me to bear in mind. I as trying to get as much from the ddb session as I can, before rebooting and trying kernel mods. This problem occurs frequently enough to be annoying, but not so frequently that it's easy to reproduce. > I still don't feel too familiar with the code, so not sure if my > comments are usable:) how-to-reproduce procedure would be the best of > course... David, do you use something which can be considered > non-standard, like snapshots? > It may be that snapshots are used, but not explicitly. The startup scripts attempt to run fsck in the background, which would normally require a snapshot, but shouldn't for a read-only mount, right? I can't think of anything else that's different to standard in this area (FFS/GEOM)... Regards, Dave -- Software Engineer Secure and Mobile Connectivity Nokia Enterprise Solutions +61 7 5553 8307 (office) +61 412 728 222 (cell) From owner-freebsd-fs@FreeBSD.ORG Thu Mar 15 22:36:42 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4CEE416A404; Thu, 15 Mar 2007 22:36:42 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 39C2C13C469; Thu, 15 Mar 2007 22:36:42 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 1B13E1A4D8D; Thu, 15 Mar 2007 15:36:42 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 666DC5187D; Thu, 15 Mar 2007 18:36:41 -0400 (EDT) Date: Thu, 15 Mar 2007 18:36:41 -0400 From: Kris Kennaway To: David Cecil Message-ID: <20070315223641.GA89923@xor.obsecurity.org> References: <45F776AE.8090702@nokia.com> <20070314161041.GI7847@garage.freebsd.pl> <45F8EE27.6070208@nokia.com> <20070315090031.GB80993@deviant.kiev.zoral.com.ua> <20070315092659.GA14080@garage.freebsd.pl> <45F9C9B4.4030508@nokia.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: <45F9C9B4.4030508@nokia.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-fs@FreeBSD.org, ext Pawel Jakub Dawidek Subject: Re: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2007 22:36:42 -0000 --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 16, 2007 at 08:33:24AM +1000, David Cecil wrote: > It may be that snapshots are used, but not explicitly. The startup=20 > scripts attempt to run fsck in the background, which would normally=20 > require a snapshot, but shouldn't for a read-only mount, right? What happens if the filesystem is marked dirty, background fsck is enabled, but the filesystem is mounted read-only? Kris --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF+cp4Wry0BWjoQKURAgDIAJ0Sd8EDr3FSlRCGSxWV0xNRttRahgCfeRrw /IYw2/JCNWSaPmNTN6R3sFw= =d40C -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G-- From owner-freebsd-fs@FreeBSD.ORG Thu Mar 15 22:43:08 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2CE316A402; Thu, 15 Mar 2007 22:43:08 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from mgw-ext13.nokia.com (smtp.nokia.com [131.228.20.172]) by mx1.freebsd.org (Postfix) with ESMTP id 3521913C484; Thu, 15 Mar 2007 22:43:07 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from esebh108.NOE.Nokia.com (esebh108.ntc.nokia.com [172.21.143.145]) by mgw-ext13.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l2FMgilN009965; Fri, 16 Mar 2007 00:43:06 +0200 Received: from siebh102.NOE.Nokia.com ([172.30.195.29]) by esebh108.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Mar 2007 00:42:36 +0200 Received: from syebe101.NOE.Nokia.com ([172.30.128.65]) by siebh102.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Mar 2007 06:42:32 +0800 Received: from [172.30.67.240] ([172.30.67.240]) by syebe101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Mar 2007 09:42:22 +1100 Message-ID: <45F9CBCC.7050006@nokia.com> Date: Fri, 16 Mar 2007 08:42:20 +1000 From: David Cecil User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: ext Kris Kennaway References: <45F776AE.8090702@nokia.com> <20070314161041.GI7847@garage.freebsd.pl> <45F8EE27.6070208@nokia.com> <20070315090031.GB80993@deviant.kiev.zoral.com.ua> <20070315092659.GA14080@garage.freebsd.pl> <45F9C9B4.4030508@nokia.com> <20070315223641.GA89923@xor.obsecurity.org> In-Reply-To: <20070315223641.GA89923@xor.obsecurity.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Mar 2007 22:42:22.0787 (UTC) FILETIME=[32573130:01C76753] X-Nokia-AV: Clean Cc: freebsd-fs@FreeBSD.org, ext Pawel Jakub Dawidek Subject: Re: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2007 22:43:08 -0000 >> It may be that snapshots are used, but not explicitly. The startup >> scripts attempt to run fsck in the background, which would normally >> require a snapshot, but shouldn't for a read-only mount, right? >> > > What happens if the filesystem is marked dirty, background fsck is > enabled, but the filesystem is mounted read-only? > Yeah, I was wondering the same thing Kris. In fact, that was one of my first suspects when I started looking at this problem. I had eliminated it because fstat (and ps in ddb) doesn't show fsck running, or the raw device open for writing. Maybe fsck had already closed the descriptor and exited but the write to disk (GEOM mirror) is still outstanding in the buffer cache? Dave -- Software Engineer Secure and Mobile Connectivity Nokia Enterprise Solutions +61 7 5553 8307 (office) +61 412 728 222 (cell) From owner-freebsd-fs@FreeBSD.ORG Thu Mar 15 23:46:20 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C60D316A402; Thu, 15 Mar 2007 23:46:20 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from mgw-ext13.nokia.com (smtp.nokia.com [131.228.20.172]) by mx1.freebsd.org (Postfix) with ESMTP id 5192713C458; Thu, 15 Mar 2007 23:46:20 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from esebh107.NOE.Nokia.com (esebh107.ntc.nokia.com [172.21.143.143]) by mgw-ext13.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l2FNk1JF025872; Fri, 16 Mar 2007 01:46:17 +0200 Received: from siebh102.NOE.Nokia.com ([172.30.195.29]) by esebh107.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Mar 2007 01:46:08 +0200 Received: from syebe101.NOE.Nokia.com ([172.30.128.65]) by siebh102.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Mar 2007 07:46:05 +0800 Received: from [172.30.67.240] ([172.30.67.240]) by syebe101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Mar 2007 10:46:03 +1100 Message-ID: <45F9DABB.9080205@nokia.com> Date: Fri, 16 Mar 2007 09:46:03 +1000 From: David Cecil User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: ext Pawel Jakub Dawidek References: <45F776AE.8090702@nokia.com> <20070314161041.GI7847@garage.freebsd.pl> <45F8EE27.6070208@nokia.com> <20070315090031.GB80993@deviant.kiev.zoral.com.ua> <20070315092659.GA14080@garage.freebsd.pl> In-Reply-To: <20070315092659.GA14080@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Mar 2007 23:46:03.0823 (UTC) FILETIME=[17DB03F0:01C7675C] X-eXpurgate-Category: 1/0 X-eXpurgate-ID: 149371::070316014618-5FE4DBB0-0EFEE989/0-0/0-1 X-Nokia-AV: Clean Cc: freebsd-fs@FreeBSD.org Subject: Re: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2007 23:46:20 -0000 > I still don't feel too familiar with the code, so not sure if my > comments are usable:) how-to-reproduce procedure would be the best of > course... David, do you use something which can be considered > non-standard, like snapshots? > I had been renaming the name of the mirror and the root mount point in an effort to keep the explanations shorter and less confusing, but I won't do that any more. The / partition is actually on "f" not "a", and the mirror is called "gmroots1" not gm0s1. Something that might be of interest, from the output of mount (snipped for brevity): # mount /dev/mirror/gmroots1f on / (ufs, local, read-only, soft-updates) devfs on /dev (devfs, local) Yes, soft-updates are on for /, but I've seen this problem (same partition, same error code) when they have not been on. # bsdlabel /dev/mirror/gmroots1 # /dev/mirror/gmroots1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 80325 0 4.2BSD 2048 16384 5024 b: 4194304 80325 swap c: 74231135 0 unused 0 0 # "raw" part, don't edit d: 55738981 8483659 4.2BSD 2048 16384 28552 e: 10008495 64222640 4.2BSD 2048 16384 28552 f: 4209030 4274629 4.2BSD 2048 16384 28552 Regards, Dave -- Software Engineer Secure and Mobile Connectivity Nokia Enterprise Solutions +61 7 5553 8307 (office) +61 412 728 222 (cell) From owner-freebsd-fs@FreeBSD.ORG Fri Mar 16 01:48:59 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A66016A406 for ; Fri, 16 Mar 2007 01:48:59 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 0616813C44C for ; Fri, 16 Mar 2007 01:48:58 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 4156C4569A; Fri, 16 Mar 2007 02:48:57 +0100 (CET) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id EB49345684; Fri, 16 Mar 2007 02:48:51 +0100 (CET) Date: Fri, 16 Mar 2007 02:48:46 +0100 From: Pawel Jakub Dawidek To: David Cecil Message-ID: <20070316014846.GA3229@garage.freebsd.pl> References: <45F776AE.8090702@nokia.com> <20070314161041.GI7847@garage.freebsd.pl> <45F8EE27.6070208@nokia.com> <20070315090031.GB80993@deviant.kiev.zoral.com.ua> <20070315092659.GA14080@garage.freebsd.pl> <45F9C9B4.4030508@nokia.com> <20070315223641.GA89923@xor.obsecurity.org> <45F9CBCC.7050006@nokia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <45F9CBCC.7050006@nokia.com> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@FreeBSD.org, ext Kris Kennaway Subject: Re: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2007 01:48:59 -0000 --9amGYk9869ThD9tj Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 16, 2007 at 08:42:20AM +1000, David Cecil wrote: >=20 > >>It may be that snapshots are used, but not explicitly. The startup scr= ipts attempt to run fsck in the background, which would normally require a = snapshot, but shouldn't=20 > >>for a read-only mount, right? > >> =20 > > > >What happens if the filesystem is marked dirty, background fsck is > >enabled, but the filesystem is mounted read-only? > > =20 >=20 > Yeah, I was wondering the same thing Kris. In fact, that was one of my f= irst suspects when I started looking at this problem. >=20 > I had eliminated it because fstat (and ps in ddb) doesn't show fsck runni= ng, or the raw device open for writing. Maybe fsck had already closed the = descriptor and exited=20 > but the write to disk (GEOM mirror) is still outstanding in the buffer ca= che? Is the offset always the same for this error you're seeing? Maybe some dirty buffer isn't flushed on disk properly and syncer retries syncing it every now and then. This would explain why you see it not only early after system was booted. Could you try disabling bgfsck, by setting background_fsck=3D"NO" to your /etc/rc.conf? I know that there is a hack for handling fsck of the root file system. Bascially once system is mounted read-only (the partition it resides on is opened read-only), it (the partition) can't be opened for write by anything else (because of how GEOM works). But there is an exception for the root partition, which is opened without exclusive bit at first time, which allows, eg. to boot system into single-user mode and run fsck - without this hack it won't be possible. So I'm wondering if this can be problematic if one use bgfsck for the root file system... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --9amGYk9869ThD9tj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF+fd+ForvXbEpPzQRAn/BAKCGo1RPKaZJtzkHKNfjk95TdN9H1gCglEWc j0ZlOhZp5EMC/AtubbQI7qA= =8rzM -----END PGP SIGNATURE----- --9amGYk9869ThD9tj-- From owner-freebsd-fs@FreeBSD.ORG Fri Mar 16 01:58:38 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BFC1916A402; Fri, 16 Mar 2007 01:58:38 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from mgw-ext14.nokia.com (smtp.nokia.com [131.228.20.173]) by mx1.freebsd.org (Postfix) with ESMTP id 4AE7413C44B; Fri, 16 Mar 2007 01:58:37 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from esebh108.NOE.Nokia.com (esebh108.ntc.nokia.com [172.21.143.145]) by mgw-ext14.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l2G1wOP2011375; Fri, 16 Mar 2007 03:58:35 +0200 Received: from siebh101.NOE.Nokia.com ([172.30.195.27]) by esebh108.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Mar 2007 03:57:44 +0200 Received: from syebe101.NOE.Nokia.com ([172.30.128.65]) by siebh101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Mar 2007 09:57:42 +0800 Received: from [172.30.67.240] ([172.30.67.240]) by syebe101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Mar 2007 12:57:40 +1100 Message-ID: <45F9F994.2050803@nokia.com> Date: Fri, 16 Mar 2007 11:57:40 +1000 From: David Cecil User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: ext Pawel Jakub Dawidek References: <45F776AE.8090702@nokia.com> <20070314161041.GI7847@garage.freebsd.pl> <45F8EE27.6070208@nokia.com> <20070315090031.GB80993@deviant.kiev.zoral.com.ua> <20070315092659.GA14080@garage.freebsd.pl> <45F9C9B4.4030508@nokia.com> <20070315223641.GA89923@xor.obsecurity.org> <45F9CBCC.7050006@nokia.com> <20070316014846.GA3229@garage.freebsd.pl> In-Reply-To: <20070316014846.GA3229@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 16 Mar 2007 01:57:40.0422 (UTC) FILETIME=[7A986660:01C7676E] X-eXpurgate-Category: 1/0 X-eXpurgate-ID: 149371::070316035835-29CE9BB0-79943A45/0-0/0-1 X-Nokia-AV: Clean Cc: freebsd-fs@FreeBSD.org, ext Kris Kennaway Subject: Re: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2007 01:58:38 -0000 ext Pawel Jakub Dawidek wrote: > On Fri, Mar 16, 2007 at 08:42:20AM +1000, David Cecil wrote: > >>>> It may be that snapshots are used, but not explicitly. The startup scripts attempt to run fsck in the background, which would normally require a snapshot, but shouldn't >>>> for a read-only mount, right? >>>> >>>> >>> What happens if the filesystem is marked dirty, background fsck is >>> enabled, but the filesystem is mounted read-only? >>> >>> >> Yeah, I was wondering the same thing Kris. In fact, that was one of my first suspects when I started looking at this problem. >> >> I had eliminated it because fstat (and ps in ddb) doesn't show fsck running, or the raw device open for writing. Maybe fsck had already closed the descriptor and exited >> but the write to disk (GEOM mirror) is still outstanding in the buffer cache? >> > > Is the offset always the same for this error you're seeing? Maybe some > dirty buffer isn't flushed on disk properly and syncer retries syncing > it every now and then. This would explain why you see it not only early > after system was booted. > Yes, it's the same buffer. What you describe is what I believe I'm seeing. > Could you try disabling bgfsck, by setting background_fsck="NO" to your > /etc/rc.conf? > Yes, I could do that. Again, I'm reluctant to try the experiment before getting as much information as possible from ddb. From the fsck_ffs man page: "To be eligible for background cleaning it must have been running with soft updates, not have been marked as needing a foreground check, and be mounted and writable when the background check is to be done. If these conditions are met, then fsck_ffs exits with a zero exit status. Otherwise it exits with a non-zero exit status. If the file system is clean, it will exit with a non-zero exit status so that the clean status of the file system can be verified and reported during the foreground checks." This says the partition must be writable when the check is done. Now I guess there could be a bug where it's trying to write when it shouldn't... Maybe I should take a look at the fsck_ffs code too. > I know that there is a hack for handling fsck of the root file system. > Bascially once system is mounted read-only (the partition it resides on > is opened read-only), it (the partition) can't be opened for write by > anything else (because of how GEOM works). But there is an exception for > the root partition, which is opened without exclusive bit at first time, > which allows, eg. to boot system into single-user mode and run fsck - > without this hack it won't be possible. So I'm wondering if this can be > problematic if one use bgfsck for the root file system... > I will look into it some more and report back. Thanks, Dave -- Software Engineer Secure and Mobile Connectivity Nokia Enterprise Solutions +61 7 5553 8307 (office) +61 412 728 222 (cell) From owner-freebsd-fs@FreeBSD.ORG Fri Mar 16 15:10:45 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C29F716A40B for ; Fri, 16 Mar 2007 15:10:45 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id 3DE6D13C4B8 for ; Fri, 16 Mar 2007 15:10:45 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id l2GEWtK1075539; Fri, 16 Mar 2007 10:32:55 -0400 (EDT) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id l2GEWt8S075538; Fri, 16 Mar 2007 10:32:55 -0400 (EDT) (envelope-from jerrymc) Date: Fri, 16 Mar 2007 10:32:55 -0400 From: Jerry McAllister To: Craig Rodrigues Message-ID: <20070316143254.GC75446@gizmo.acns.msu.edu> References: <20070120073117.GB60202@x12.dk> <200703061246.09687.antik@bsd.ee> <45ED5850.6050506@nipsi.de> <200703061420.36980.antik@bsd.ee> <20070307135017.GC2864@garage.freebsd.pl> <45F2EEBD.6070007@barryp.org> <86ps7evniu.fsf@dwp.des.no> <45F91CF0.6010506@fluffles.net> <20070315213045.GA11147@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070315213045.GA11147@crodrigues.org> User-Agent: Mutt/1.4.2.2i Cc: freebsd-fs@freebsd.org, freebsd-bugs@freebsd.org, Fluffles , freebsd-questions@freebsd.org Subject: Re: boot2 can't boot from USB? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2007 15:10:45 -0000 On Thu, Mar 15, 2007 at 05:30:45PM -0400, Craig Rodrigues wrote: > On Thu, Mar 15, 2007 at 11:16:16AM +0100, Fluffles wrote: > > If so, i may have found some bugs / problems with boot2. Long ago i > > tried to make a bootable USB pendrive with FreeBSD 6.1 on it. It failed > > to boot with the message "invalid slice" and i got a prompt like: > > I have worked a lot with getting FreeBSD to boot off of USB devices, > and have gotten it to work. > Specifically, I have worked with USB pen drives, and USB CD-ROM drives. > It *is* possible, but what I have found is the following: > - on some motherboards, you need to explicitly configure the BIOS > to boot off of a USB device (either a disk, a CD-ROM, or a "Zip drive") > - booting off of USB-CDROM devices seems to be much more reliable than > booting off of USB pen drives > - if you have an "older" motherboard BIOS, say from about 3-4 years ago, > booting off of USB devices is more unreliable, than a "newer" motherboard > BIOS > - if I have 5 different models of USB pen drives, each model may behave > differently, and may or may not boot. Same for USB CD-ROM drives, > but I've found CD-ROM drives to be more reliable than pen drives. > > So to summarize: > - booting off of USB devices seems to be sensitive > to your motherboard BIOS, and the firmware written into your USB device. > - booting off of USB CD-ROM drives seems to be more reliable than booting > off of USB pen drives Just to add to your list, I have been successful booting from a USB floppy drive. I don't remember the floppy drive make, but I have used it on both a Dell Optiplex and a IBM (Lenova) laptop. ////jerry > > There is no logic to this, I've just found this out from trial and error, > and banging my head a lot. > > -- > Craig Rodrigues > rodrigc@crodrigues.org > _______________________________________________ > freebsd-bugs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-bugs > To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"