3

zpool statuts -v gives me Permanent errors, and I was wondering how to fix them:

❯  sudo zpool status -v
Insert authentication card for user `franck'
[sudo] Mot de passe de franck : 
  pool: bpool
 state: ONLINE
config:
    NAME                                    STATE     READ WRITE CKSUM
    bpool                                   ONLINE       0     0     0
      0f41ddf7-006b-9641-852a-c77eebf4ad89  ONLINE       0     0     0

errors: No known data errors

pool: rpool 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 scan: scrub repaired 0B in 00:07:34 with 6 errors on Tue May 9 16:57:56 2023 config:

    NAME                                                 STATE     READ WRITE CKSUM
    rpool                                                ONLINE       0     0     0
      10c839c4-470f-094f-a176-ee56727ec520               ONLINE       8     0     0
      nvme-Samsung_SSD_970_EVO_Plus_2TB_S4J4NX0R857127E  ONLINE       0     0     0

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

    rpool/USERDATA/franck_4tpcmt:<0x2f1d1c>
    rpool/USERDATA/franck_4tpcmt:<0x3d0d74>
    rpool/USERDATA/franck_4tpcmt:<0x273da2>
    rpool/USERDATA/franck_4tpcmt:<0xcd6ba>
    rpool/USERDATA/franck_4tpcmt:<0x2aadc6>
    rpool/USERDATA/franck_4tpcmt:<0x3d0df0>

I am not sure what rpool/USERDATA/franck_4tpcmt stands for, and I'm even more confused by the :<xxxxx> after that.

What does it mean, and how to fix the "permanent errors" ?

Artur Meinild
  • 26,018
alci
  • 5,839

1 Answers1

4

Looking at a similar question, it seems this is a problem with corrupted/orphaned inodes (<0x2f1d1c> is an inode ID), likely because the file has been deleted, but the inode is still referenced by ZFS.

The solution seems to be forcing a scrub:

sudo zpool scrub rpool

If a complete scrub doesn't clear the errors, it is suggested to start the scrub, let it run for some time, and force it to stop again with:

sudo zpool scrub -s rpool

In addition, this can occur if a running application is still referencing the inodes of deleted files. In this case, simply rebooting the machine will allow the inodes to be freed, and the ZFS errors will likely disappear. More information about this can be found here.

Artur Meinild
  • 26,018
  • Initially my pool was in DEGRADED state, with too many errors. I ran scrub, and after that, these inode errors remain. Running scrub again is instantaneous, but does not correct the errors. – alci May 10 '23 at 07:05
  • 1
    Reading the similar question, I realized that deleted files still hold by a process could be the culprits. I just rebooted and the error is gone... – alci May 10 '23 at 07:15