Date: Thu, 27 Mar 2014 17:33:13 -0700 (PDT) From: Victor Sneider <v.sneider@yahoo.com> To: "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org> Subject: Issue with vn_open(), help me please Message-ID: <1395966793.20688.YahooMailNeo@web122101.mail.ne1.yahoo.com>
next in thread | raw e-mail | index | archive | help
Hi all,=0A=0AI used kern_openat()/fget/fo_read() to open and read a text fi= les inside kernel.=A0=0A=0AWhen I load it as a kernel module, the module wo= rks fine and do its job.=A0=0A=0AWhen I compiled it into kernel, it crash i= n kern_openat(), more precisely, in vn_open().=A0I used call_out() to defer= reading the file and wait for the rootfs mount completes. I set the timeou= t long enough (5 min, for example) but it still crashes.=A0=0A=0AI googled = a lot but have not found any report about this issue. I am not an expert ab= out file reading/writing inside kernel but I feel this could be a bug in vn= _open().=A0=0A=0APlease help me.=A0=0A=0AThank you.=A0=0A=0AV.Sneider. From owner-freebsd-fs@FreeBSD.ORG Fri Mar 28 00:39:45 2014 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C7E511E for <freebsd-fs@freebsd.org>; Fri, 28 Mar 2014 00:39:45 +0000 (UTC) Received: from mail.tentacle.net (mail.tentacle.net [208.94.246.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0565DED2 for <freebsd-fs@freebsd.org>; Fri, 28 Mar 2014 00:39:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tentacle.net; s=mail; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=3T6AHsZ0CJJ+8A3fKZR5hNO/bQaWxSUXkFJqvad8m94=; b=L69zT/ivPnv9Tjxyf9tvXWKPRIBrV/fU8kFeH9H1bPIdYm0wy+aeFYeGbMU7UoKw00iSPPfCjh+f81ZYKrD1tHkhlL2W4E271qchh4IA0oODNdWZWgYRg9onXsiZZTDt2sj+6KpyHILjDSqHJAytYk56Rk4HJU++hZK8CbvnXkE=; Received: from localhost ([127.0.0.1] helo=chaos.tentacle.net) by mail.tentacle.net with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82 (FreeBSD)) (envelope-from <sweetpea@tentacle.net>) id 1WTKYp-000JAW-Fp for freebsd-fs@freebsd.org; Thu, 27 Mar 2014 17:22:16 -0700 Received: (from sweetpea@localhost) by chaos.tentacle.net (8.14.8/8.14.8/Submit) id s2S0MFZg073687 for freebsd-fs@freebsd.org; Thu, 27 Mar 2014 17:22:15 -0700 (PDT) (envelope-from sweetpea) Date: Thu, 27 Mar 2014 17:22:15 -0700 From: Kevin Rauwolf <sweetpea-freebsd@tentacle.net> To: freebsd-fs@freebsd.org Subject: Missing zfs pools Message-ID: <20140328002211.GA73597@chaos.tentacle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Identity-Key: id1 X-Account-Key: account1 X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; DSN=0; uuencode=0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 X-Enigmail-Version: 1.6 X-Enigmail-Draft-Status: 512 X-Spam-Level: -- X-Spam-Score: -2.1 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs/> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 28 Mar 2014 00:39:45 -0000 I am running into a problem recovering data from an old backup. I had a pool containing a mirror of two disks. I now have access to just one of those disks, and I am trying to import the pool so that I can copy files out. When I try to import, there seems to be no sign that the pool exists. # zpool import # zpool import -D # zpool list no pools available # zpool import -f zroot cannot import 'zroot': no such pool available # gpart list ada0 ... 2. Name: ada0p2 Mediasize: 1983218974720 (1.8T) Sectorsize: 512 Stripesize: 0 Stripeoffset: 1048576 Mode: r0w0e0 rawuuid: 7ada140b-4194-11e3-9da4-f46d04227f12 rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b label: freebsd-zfs length: 1983218974720 offset: 1048576 type: freebsd-zfs index: 2 end: 3873476607 start: 2048 ... # zdb -l /dev/gptid/7ada140b-4194-11e3-9da4-f46d04227f12 -------------------------------------------- LABEL 0 -------------------------------------------- version: 5000 name: 'zroot' state: 0 txg: 0 pool_guid: 3559240713814701742 hostid: 740296715 hostname: '######' top_guid: 5658684753042695532 guid: 6772479201275930554 vdev_children: 1 vdev_tree: type: 'mirror' id: 0 guid: 5658684753042695532 metaslab_array: 33 metaslab_shift: 34 ashift: 12 asize: 1983214256128 is_log: 0 create_txg: 4 children[0]: type: 'disk' id: 0 guid: 1772932453788439366 path: '/dev/gptid/7a375bd1-4194-11e3-9da4-f46d04227f12' phys_path: '/dev/gptid/7a375bd1-4194-11e3-9da4-f46d04227f12' whole_disk: 1 create_txg: 4 children[1]: type: 'disk' id: 1 guid: 6772479201275930554 path: '/dev/gptid/7ada140b-4194-11e3-9da4-f46d04227f12' phys_path: '/dev/gptid/7ada140b-4194-11e3-9da4-f46d04227f12' whole_disk: 1 features_for_read: create_txg: 0 Uberblock[0] magic = 0000000000bab10c version = 5000 txg = 2436407 guid_sum = 17763337121921767194 timestamp = 1395437212 UTC = Fri Mar 21 14:26:52 2014 ... I have tried running Jeff Bonwick's "labelfix" tool, patched with recent ZFS API changes, but it fails on the pwrite64 call that writes the checksum. (That's why my txg is 4536407 in Uberblock 0; it's 0 in all of the others.) Any suggestions as to why import seems unable to find the existing pool? -k
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1395966793.20688.YahooMailNeo>