sha256: ///var/db/locate.database: Input/output error / cp: ///usr/lib/debug/usr/bin/llvm-objdump.debug: Input/output error

Hello again.

"Unfortunately" it seems that I'm the perfect bugs / problem collector of the world. I'm trying to upgrade 14.1-RELEASE to 14.2-RELEASE using the freebsd-update script,but :

Code:
==> rm -rf /var/db/freebsd-update/*

==> freebsd-update upgrade -r 14.2
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching public key from update1.freebsd.org... done.
Fetching metadata signature for 14.1-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic kernel/generic-dbg src/src world/base world/base-dbg
world/lib32 world/lib32-dbg

The following components of FreeBSD do not seem to be installed:

Does this look reasonable (y/n)? y

Fetching metadata signature for 14.2-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... sha256: ///usr/lib/debug/usr/bin/llvm-objdump.debug: Input/output error
sha256: ///var/db/locate.database: Input/output error
done.
Fetching files from 14.1-RELEASE for merging... done.
Preparing to download files... cp: ///usr/lib/debug/usr/bin/llvm-objdump.debug: Input/output error
File changed while FreeBSD Update running: /usr/lib/debug/usr/bin/llvm-objdump.debug
 
Just my guessing, but those I/O Errors smell like a dying disk...

I really don't understand,what's happening man. I see this kind of errors in almost every disk I have (old and new),using FreeBSD or Linux it does not care. Furthermore I see a lot of crashes of Firefox and Thunar. I did several tests (for disks and memory) and I didn't find nothing wrong.
 
Nop. Those aren't real errors. They are there because I'm using a "special" network conf. settings for clouldflare. Basically I get the connection to Internet only at the very end of the boot,when the system is able to boot a qemu virtual machine,configured for Cloudflare.
 
Someone please can tell me why I have this situation ? It came up after having restored the old backup img file with dd. I suspect that the reason is that the owner of that directory is nobody. I didn't do it.

Screenshot_2025-01-21_16-35-17.png
 
I/O error should be a disk hardware error, but a dead disks would show up in dmesg, which it does not.

The other possible reason is filesystem corruption. Is this ZFS or UFS?
 
You made bingo :

Code:
marietto# zpool status -v

  pool: zroot3
 state: ONLINE
status: One or more devices has experienced an error resulting in data
    corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
    entire pool from backup.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-8A
config:

    NAME                          STATE     READ WRITE CKSUM
    zroot3                        ONLINE       0     0     0
      diskid/DISK-1924E20B2AE5p4  ONLINE       0     0     0

errors: Permanent errors have been detected in the following files:

        /mnt/zroot3/usr/home/marietto/.mozilla/firefox/qlo97du5.default-release-1642269005662/storage/default/https+++web.whatsapp.com/idb/1773850371fetgsa-rsot.sqlite
        /mnt/zroot3/usr/local/lib/firefox/libxul.so
        /mnt/zroot3/usr/local/share/kgeography/flags/norway/oslo.png
        /mnt/zroot3/usr/local/bin/h5stat
        /mnt/zroot3/usr/local/include/boost/vmd/detail/identifier_concat.hpp
        /mnt/zroot3/usr/lib/debug/boot/kernel/zfs.ko.debug_
        /mnt/zroot3/usr/lib/debug/usr/bin/llvm-objdump.debug
        /mnt/zroot3/usr/local/lib/python3.8/unittest/test/__pycache__/_test_warnings.cpython-38.pyc
        zroot3/ROOT/default:<0xabf7a>

This explains everything. What should I do to fix the error ? Please give me some suggestions.
 
Unlinking them will work.

From there you can restore them from backup or by reinstalling packages.

You said this is a copied ZFS?
 
I've replaced the corrupted files with a fresh copy of the same files. Now this is the situation :

Code:
pool: zroot3
 state: ONLINE
status: One or more devices has experienced an error resulting in data
    corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
    entire pool from backup.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-8A
config:

    NAME                          STATE     READ WRITE CKSUM
    zroot3                        ONLINE       0     0     0
      diskid/DISK-1924E20B2AE5p4  ONLINE       0     0     0

errors: Permanent errors have been detected in the following files:

        zroot3/usr/home:<0xe131f>
        zroot3/usr:<0x23f1c>
        zroot3/usr:<0x1f34a8>
        zroot3/usr:<0x489b6>
        zroot3/usr:<0xf29bb>
        zroot3/usr:<0xb7fbb>
        zroot3/usr:<0xba6cb>
        zroot3/usr:<0x172e7>
        zroot3/ROOT/default:<0xabf7a>

I still see errors,but at this point I don't know what remove.
 
Anyway,after having replaced the corrupted files with the fresh ones taken from a similar installation of FreeBSD,the problem is gone now and I can perform again the upgrade from 14.1 to 14.2.

Code:
==> freebsd-update fetch

Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 14.1-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 2 files... . done.

WARNING: FreeBSD 14.1-RELEASE-p5 is approaching its End-of-Life date.
It is strongly recommended that you upgrade to a newer
release within the next 2 months.

==> freebsd-update install

Creating snapshot of existing boot environment... done.
Installing updates...
Restarting sshd after upgrade
Cannot 'restart' sshd. Set sshd_enable to YES in /etc/rc.conf or use 'onerestart' instead of 'restart'.
Scanning /usr/share/certs/untrusted for certificates...
Scanning /usr/share/certs/trusted for certificates...
Skipping untrusted certificate /usr/share/certs/trusted/Cybertrust_Global_Root.pem (/etc/ssl/untrusted/76cb8f92.0)
Skipping untrusted certificate /usr/share/certs/trusted/DST_Root_CA_X3.pem (/etc/ssl/untrusted/2e5ac55d.0)
Skipping untrusted certificate /usr/share/certs/trusted/E-Tugra_Certification_Authority.pem (/etc/ssl/untrusted/5273a94c.0)
Skipping untrusted certificate /usr/share/certs/trusted/E-Tugra_Global_Root_CA_ECC_v3.pem (/etc/ssl/untrusted/5a7722fb.0)
Skipping untrusted certificate /usr/share/certs/trusted/E-Tugra_Global_Root_CA_RSA_v3.pem (/etc/ssl/untrusted/66445960.0)
Skipping untrusted certificate /usr/share/certs/trusted/GlobalSign_Root_CA_-_R2.pem (/etc/ssl/untrusted/4a6481c9.0)
Skipping untrusted certificate /usr/share/certs/trusted/Hellenic_Academic_and_Research_Institutions_RootCA_2011.pem (/etc/ssl/untrusted/1636090b.0)
Skipping untrusted certificate /usr/share/certs/trusted/Hongkong_Post_Root_CA_1.pem (/etc/ssl/untrusted/3e45d192.0)
Skipping untrusted certificate /usr/share/certs/trusted/Network_Solutions_Certificate_Authority.pem (/etc/ssl/untrusted/4304c5e5.0)
Skipping untrusted certificate /usr/share/certs/trusted/Security_Communication_Root_CA.pem (/etc/ssl/untrusted/f3377b1b.0)
Skipping untrusted certificate /usr/share/certs/trusted/Staat_der_Nederlanden_EV_Root_CA.pem (/etc/ssl/untrusted/03179a64.0)
Skipping untrusted certificate /usr/share/certs/trusted/TrustCor_ECA-1.pem (/etc/ssl/untrusted/7aaf71c0.0)
Skipping untrusted certificate /usr/share/certs/trusted/TrustCor_RootCert_CA-1.pem (/etc/ssl/untrusted/5d3033c5.0)
Skipping untrusted certificate /usr/share/certs/trusted/TrustCor_RootCert_CA-2.pem (/etc/ssl/untrusted/3e44d2f7.0)
Scanning /usr/local/share/certs for certificates...
Scanning /usr/local/etc/ssl/certs for certificates...
 done.

anyway,zfs status still reports errors...
 
Yes,I did the copy of the whole disk with dd,using this command from Linux because it's very fast :

Code:
# dd if=/dev/sda | pv | dd of=FreeBSD-14.1-ZFS.img

I was thinking that you maybe did a dd on a mounted filesystem, which would explain corruption in the copy.

But you seem to have rebooted into Linux.
 
I don't think. Usually on Linux I do mount only the zfs disks where I have stored the data,not the disks where I have installed FreeBSD. But maybe,who knows,sometime it could have happened.
 
storing ZFS backups by raw image seems like a dangerous idea. zfs send ensures you have a consistent data stream, have you considered using that?
 
I never used zfs send. I will take in consideration. Regarding the idea to store the raw images on the ZFS disks : I took this decision because Linux offers to me a very good transfer speed,compared to FreeBSD and Linux has a good support for ZFS. Maybe UFS is less prone to corruption than ZFS ? Anyway Linux does not support UFS in write mode.
 
Even my new SATA disk,bought 1 month ago (this has a ZFS structure,too),is experiencing data corruption :

Code:
  pool: zroot-142
 state: ONLINE
status: One or more devices has experienced an error resulting in data
        corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
        entire pool from backup.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-8A
config:

        NAME        STATE     READ WRITE CKSUM
        zroot-142   ONLINE       0     0     0
          sdc       ONLINE       0     0     0

errors: Permanent errors have been detected in the following files:

        /mnt/zroot-142/usr/local/share/certs/ca-root-nss.crt

basically all the disks that have ZFS are getting corrupted,but NOT the disks that have a UFS or EXT4 or NTFS structures. Can someone tell me if this is an expected behavior ? I'm starting to think that the cause is the UPS that I'm using,model CyberPower CP900EPFCLCD.
 
Back
Top