[Lustre-discuss] Could I restore OST without EA ?

Tung-Han Hsieh thhsieh at twcp1.phys.ntu.edu.tw
Wed Mar 11 23:08:38 PDT 2015


Dear Dilger,

On Thu, Mar 12, 2015 at 05:42:33AM +0000, Dilger, Andreas wrote:
> On 2015/03/11, 12:57 AM, "Tung-Han Hsieh" <thhsieh at twcp1.phys.ntu.edu.tw>
> wrote:
> 
> >But here we encounter a problem. Since the facilities of the data
> >rescue company is Windows based, they told me that the most they
> >can do is to recover the data files, but without all the informations
> >of their corresponding inodes (they don't have the tools to do that).
> >That means, the owners, creation/modification times, permissions, and
> >EA's of all the files can not be recovered. Now we hope that without
> >EA's these files can still be accessable. But we still have to fix
> >the problems of the owners, creation times, and permissions.
> 
> None of these attributes are needed for the OST to work.
> 
> >Is it possible that, using the EA's of MDT, could we figure out the
> >location of each file ? I mean, could we find, for example, the
> >location of
> >
> >	MDT:  /ROOT/the/full/path/to/a/file
> >
> >that is in which OST and which file ? Then we can manually fix their
> >owner, creation / modification time, and permission manually, according
> >to those of the corresponding file in MDT.
> 
> With Lustre 2.6 and later, LFSCK will automatically repair these
> attributes,
> and without them it is not very easy to do this.
> 
> Cheers, Andreas

Thanks for your reply.

I know that if the Lustre filesystem is properly mounted by a client, e.g.,

	mount -t lustre mdt:/fsname /mnt

Then I can find out all files under /mnt in a specific OST, i.e.,

	/opt/lustre/bin/lfs find --obd fsname-OSTXXXX_UUID /mnt

Now our lustre filesystem cannot be properly mounted at this moment.
What we can do is to login into MDT and mount it through the ldiskfs:

	mount -t ldiskfs /dev/sda1 /mnt

and then access to all the "filenames" and their EA's under

	/mnt/ROOT/

Is there a similar way to find the files in which OST and which files
in that OST ? We don't mind to prepare a C code or script to do this
task.

Another quesion, if I can map all the files in MDT to their corresponding
files in OST, could I use the EA obtained from the MDT and restore it
to the corresponding file in OST ?

Thank you very much.


Cheers,

T.H.Hsieh


> >Thank you very much for your great help.
> >
> >
> >Best Regards,
> >
> >T.H.Hsieh
> >
> >
> >On Fri, Feb 13, 2015 at 06:09:46PM +0000, Dilger, Andreas wrote:
> >> On 2015/02/12, 2:47 AM, "Tung-Han Hsieh" <thhsieh at twcp1.phys.ntu.edu.tw>
> >> wrote:
> >> 
> >> >We have a Lustre filesystem (version 1.8.8) in our lab, which
> >> >contains several about 20 OSTs and only one MDT. Recently one
> >> >of our file server got serious crashed. It contains 4 OSTs
> >> >stored in RAID 5. We sent the file server to data rescue company.
> >> >They told me that they can rescue all the data files, but the EA
> >> >of these files may be lost.
> >> >
> >> >In the Lustre Operational Manual, I learn that to restore the
> >> >MDT in filesystem level, we should restore both all the files
> >> >as well as their EAs. But how about OST ? Could we restore it
> >> >without the EA of files ? I mean, without running this ?
> >> >
> >> >	setfattr --restore=ea.bak
> >> >
> >> >If very fortunately I can restore it without EA, what is the
> >> >next I should do to bring the whole filesystem to be in a
> >> >consistant state ?
> >> 
> >> That depends on whether there is other corruption in the OST
> >>filesystems.
> >> You do not need the OST EAs for normal usage, but if the OST directory
> >> structure is corrupted then the EA data is useful to rebuild the OST
> >> directory structure (use ll_recover_lost_found_objs to move objects from
> >> lost+found/ into O/0/d*/ directories).
> >> 
> >> Cheers, Andreas
> >> -- 
> >> Andreas Dilger
> >> 
> >> Lustre Software Architect
> >> Intel High Performance Data Division
> >> 
> >> 
> >_______________________________________________
> >lustre-discuss mailing list
> >lustre-discuss at lists.lustre.org
> >http://lists.lustre.org/mailman/listinfo/lustre-discuss
> >
> 
> 
> Cheers, Andreas
> -- 
> Andreas Dilger
> 
> Lustre Software Architect
> Intel High Performance Data Division
> 
> 



More information about the lustre-discuss mailing list