[Lustre-discuss] Lost Files - How to remove from MDT

Charles Taylor taylor at hpc.ufl.edu
Sun Apr 18 07:55:44 PDT 2010


On Apr 18, 2010, at 10:47 AM, Miguel Afonso Oliveira wrote:

> Hi again,
> 
> Sorry I forgot to mention this only works if the "offending" OST still exists. If at this time you can no longer re-include the OST where these files existed then you can still
> create a new one with the same index and then you can unlink.

Ok, thanks.   We may go ahead and try that.

Charlie

> 
> MAO
> On Apr 18, 2010, at 3:16 PM, Charles Taylor wrote:
> 
>> 
>> On Apr 18, 2010, at 9:35 AM, Miguel Afonso Oliveira wrote:
>> 
>>> Hi,
>>> 
>>> You are going to have to use "unlink" with something like this:
>>> 
>>> for file in lost_files
>>> 	unlink $file
>> 
>> Nope.   That's really no different than "rm" and produces the same result...
>> 
>> unlink /scratch/crn/bwang/NCS/1O5P/1o5p_wat.prmtop
>> unlink: cannot unlink `/scratch/crn/bwang/NCS/1O5P/1o5p_wat.prmtop': Invalid argument
>> 
>> Thanks for the suggestion though,
>> 
>> Charlie Taylor
>> UF HPC Center
>> 
>>> 
>>> Cheers,
>>> 
>>> Miguel Afonso Oliveira
>>> 
>>> P.S.: To build a list of all your lost files you can do a rsync with the dry-run flag.
>>> 
>>> On Apr 18, 2010, at 2:30 PM, Charles Taylor wrote:
>>> 
>>>> We lost an OST several months ago and could not recover it.    We decided to deactivate until we bring some new storage online and can just rebuild the entire file system.    However, now, the MDT still knows about all the files that were on the lost OST and this results in things like "invalid argument" and "?--------?   ?    .." in directory listings.    The files cannot be removed by standard commands.   We end up doing something like....
>>>> 
>>>> mv Dir to Tmp
>>>> cp -r Tmp Dir   (this produces lots of 'cp: cannot stat ...' for the missing files)
>>>> mv Tmp /lost+found (this moves all the missing file names more or less out of the way).
>>>> 
>>>> Is there some way to remove these files from the MDT - as though they never existed - without reformatting the entire file system?
>>>> 
>>>> Thanks,
>>>> 
>>>> Charlie Taylor
>>>> UF HPC Center
>>>> 
>>>> _______________________________________________
>>>> Lustre-discuss mailing list
>>>> Lustre-discuss at lists.lustre.org
>>>> http://lists.lustre.org/mailman/listinfo/lustre-discuss
>>> 
>> 
>> _______________________________________________
>> Lustre-discuss mailing list
>> Lustre-discuss at lists.lustre.org
>> http://lists.lustre.org/mailman/listinfo/lustre-discuss
> 
> _______________________________________________
> Lustre-discuss mailing list
> Lustre-discuss at lists.lustre.org
> http://lists.lustre.org/mailman/listinfo/lustre-discuss




More information about the lustre-discuss mailing list