TASK ERROR: mkdir /mnt/pve/Backup_Daten/template: Structure needs cleaning at /usr/share/perl5/PVE/Storage/Plugin.pm line 1398

Ingwaz-M

New Member
May 15, 2024
3
0
1
First of all, hello to all users of this forum!

I'm new here and a Linux layman.
I have installed Proxmox on a thin client following the instructions in a Youtube video.
(2 physical data carriers: 1x NVME SSD for Proxmox and the containers and 1x HDD for backups and data).
Two LXCs are set up on it. ioBroker is installed in one of them. An automatic backup of all containers is also set up.
Additional info: (As I discovered today, I apparently accidentally restored the ioBroker container to the backup disc a long time ago when I removed it due to an error and then restored a working backup).


Everything worked perfectly until yesterday. Then I realised that ioBroker was no longer working and the associated container could no longer be started.
When I logged on to Proxmox I saw that the last backup job had failed.
The output in the tasks for this is very long, I don't know if I should post it here.
I then deactivated the auto-backup job.

Then I tried to reboot the container with ioBroker without success.
Output:

run_buffer: 571 Script exited with status 255
lxc_init: 845 Failed to run lxc.hook.pre-start for container ‘100201’
__lxc_start: 2034 Failed to initialise container ‘100201’
TASK ERROR: startup for container ‘100201’ failed

After clicking on Start Container I got the same output.
So I tried a complete restart of Proxmox.
When it tried to start the ioBroker container again, I got a different error output:

TASK ERROR: mkdir /mnt/pve/Backup_Data/template: Structure needs cleaning at /usr/share/perl5/PVE/Storage/Plugin.pm line 1398.

Based on this message I did some research on the net but didn't really find the solution to my problem,
but I think I have found out that the file system of the backup disc is somehow ‘damaged’.
I have already opened the file mentioned and looked for the line mentioned, but what it says doesn't tell me anything.

I can't get any further. Perhaps one of you is able and kind enough to help me with what to do.

Best regards,
Ingo alias Ingwaz-M
 
Hi,
TASK ERROR: mkdir /mnt/pve/Backup_Data/template: Structure needs cleaning at /usr/share/perl5/PVE/Storage/Plugin.pm line 1398.

Based on this message I did some research on the net but didn't really find the solution to my problem,
but I think I have found out that the file system of the backup disc is somehow ‘damaged’.
yes, the error message suggests that. You should disable the backup storage (in the UI Datacenter > Storage > Edit) and then in the CLI, unmount it and run an fsck for the filesystem on the disk. I'd also check the health of the disk smartctl -a /dev/XYZ replacing XYZ with the actual value for the disk in question. If the storage was created via PVE, you should be able to see what disk/partition it is by running systemctl status mnt-pve-Backup_Data.mount
 
Hi,

yes, the error message suggests that. You should disable the backup storage (in the UI Datacenter > Storage > Edit) and then in the CLI, unmount it and run an fsck for the filesystem on the disk. I'd also check the health of the disk smartctl -a /dev/XYZ replacing XYZ with the actual value for the disk in question. If the storage was created via PVE, you should be able to see what disk/partition it is by running systemctl status mnt-pve-Backup_Data.mount
This isn't disk corruption. Corrupted filesystems don't play out this way, and anyway the real issue is one of two things (or maybe both): some permission mismatch between the proxmox interface and the debian foundation, and/or a... less than robust script incorrectly using mkdir. You can work around this error by just going into the cli and running those mkdirs manually. Make the directory, click ok again, it'll error again when it tries to make the next directory, rinse and repeat until it mounts.
 
This isn't disk corruption. Corrupted filesystems don't play out this way, and anyway the real issue is one of two things (or maybe both): some permission mismatch between the proxmox interface and the debian foundation, and/or a... less than robust script incorrectly using mkdir. You can work around this error by just going into the cli and running those mkdirs manually. Make the directory, click ok again, it'll error again when it tries to make the next directory, rinse and repeat until it mounts.
Structure needs cleaning is an error reported by certain filesystems and can most often be recovered with fsck. This is not a permission error. And checking the health of the disk is never wrong if your filesystem has such errors.
 
Hi,
@fiona and @Distress7707 !
Sorry for my late reply, i've had a back surgery and have been in the hospital for a while.
Thank you for your answers.

First question of all: If one of your workarounds does the trick, will I be able to use / restore the ioBroker backup on the local-lvm.

As mentioned in my inital post, I'm a Linus layman.
So could you give me the exact steps and commands to type in the shell, please?
I want to try both of your possible solutions.

Thank you for your help in advance.

Best regards,
Ingwaz
 
Hi,
@fiona and @Distress7707 !
Sorry for my late reply, i've had a back surgery and have been in the hospital for a while.
Thank you for your answers.
Hope you have a speedy recovery!
First question of all: If one of your workarounds does the trick, will I be able to use / restore the ioBroker backup on the local-lvm.
You should be able to restore if the problematic part of the file system is not exactly for that backup and the disk is still well.
As mentioned in my inital post, I'm a Linus layman.
So could you give me the exact steps and commands to type in the shell, please?
I want to try both of your possible solutions.
For checking the physical disk, on the host that has the physical disk containing the Backup_Data, smartctl -a /dev/XYZ where you'll need to replace XYZ with the actual device. Use e.g. lsblk -f to find out which disk is which.

For checking the file system run fsck /path/to/mountpoint or fsck /dev/XYZ replacing XYZ with the partition with the filesystem this time (or the device if there are no partitions).
 

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!