Find and delete "broken files/inodes" in ext3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Srs,

I need to remove some broken files/inodes in ext3 filesystem running Linux
2.6.18, I can't delete using userspace utilitys:

# ls -l /tmp/apspkgarc/
total 0
?---------  ? ? ? ?           ? AdvancedPoll-2.03-30.app.zip
?---------  ? ? ? ?           ? Coppermine-1.3.3-45.app.zip
?---------  ? ? ? ?           ? joomla-1.0.12-36.app.zip
?---------  ? ? ? ?           ? Mambo-4.6.2-8.app.zip
?---------  ? ? ? ?           ? osCommerce-2.2ms2-52.app.zip
?---------  ? ? ? ?           ? phpBB-2.0.22-19.app.zip
?---------  ? ? ? ?           ? phpBook-1.50-26.app.zip
?---------  ? ? ? ?           ? WordPress-2.0-21.app.zip

# rm -rf /tmp/apspkgarc
rm: cannot remove directory `/tmp/apspkgarc': Directory not empty


Other times I have solved this problem using debugfs, but I don't know if
it's a secure method to make this:

# umount /dev/i2o/hda4
# debugfs -w /dev/i2o/hda4
debugfs 1.35 (28-Feb-2004)
debugfs: freei /var/run/named.pid

"freei" is a secure method to delete those files?

Also, I'm looking for a method or application to search this type of broken
files, now I'am using this shell one-liners:

export LANG=en_US
find / -type s -prune 2> /tmp/find_broken_files.txt > /dev/null
awk '/No such file or directory/ { print $2; }' /tmp/find_broken_files.txt

All advices are welcome, thanks!!

Regards,

--
Santi Saez

_______________________________________________
Ext3-users mailing list
Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux