Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Phantom directory

Status
Not open for further replies.

J1gh2

MIS
Jul 7, 2004
109
GB

Please help.

We mistakently deleted a directory that had been exported (while it was still exported). However, I have re-instated the exported directoy on the server but this action appears to have corrupted some directories on the client and it would not allow these directories to be deleted or re-created. Essentially we now have phanton directories on the client. They are listed with ls but ls -lrt.

ls -al | cat -ev
ls: 0653-341 The file ./develop does not exist.
ls: 0653-341 The file ./mikea does not exist.
ls: 0653-341 The file ./mikeh does not exist.
ls: 0653-341 The file ./johnl does not exist.
ls: 0653-341 The file ./kenp does not exist.
ls: 0653-341 The file ./heathera does not exist.

When I run rm to remove the directories I get " A file, file system or message queue is no longer available."

cd to any of the listed directories produces " 0403-036 The specified directory is not valid."

I found a similar problem in thread52-675972 but the suggestions given there have not worked for me.

ls -i shows the directories with the following inode numbers

329736 johnl
329730 mikea
329761 heathera
329738 kenp
329734 mikeh

In thread52-675972, a similar command to
"find . -inum 329730 -exec rm {} \;" resolved the problem by deleting the phantom file. However this fails with

find: 0652-019 The status on ./develop is not valid.
find: 0652-019 The status on ./mikea is not valid.
find: 0652-019 The status on ./mikeh is not valid.
find: 0652-019 The status on ./johnl is not valid.
find: 0652-019 The status on ./kenp is not valid.
find: 0652-019 The status on ./heathera is not valid.

I can`t create other directories or files with the same names because it complains that the files already exist.

Would much appreciate your assistance with this issue

Thanks


 
HI,

Try zeroing these dirs using fsdb:

Fixing a bad filesystem with fsdb
=============================
The technics to fix it is :

1. I find the problematic dir/file inode by "ls -lai" - assume it's "16"

2. Unmount the <fs>
3. fsdb /dev/<fs>

File System: /dev/slv1.6

File System Size: 3932160 (512 byte blocks)
Disk Map Size: 36 (4K blocks)
Inode Map Size: 36 (4K blocks)
Fragment Size: 4096 (bytes)
Allocation Group Size: 2048 (fragments)
Inodes per Allocation Group: 2048
Total Inodes: 491520
Total Fragments: 491520

4. 16i

16i
i#: 16 md: d---rwxrwx--- ln: 3 uid: 0 gid: 0
szh: 0 szl: 512 (actual size: 512)
a0: 0x8f a1: 0x00 a2: 0x00 a3: 0x00
a4: 0x00 a5: 0x00 a6: 0x00 a7: 0x00
at: Thu May 24 08:12:10 2001
mt: Wed Feb 21 09:06:10 2001
ct: Wed Feb 21 09:06:10 2001

displays the directory params.

5.ln=0
6.szl =0

this effectively zeroes the params of this directory.

7. quit and fsck,answering "NO" to all suggestions to reconnect,"YES" to suggestions to clear/remove.



Long live king Moshiach !
 
Are you trying to delete, etc, on the client server? Did you cleanup the (now)bad mount on the client after the server lost the directory? Did you cleanup the exported mount from the server?
 
Guys

Thank you very much for your time and help. I am sorry that I couldn`t get back to you earlier.

In the end, I rebooted the node and this resolved the issue, though I had to restore the corrupted directory from backup.

Thanks a lot

Long live king Moshiach indeed -:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top