I hope somebody can help us out here. We are running XFS on a Linux Hardware
RAID array (2.6.6 kernel, XFS as a module, RAID contains only data -- no OS
files -- RAID card is 3ware 9000).
A technician of ours was trying to expand our storage with a new RAID card
attached to some additional drives that he put into the empty bays on our
server. During the hardware upgrade (the machine was shutdown, of course)
the file system on the EXISTING RAID became very corrupted. And our OS drive
also got fried. We couldn't reboot. We replaced the OS drive and imaged it with
a recent backup. Then, upon booting up again, when we mounted the existing
array and did an "ls" command -- no files showed up and we got an "unknown
90 or 99" (I forget which).
After studying the problem for a while and looking at various logs, we
rebooted the machine, mounted the RAID, then unmounted the RAID and ran
-n /dev/sda" to see what actions would be taken if we really ran repair. Then
we ran "xfs_repair" for real.
When the process was completed, we had about 10,000 inodes listed in a
lost+found directory. About 3000 were files. The rest were symbolic links to
We listed all the files using Midnight Commander -- and wherever we
highlighted a LINK we could see in the info line at the bottom of Midnight
the name of the file the link used to point to (they're all dead links of
course, because the files they pointed to are not where they used to be).
when we highlighted anything that was NOT a link (i.e., real data), no
information was displayed in MC other than the inode number.
So, at this point, I have about 3000 inodes that still probably contain valid
data, but that no longer are associated with any filenames that I can
recognize or use.
My question is, is there any way to get back the original filenames at this
point -- or has the connection between the filenames and the data been lost?
On another point, is there anything one should do on a daily/weekly basis to
maintain the integrity of an xfs filesystem on Linux? From what I've read, it
seems that it's not recommended to automatically run xfs_check or xfs_repair
on a regular basis but rather, only when you think something is wrong.
Thanks in advance for the help