View previous topic :: View next topic |
Author |
Message |
yaman666 Tux's lil' helper
Joined: 13 Dec 2002 Posts: 117 Location: Chicago, IL
|
Posted: Wed Aug 08, 2007 4:21 pm Post subject: Removing files with illegal filenames |
|
|
Somehow I got some corrupted filenames in one of the postfix mailboxes:
Code: | # ls
ls: cannot access î*: No such file or directory
ls: cannot access ─Hed╛Y
: No such file or directory
ls: cannot access ¬: No such file or directory
ls: cannot access %╬: No such file or directory
ls: cannot access : No such file or directory
ls: cannot access : No such file or directory
ls: cannot access ┬: No such file or directory
ls: cannot access (: No such file or directory
ls: cannot access 0: No such file or directory
ls: cannot access : No such file or directory
ls: cannot access : No such file or directory
ls: cannot access
Ò;F!: No such file or directory
ls: cannot access ┬: No such file or directory
ls: cannot access ┬: No such file or directory
ls: cannot access A: No such file or directory
ls: cannot access ÷Y
: No such file or directory
ls: cannot access : No such file or directory
ls: cannot access @: No such file or directory
ls: cannot access M112126P2172: No such file or directory
ls: cannot access 7700: No such file or directory
ls: cannot access Ì: No such file or directory
ls: cannot access ÷Y
: No such file or directory
ls: cannot access X: No such file or directory
ls: cannot access ÷Y
: No such file or directory
ls: cannot access ÷Y
: No such file or directory
ls: cannot access : No such file or directory
ls: cannot access : No such file or directory
ls: cannot access =: No such file or directory
ls: cannot access ÷Y
: No such file or directory
ls: cannot access ÷Y
: No such file or directory
ls: cannot access =: No such file or directory
ls: cannot access ÊÊ,: No such file or directory
ls: cannot access : No such file or directory
ls: cannot access =: No such file or directory
ls: cannot access : No such file or directory
ls: cannot access: No such file or directory
ls: cannot access : No such file or directory
ls: cannot access 1150027081.V8288I3dd598.x.x: No such file or directory
=? =? @ ? ?*? ??? ?? ? ??? 0 7700? ??;F! M112126P2172? ?Y? ?Y? ?Y?
=? ( %?? ? ??, ?? ?? ? ??? 1150027081.V8288I3dd598.x.x? ?A ?Hed?Y? X?? ?Y? ?Y? ?Y?
|
And removing them doesn't work well either:
Code: |
# rm *
rm: cannot remove `': No such file or directory
rm: cannot remove `': No such file or directory
rm: cannot remove `': No such file or directory
rm: cannot remove `': No such file or directory
rm: cannot remove `': No such file or directory
rm: cannot remove `': No such file or directory
rm: cannot remove `=\002': No such file or directory
rm: cannot remove `=\002': No such file or directory
rm: cannot remove `=\002': No such file or directory
rm: cannot remove `(': No such file or directory
rm: cannot remove `@': No such file or directory
rm: cannot remove `%\276\032': No such file or directory
rm: cannot remove `\370': No such file or directory
rm: cannot remove `\001': No such file or directory
rm: cannot remove `\300*\031': No such file or directory
rm: cannot remove `\377\377,': No such file or directory
rm: cannot remove `\210\355\031': No such file or directory
rm: cannot remove `\210\023': No such file or directory
rm: cannot remove `\210\023': No such file or directory
rm: cannot remove `\210\023': No such file or directory
rm: cannot remove `\002': No such file or directory
rm: cannot remove `\b': No such file or directory
rm: cannot remove `\020\002\004': No such file or directory
rm: cannot remove `\020\002\004': No such file or directory
rm: cannot remove `0': No such file or directory
rm: cannot remove `1150027081.V8288I3dd598.x.x\001': No such file or directory
rm: cannot remove `7700\001': No such file or directory
rm: cannot remove `\030A': No such file or directory
rm: cannot remove `\f\327;F!': No such file or directory
rm: cannot remove `\200Hed\254Y\n': No such file or directory
rm: cannot remove `M112126P2172\001': No such file or directory
rm: cannot remove `X\001\004': No such file or directory
rm: cannot remove `\247Y\n': No such file or directory
rm: cannot remove `\247Y\n': No such file or directory
rm: cannot remove `\247Y\n': No such file or directory
rm: cannot remove `\247Y\n': No such file or directory
rm: cannot remove `\247Y\n': No such file or directory
rm: cannot remove `\247Y\n': No such file or directory |
This is reiserfs filesystem - any suggestions?
Thanks! |
|
Back to top |
|
|
IQgryn l33t
Joined: 05 Sep 2005 Posts: 764 Location: WI, USA
|
Posted: Wed Aug 08, 2007 5:00 pm Post subject: |
|
|
Reiserfs occasionally (though rarely) creates files that can't be deleted, usually caused by a power outage or hard restart. You'll need to run a full fsck on the filesystem. You can try this first: Code: | reiserfsck --fix-fixable <device> | but if that doesn't work, you'll have to run Code: | reiserfsck --rebuild-tree <device> | which can lose EVERYTHING if the power goes out during the check (please back up anything you care about first)
See man reiserfsck for more information about the different options. |
|
Back to top |
|
|
didymos Advocate
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Thu Aug 09, 2007 1:25 am Post subject: |
|
|
IQgryn wrote: | Code: | reiserfsck --rebuild-tree <device> | which can lose EVERYTHING if the power goes out during the check (please back up anything you care about first)
|
It doesn't even require a power outage to screw the filesystem. I lost power once when I still used reiserfs. It booted, but had serious issues with /usr, so I did the rebuild tree thing after the standard fix-fixable run. It rebuilt a tree, but it only partly resembled what should have been there. Since the system was now irretrievably toasted due to missing libs and bits and pieces of the toolchain, I experimented and ran rebuild-tree a few more times. Every time, even though nothing had changed between runs, it came up with a completely different tree. It ended up with some creatively generated file names and a totally bizarre directory structure. I imagine I could have kept doing that until finally, nothing was left. Instead I just backed up my /home, wiped everything and used ext3 instead. Not one serious problem on any partition, ever. The worst damage a power outage has caused was to not free a few inodes for stuff I'd deleted. _________________ Thomas S. Howard |
|
Back to top |
|
|
yaman666 Tux's lil' helper
Joined: 13 Dec 2002 Posts: 117 Location: Chicago, IL
|
Posted: Thu Aug 09, 2007 2:28 am Post subject: |
|
|
Unfortunately this is a production server, so taking it offline to do reisrefsck is not an option, and neither is losing everything.
But thanks for the info! I thought there may have been a simpler way that didn't require deep file system meddling. |
|
Back to top |
|
|
Mantaar Apprentice
Joined: 17 May 2007 Posts: 219
|
Posted: Thu Aug 09, 2007 2:52 am Post subject: |
|
|
You mean running a production server with an inconsistent fs is an option?...
I think you're playing with fire... _________________ Error compiling committee.c: too many arguments to function. |
|
Back to top |
|
|
yaman666 Tux's lil' helper
Joined: 13 Dec 2002 Posts: 117 Location: Chicago, IL
|
Posted: Thu Aug 09, 2007 4:27 am Post subject: |
|
|
Mantaar wrote: | You mean running a production server with an inconsistent fs is an option?...
I think you're playing with fire... |
Well, it is so far an isolated issue and it may have something to do with the fact that mail was migrated from another postfix installation on the old server to this one. As long as I don't see any more problems like this, I don't see a reason to panic. |
|
Back to top |
|
|
Akkara Bodhisattva
Joined: 28 Mar 2006 Posts: 6702 Location: &akkara
|
Posted: Thu Aug 09, 2007 5:14 am Post subject: |
|
|
Quote: | As long as I don't see any more problems like this, I don't see a reason to panic. |
(emphasis mine)
I'd start those backups going. Just in case.
Better yet, set up a similarly-partitioned drive in another machine and start an rsync going. This should get most of the non-live data. Then shut down all the server's services and follow up with another rsync to catch any changes since the first one. Swap drives and restart the server. Now you can play with the funny filenames offline at your leisure. |
|
Back to top |
|
|
yaman666 Tux's lil' helper
Joined: 13 Dec 2002 Posts: 117 Location: Chicago, IL
|
Posted: Thu Aug 09, 2007 5:39 am Post subject: |
|
|
Akkara wrote: |
I'd start those backups going. Just in case.
Better yet, set up a similarly-partitioned drive in another machine and start an rsync going. This should get most of the non-live data. Then shut down all the server's services and follow up with another rsync to catch any changes since the first one. Swap drives and restart the server. Now you can play with the funny filenames offline at your leisure. |
Got daily backups in place, no worries. The machine is a colo box though, so it's not getting a hard drive change until it is REALLY needed. This is not enough cause to warrant me going there. But thanks for the suggestions! |
|
Back to top |
|
|
manaka Apprentice
Joined: 23 Jul 2007 Posts: 178 Location: Spain
|
Posted: Tue Aug 14, 2007 3:32 pm Post subject: |
|
|
I have also found ReiserFS metadata corruption in case of power outages. In theory, as it does metadata journaling, that shouldn't happen. The following link gives some enlightenment about these issues...
http://linuxmafia.com/faq/Filesystems/reiserfs.html _________________ Javier Miqueleiz
"Listen to your heart. It knows all things, because it came from the Soul of the World, and it will one day return there." |
|
Back to top |
|
|
yaman666 Tux's lil' helper
Joined: 13 Dec 2002 Posts: 117 Location: Chicago, IL
|
Posted: Tue Aug 14, 2007 5:43 pm Post subject: |
|
|
Come to think of it, I think we may have had 1 or 2 power outages on that machine before it was moved to colo location. May be that was it! |
|
Back to top |
|
|
|