Re: Corrupted UFS2 file system?
- In reply to: Kevin Oberman : "Corrupted UFS2 file system?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 11 Jul 2024 14:45:07 UTC
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 AM Kevin Oberman <rkoberman@gmail.com> 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" and > 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 > -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683