Solved

CentOS 4.2.1 folder marked as an unknown file type

Posted on 2011-03-10
5
453 Views
Last Modified: 2013-12-16
My dev/sda2 partition on a Rocks CentOS cluster filled up and corrupted the var/log folder. The log folder s now marked as an "unknown" file type. Is there a tool that can change the attributes back to that of a folder. I have no current backups of this folder.
0
Comment
Question by:NeedsHelpToo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 16

Assisted Solution

by:santoshmotwani
santoshmotwani earned 200 total points
ID: 35103698
There is a command in linux : chattr ( FYI it only works on ext2/ext3 partition)

Here is an example : http://www.linuxhowtos.org/Tips%20and%20Tricks/chattr.htm
http://linux.about.com/od/commands/l/blcmdl1_chattr.htm

0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35106504
How about fsck?

Wich filesystem is the folder in? Can you unmount it to run fsck?

wmp
0
 

Author Comment

by:NeedsHelpToo
ID: 35108303
The file system on /var is ext3. The umount /var or umount /dev/sda2 both yield "device is busy" response. The command chattr -D /var/log response is "chattr: Input/output error while trying to stat /var/log". I also tested both of these commands in single user mode. It appears that any command that trys to touch /var/log gets the response "Input/output error. I

0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 300 total points
ID: 35108358
I fear you will have to boot from CD into rescue mode to be able to repair the filesystem /var!

I still think fsck is the best (if not the only) choice!

http://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-rescuemode-boot.html
0
 

Author Comment

by:NeedsHelpToo
ID: 35112117
I booted into rescue mode from the CD and tried mounting my file system and skipped mounting my file system, but was still unable to get fsck to work. I found another discussion at

http://www.linuxforums.org/forum/miscellaneous/35926-cannot-boot-up-linux-unable-read-superblock.html

From this discussion I used mke2fs -n /dev/sda2 to discover the superblock backups. Then I used e2fsck -b 32768 /dev/sda2 which said it was going to correct file errors. When it was done the corrupt file was gone and I created the directory /var/log. Everythings not perfect but many of my services were able to create new log files and start properly.

Thanks for all your help

NeedsHelpToo
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Apache LDAP Authentication 20 71
pvcreate issue 5 95
Can't connect to FTP 18 151
regular expression help for sed command 5 62
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question