Date: Mon, 24 Aug 2020 10:40:17 +0200 From: Polytropon <freebsd@edvax.de> To: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Suggestion regarding fsck output enhancement Message-ID: <20200824104017.4c241ec0.freebsd@edvax.de>
next in thread | raw e-mail | index | archive | help
Today I came across a situation where I would think fsck should output a little more information, which would be helpful especially in diagnostics and dry-run sessions prior to recovery. Example: INCORRECT BLOCK COUNT I=24236 (288 should be 268) CORRECT? yes Or: UNREF FILE I=63518082 OWNER=test1 MODE=100644 SIZE=0 MTIME=Aug 24 09:45 2020 RECONNECT? yes In both entries, the inode number is mentioned. Wouldn't it be nice to display a file or directory name, if possible, to show what file could be affected? Basically, it's what you can already manually do: 1. run fsck in dry mode (only list actions, do not take them) 2. note inode numbers 3. use fsdb to find out what the inodes point to 4. take specific action prior to fsck if needed My suggestion would be: If this kind of information is available, fsck should display it, for example: INCORRECT BLOCK COUNT I=24236 (288 should be 268) FILENAME ada0p4:/tmp/test.dat CORRECT? yes Or: UNREF FILE I=63518082 OWNER=test1 MODE=100644 FILENAME ada0p5:/home/test1/project/data/listing.ps SIZE=0 MTIME=Aug 24 09:45 2020 RECONNECT? yes Let's assume those messages would have been ansered "NO" during a fsck dry run. The advantage: While fsck could zero out or truncate a file during repair, it might be important for the operator to first try to mount the partition r/o, copy the file out, unmount the partition, have fsck repair the filesystem, and then replace the damaged file from the previously obtained copy. This of course assumes that the file in question can still be read, but would be subject to "deleting" upon filesystem consistency restoration, so it will not always be possible. Whom should I direct such a suggestion to? Or am I missing something that already exists? :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200824104017.4c241ec0.freebsd>