Re: Need to remove a ghost file, but can't because it doesn't exist
On Thu, Nov 16, 2006 at 08:19:55AM -0600, Mike McCarty wrote:
> hendrik@topoi.pooq.com wrote:
> >On Thu, Nov 16, 2006 at 10:14:00AM +0000, J.A. de Vries wrote:
> >
> >>On 2006-11-15 @ 22:27:03 (week 46) Mike McCarty wrote:
> >>
> >>
> >>>OTOH, something is there. Try using
> >>>
> >>># lsof
> >>
> >>Ah, hadn't thought of lsof or fuser yet. Good reminder, thanks!
> >>
> >>I tried both but lsof didn't list the file as being used and fuser
> >>couldn't find the file at all ("No such file or directory").
> >>
> >>
> >>>He probably has a file which has been deleted, but which
> >>>some process still has open. This causes the directory
> >>>entry to be marked "for deletion", but for the allocation
> >>>not to be released to free space until the last process
> >>>has closed the file.
> >
> >
> >I thought that a deleted file that was still being read *was* unlinked
> >from the directory, just not removed from the disk until it was closed.
>
> Sorry, I wasn't speaking of the internal details. But there is certainly
> a directory entry, or lsof couldn't display the name. For example..
>
> $ /usr/sbin/lsof | grep deleted
> gconfd-2 3630 jmccarty 13wW REG 3,5 625 258777
> /tmp/gconfd-jmccarty/lock/0t1161529398ut556742u500p3630r1806880270k3220436076
> (deleted)
> nautilus 3678 jmccarty 27r REG 8,65 1250 2097341
> /mnt/usb/home/jmccarty/projects/restoration/Tubes/0DataSheets/Sylvania_1951.txt
> (deleted)
I get the same kind of thing:
hendrik@lovesong:~$ /usr/sbin/lsof | grep deleted
lsof: WARNING: can't stat() reiserfs file system /dev/.static/dev
Output information may be incomplete.
gconfd-2 5234 hendrik 12wW REG 3,3 625 111981
/tmp/gconfd-hendrik/lock/0t1163535914ut683443u1001p5234r2034689075k3221223836
(deleted)hendrik@lovesong:~$ ls -al /tmp/gconfd-hendrik/lock/0t1163535914ut683443u1001p5234r2034689075k3221223836
ls: /tmp/gconfd-hendrik/lock/0t1163535914ut683443u1001p5234r2034689075k3221223836: No such file or directory
hendrik@lovesong:~$
Interesting. Live and learn. This doesn't fit my mental model of a
file system at all... I guess I have to find a new one.
Could those deleted files be symbolic links? Or former named pipes? Or
something else strange?
-- hendrik
>
> Mike
> --
> p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
> This message made from 100% recycled bits.
> You have found the bank of Larn.
> I can explain it for you, but I can't understand it for you.
> I speak only for myself, and I am unanimous in that!
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org
>
Reply to: