From owner-freebsd-stable@freebsd.org Sun Dec 18 00:38:38 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AB06C717A5 for ; Sun, 18 Dec 2016 00:38:38 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B42371ABE for ; Sun, 18 Dec 2016 00:38:37 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: by mail-wm0-x233.google.com with SMTP id c184so21462512wmd.0 for ; Sat, 17 Dec 2016 16:38:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Xf5/Sr7xe0WNukw6pWRYy5/ncp6Do3/W8laVy+2j9dg=; b=G8lbZlksA9u3ezgaPcAUtmXlSV3+C+kOYkHQznBtIZRMdRkYm2FvMRSI+HF7jaERLU bQwDCOxVvC6di+1BovCbuuuFnUsvfnVShQ2AB1DZb8NczEVa4v9MLii8IbBIK5med8Be Rxs7OkL54RmmBuyI/EsPtoLucNsbaQprqCUMNuAkPt2OJT27cublIKflDkJMN6BvudKZ BktOdIu41D/f3GpygnzP5vW/rVa9eNcwtKPmGsRcYvkR/zcEVAjdY/46KITbDOg2Vh1V nJVjZOdT4EBeJm/jak7p/AbA0RwLDGBZyftFSxkXaATo3nR63lZyRTA75ZOp0wU7Sdxh 8XeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Xf5/Sr7xe0WNukw6pWRYy5/ncp6Do3/W8laVy+2j9dg=; b=h73o1VoM8fAK8JM9rR+j++3DSZ14oV+nPMSuDi07Q7AbhNCPVhTSGRxpGSROtczPHf egpgXaY9nAqt9J0y+I2p0TIucB//aG1Jq0/Ke+cIu6yTgCVKAkNzwRI11aSd0GE6gbWN vFvQ/Z/Xx7kj5IkDLgXsbiWTQ/zMHEouQuTtnX2j/qqCBHVKehcDu1c8QoSMckDXJrgA 3RnEjMhNsQ3UGVYjTKQkaZo5uBnFGjAn1OAZspB6Y1gS+O1W+jh2sqwOTmifuKhvY48s TSuzWndSbO0lIxNSib+MfDRxV9Ux0G9Ty5UPDZsuCrRyMspcHqsOo6VvMzQ3Q3Cw5xOp eBFA== X-Gm-Message-State: AIkVDXJ62ODBr26tlH35Xi/wG7BJebVsUTQ1n2HVL1DrysX6TIEJLBQw0prUTlcQdl3eO0+pLlaSCqLSGAPfeQ== X-Received: by 10.28.224.5 with SMTP id x5mr7954259wmg.70.1482021515870; Sat, 17 Dec 2016 16:38:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.169.195 with HTTP; Sat, 17 Dec 2016 16:38:35 -0800 (PST) In-Reply-To: <914db6e5-2d8d-15b4-ee96-bc267ce1dbda@davenulle.org> References: <914db6e5-2d8d-15b4-ee96-bc267ce1dbda@davenulle.org> From: Adam Vande More Date: Sat, 17 Dec 2016 18:38:35 -0600 Message-ID: Subject: Re: [ZFS] files in a weird situtation To: David Marec Cc: freebsd-stable Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2016 00:38:38 -0000 On Sat, Dec 17, 2016 at 3:01 PM, David Marec wrote: > [I had first posted onto the Forum about this issue] > > Two months ago, > > - next to a call to |`||delete-old-libs`| or `install world`, I don't > really know - > > my box that is following FreeBSD-11 Stable ran into a weird situation. > > A set of files, especially `/lib/libjail.so.1` are in both states > `existing` and `not existing`: > > I means: > > david:~>cp ~david/libjail.so.1 /lib > cp: /lib/libjail.so.1: File exists > > But: > > david:~>ls /lib/libjail.so.1 > ls: /lib/libjail.so.1: No such file or directory > david:~>find /lib -name "libjail.so.1" -print > /lib/libjail.so.1 > david:~>find /lib -name "libjail.so.1" -ls > find: /lib/libjail.so.1: No such file or directory > > With deeper investigation, the file is in fact mapped to an `inode`: > > root@dmarec:~ # ls -di /lib > 13 /lib > root@dmarec:~ # zdb -dddd zroot/ 13 | grep libjail.so.1 > libjail.so.1 = 10552574 (type: Regular File) > > Which fails with `zdb` on: > > root@dmarec:~ # zdb -dddd zroot/ 10552574 > Dataset zroot [ZPL], ID 21, cr_txg 1, 114G, 2570002 objects, rootbp > DVA[0]=<0:b97d6ea00:200> DVA[1]=<0:1c212b0400:200> [L0 DMU objset] > fletcher4 lz4 LE contiguous unique double size=800L/200P > birth=3852240L/3852240P fill=2570002 > cksum=17b78fb7e4:7c87a526a07:16251edfaae60:2ce0c5734ccf2f > > Object lvl iblk dblk dsize lsize %full type > zdb: dmu_bonus_hold(10552574) failed, errno 2 > > > `stat (2)` returns ENOENT when checking for the file: > david:~>truss stat -L /lib/libjail.so.1 > ... > stat("/lib/libjail.so.1",0x7fffffffe7e8) ERR#2 'No such > file or > directory' david:~>truss stat -L /lib/libjail.so.1 > > A pass with `zfs scrub` didn't help. > > Any clue is welcome. What's that `dmu_bonus_hold` stands for ? > I am unable to understand what your intent is here. If you wish to delete it, you can do: find . -inum 10552574 -exec rm {} \; -- Adam