[Lustre-discuss] How to remove ghost files when running on an LVM snapshot of the MDT?

Arne Wiebalck arne.wiebalck at cern.ch
Fri Jul 10 00:19:12 PDT 2009



Andreas Dilger wrote:
> On Jul 09, 2009  15:44 +0200, Arne Wiebalck wrote:
>> my MDS is running on an LVM snapshot of the MDT. Some files
>> have been deleted after the snapshot was taken, so these
>> appear as 'ghost' files now on the clients and I'm trying
>> to get rid of them.
> 
> Can you please explain more about what you are doing?  Is the
> MDS itself running on an old snapshot?

Sure:

I set up a Lustre FS and created 2 files fileA and fileB.
Then I took an LVM snapshot of the MDT.
I deleted file B and created a third file fileC.

On the client I saw now files fileA and fileC.

Next, I unmounted the MDT and mounted the snapshot.

On the client, I saw now entries for fileA and fileB, as
expected, but fileB is not accessible anymore as it has
been deleted meanwhile.

The goal was now to get the system into a consistent state
again.

I thought I had to do

e2fsck on the MDT and all the OSTs
lfsck on the MDT

If that's the wrong approach, please let me know.

This is all to understand what has to be done in order to use
an LVM snapshot of the MDT in case that's necessary.

>> From what I understood, this requires e2fsck and lfsck. So
> 
> Well, you can just delete those files.  lfsck isn't strictly
> necessary.

On the client you mean? That doesn't work:

-->
[root]# rm fileB
rm: cannot lstat `fileB': No such file or directory
<--

> 
>> I ran e2fsck on the MDT and all the OSTs in order to get the
>> db files for lfsck, however:
>>
>> -->
>> [root at mds tmp]# lfsck -v --mdsdb mdt --ostdb ost.sdb ost.sdc ost.sdd  
>> ost.sde /lustre/backup-MDT/dev/mdtgroup/MDT
> 
> Is this actually where your Lustre filesystem is mounted on the client?

No, that's on the MDT. I thought I need to correct the MDT by running
lfsck in order to get it in sync again with what is on the OSTs, no?

Thanks,
  Arne

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6380 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/attachments/20090710/76455f9c/attachment.bin>


More information about the lustre-discuss mailing list