Easy way to repair / delete a corrupt directory on ZFS filesystem

Dark26

Renowned Member
Nov 27, 2017
273
25
68
47
Bonjour,

Fisrt of all , it's fresh home lab, so no vm; no critical data.


before :
Code:
root@qc5000:~# zpool status -v
  pool: rpool
state: ONLINE
  scan: scrub repaired 0B in 0 days 00:00:06 with 0 errors on Fri Oct  2 23:03:48 2020
config:

    NAME                                                STATE     READ WRITE CKSUM
    rpool                                               ONLINE       0     0     0
      mirror-0                                          ONLINE       0     0     0
        ata-Crucial_CT240M500SSD1_1334095683AA-part3    ONLINE       0     0     0
        ata-GALAX_TA1D0240A_D878077917F700003495-part3  ONLINE       0     0     0

errors: No known data errors

But i tried to do a backup to PBS:cool: of the Promox fresh install, and the problem appears during the process.

root@qc5000:~# zpool status -v
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: http://zfsonlinux.org/msg/ZFS-8000-8A
scan: scrub repaired 0B in 0 days 00:00:06 with 0 errors on Fri Oct 2 23:03:48 2020
config:

NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-Crucial_CT240M500SSD1_1334095683AA-part3 ONLINE 0 0 0
ata-GALAX_TA1D0240A_D878077917F700003495-part3 ONLINE 0 0 0

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

//tmp/tr

[/CODE]

"zpool scrub rpool "don't do anything; the error keep coming.

is there a way to delete the directory ?

Code:
root@qc5000:/tmp# cd tr
root@qc5000:/tmp/tr# ls
ls: reading directory '.': Input/output error


Thanks dark26
 
Try clearing the errors via "zpool clear" and issue a scrub again. If that does not work the only thing ist to delete the dataset.

zfs is the command you should explore (don't know the syntax of the top of my head)
 
ZFS noticed an unrecoverable error in the storage of the directory, which will not go away until you either overwrite the place of the error, or delete, the directory or file that contains the error (and run a scrub afterwards). For files, this usually means overwriting them with a copy from a backup. With directories, I don't know any other way than deleting the entire directory tree (and copy the contents from a backup).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!