Unix & Linux: Cannot remove file: "Structure needs cleaning" (5 Solutions!!)
Unix & Linux: Cannot remove file: "Structure needs cleaning"
The Question: I have an external hard drive which is encrypted via LUKS. It contains an ext4
fs.
I just got an error from rsync for a file which is located on this drive:
rsync: readlink_stat("/home/some/dir/items.json") failed: Structure needs
cleaning (117)
If I try to delete the file I get the same error:
rm /home/some/dir/items.json
rm: cannot remove '//home/some/dir/items.json': Structure needs cleaning
Does anyone know what I can do to remove the file and fix related issues with
the drive/fs (if there are any)?
Solutions: Please watch the whole video to see all solutions, in order of how many people found them helpful
== This solution helped 27 people ==
That is strongly indicative of file-system corruption. You should unmount, make
a sector-level backup of your disk, and then run e2fsck to see what is up. If
there is major corruption, you may later be happy that you did a sector-level
backup before letting e2fsck tamper with the data.
== This solution helped 8 people ==
If it helps anyone, I had a similar issue (rsync/rsnapshot backups, on an
affected file). I posted my problem/solution, here:
https://ubuntuforums.org/showthread.php?t=2348768&p=13627299#post13627299
SUMMARY:
rsnapshot (rsync) backup error on arch linux x86_64 system; a corrupted,
deeply-nested file was throwing that error, also shown when I tried to delete
that file:
sudo rm -fR hourly.5/
rm: cannot remove 'hourly.5/snapshot_root/mnt/Vancouver/temp/temp - old/temp -
09 (Dec 07, 2014 - Sep 02, 2015)/a_OLD-gmail/[email protected]/
[Gmail]/LINUX/rsync, rsnapshot; Other backups/19.bak': Structure needs cleaning
Here is the problem:
cd mnt/Vancouver/temp/temp - old/temp - 09 (Dec 07, 2014 - Sep 02, 2015)/a_OLD-
gmail/[email protected]/[Gmail]/LINUX/rsync, rsnapshot; Other
backups/
ls -l
ls: cannot access '19.bak': Structure needs cleaning
total 0
-????????? ? ? ? ? ? 19.bak ## << THAT IS THE PROBLEM!!
[ See also: https://www.reddit.com/r/linuxquestions/comments/4b47r2/
has_anyone_ever_gotten_structure_needs_cleaning/ ]
My backup drive is /dev/sda1.
sudo umount /dev/sda1
sudo fsck.ext4 /dev/sda1 ## << accepted suggested fixes
Rebooted: all seems fine. Went into backups drive, deleted that problematic
file:
/mnt/Backups/rsnapshot_backups/hourly.5/snapshot_root/mnt/Vancouver/temp/temp -
old/temp - 09 (Dec 07, 2014 - Sep 02, 2015)/a_OLD-gmail/
[email protected]/[Gmail]/LINUX/rsync, rsnapshot; Other backups/
19.bak
Q.E.D.?!
[Update: yes; that worked: my backups are running normally, again! :-) ]
With thanks & praise to God, and with thanks to the many people who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music: https://www.bensound.com/royalty-free-music | Images: https://stocksnap.io/license & others | With thanks to user Victoria Stuart (https://unix.stackexchange.com/users/135372), user Rotareti (https://unix.stackexchange.com/users/148560), user Fillip (https://unix.stackexchange.com/users/317227), user DepressedDaniel (https://unix.stackexchange.com/users/200754), user Chuck (https://unix.stackexchange.com/users/322654), user Ayush Goyal (https://unix.stackexchange.com/users/223940), and the Stack Exchange Network (http://unix.stackexchange.com/questions/330742). Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything is amiss at Roel D.OT VandePaar A.T gmail.com.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Unix & Linux: Cannot remove file: "Structure needs cleaning" (5 Solutions!!)», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.