From nobody Thu Jul 11 14:45:07 2024 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WKcw65cDtz5QmNG for ; Thu, 11 Jul 2024 14:45:26 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WKcw56C15z50YB for ; Thu, 11 Jul 2024 14:45:25 +0000 (UTC) (envelope-from kob6558@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=AcLanMv0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of kob6558@gmail.com designates 2607:f8b0:4864:20::b2f as permitted sender) smtp.mailfrom=kob6558@gmail.com Received: by mail-yb1-xb2f.google.com with SMTP id 3f1490d57ef6-e02b79c6f21so981598276.2 for ; Thu, 11 Jul 2024 07:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720709124; x=1721313924; darn=freebsd.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=wG619QTAwTYVN3gfLMznl+FjAKKmvsBz9GOwlHQf6R0=; b=AcLanMv0T7zfcwdyk0bQ99gRocvvaVAsa+EbHq/+InWf05sCWVjvuDc3+O/4w9XJ++ Je7varlyWg8Wi7+j926sOM2qX9Mb+rcuYTfJJ0MfbQ+uprks490TAYaaPtBRCkMKlUUQ 9GvwP8jgOmy1NkQO0XRoRxmMkYfmt6NQxVKo3Z+XiUcOMQx/dJ6ryf7Cu+XzQzTXzArM SQXPBmN5ZdrsV8xAWh2y6BAaelavkvbLtO1BJYvJS2TP0sppNYYf6rDAapX07IEeykc5 QwRHZrf2+8CyzPUDqRlGpdaEkyhQ+LX3z7NvdCtR4gtDCUM+v2+4i/o6mpGusMcROwTn 6bzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720709124; x=1721313924; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wG619QTAwTYVN3gfLMznl+FjAKKmvsBz9GOwlHQf6R0=; b=aZVgApNrD4/gEu9Y6WIz7RRYXWfvFkMEPPxHjip+mnFu4Fp4wJ5DF3kUwhItI9JnuP fPcGDk4VekxrAqFMI7je0NniU/AEBVRt+g+kgad5U5XJIJN3FxaNsr5lXKkZs1I113FN yls7W+7kaY/2v48ocpUrP4p4iP+/yFvWerYwlcRkDYWoYaZlvBLEy5K4piy9T2lKQRvH d61VV6H5fb+JJWBMyxQekMyFN49wDfTCziUHA7Tc52JXFUyk5I+4c/ehldBK5norH6Pa wP2a9O913a89fBnY8TKGLTC3Y7quQ9sBysd699zWv7EBvMHV+k05lBxjl1+H/9OmL5y4 05gA== X-Gm-Message-State: AOJu0Yx6AoSDG4ofRYAnP4zWrikdfv0XdGz6Nsdm+QSgj4VTfkD0WlXt QCqxJ/7xnV8DJ5BuR7F03LRB3mBqiO3K/rjtqf42K4IPplXu4RN5e083PGaBaBFWWOJ2WbGgsva C7V4y5cxGEGp6xZlFObUhtkz+ptWhLS/4 X-Google-Smtp-Source: AGHT+IHNOuG+6SPj8e2V4zbJRwxuCbQFV3axelmKCEt1Pxk3kdsQokhRryOPkakknnYlmBzku+qKEqS8yjXOW8lj1lI= X-Received: by 2002:a25:a369:0:b0:e03:48ed:d275 with SMTP id 3f1490d57ef6-e041b173dfemr9651177276.61.1720709123982; Thu, 11 Jul 2024 07:45:23 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Kevin Oberman Date: Thu, 11 Jul 2024 07:45:07 -0700 Message-ID: Subject: Re: Corrupted UFS2 file system? To: "freebsd-questions@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000018cd3d061cf9d0be" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.70 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FORGED_SENDER(0.30)[rkoberman@gmail.com,kob6558@gmail.com]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_ALL(0.00)[]; MISSING_XM_UA(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MLMMJ_DEST(0.00)[questions@freebsd.org]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[rkoberman@gmail.com,kob6558@gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b2f:from] X-Rspamd-Queue-Id: 4WKcw56C15z50YB --00000000000018cd3d061cf9d0be Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The problem is resolved. My thanks to Doug Harvy who sent an off list suggestion that did the trick. clri(8) is a tool that has been in Unix since Unix 6 which predates BSD by a bit. It is still present and maintained in FreeBSD and is a bit heavy-handed. I simply kills the inode (CLeaRInode). I simply got the inode numbers for the three annoying files and used clri to flush them. I then ran a full fsck on the system which found the hanging references and left the file system clean. This was a very weird failure and I have no idea how often it might be useful, but thanks to Doug, I have a new tool that can fix an otherwise intractable corruption of a UFS system. I figured that I should pass this on in case it could be useful to others. Thanks again to Doug and Dewayne Geraghty who made suggestions and reminded me to wrap this up with the solution. On Sat, Jul 6, 2024 at 10:18=E2=80=AFAM Kevin Oberman = wrote: > I use rsync to update a backup disk on a server. For a few months I have > been getting errors for a few lost+found files. I have done "ls -l -o" an= d > found many system flags are set on the files. Attempting to modify the > files as root fails: > # chflags 0 #31232359 > chflags: #31232359: Operation not supported > > This is clearly a corruption. All three files show a bad creation date > (Dec 22 1971) and a size of 4096. All include the flags sappnd, schg, > sunlnk, snapshot, hidden, uunlnk, rdonly, and system. I suspect that > snapshot prevents me from doing anything to the files, but I have no idea > how I might fix this. Full fsck finds no errors. SMART shows a past error= , > but o current ones. > > Any clue as to how this might be fixed other than reinitialising the > partition and starting from scratch? > -- > Kevin Oberman, Part time kid herder and retired Network Engineer > E-mail: rkoberman@gmail.com > PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 > --=20 Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 --00000000000018cd3d061cf9d0be Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The problem is resolved. My thanks to Doug Harvy= who sent an off list suggestion that did the trick.
=
clri(8) is a tool that has been in Unix since Unix 6 wh= ich predates BSD by a bit. It is still present and maintained in FreeBSD an= d is a bit heavy-handed. I simply kills the inode (CLeaRInode). I simply go= t the inode numbers for the three annoying files and used clri to flush the= m. I then ran a full fsck on the system which found the hanging references = and left the file system clean.

This was= a very weird failure and I have no idea how often it might be useful, but = thanks to Doug, I have a new tool that can fix an otherwise intractable cor= ruption of a UFS system. I figured that I should pass this on in case it co= uld be useful to others.

Thanks again to= Doug and Dewayne Geraghty who made suggestions and reminded me to wrap thi= s up with the solution.



--