xfs
[Top] [All Lists]

Re: Undeletable file

To: Vincent Bernat <bernat@xxxxxxx>
Subject: Re: Undeletable file
From: utz lehmann <xfs@xxxxxxxxxx>
Date: Mon, 19 Nov 2001 19:44:22 +0100
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <m3y9l2u1p8.fsf@neo.loria>
References: <m3y9l2u1p8.fsf@neo.loria>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
Hi

Vincent Bernat [bernat@xxxxxxx] wrote:
> Hi !
> 
> [I have already posted this message this week-end, however, it seems
> that it has been lost]
> 
> I compiled dosemu a few days ago and I have experienced some lockups
> on the creation of some files. I don't know if these lockups are due
> to XFS. But finaly, dosemu works fine.
> 
> However, I have a file that I cannot delete, list or do anything on
> it.
> 
> sh-2.03$ ls -l emufs.s.out 
> ls: emufs.s.out: Value too large for defined data type
> sh-2.03$ du emufs.s.out 
> du: emufs.s.out: Value too large for defined data type
> sh-2.03$ rm emufs.s.out 
> rm: cannot remove `emufs.s.out': Value too large for defined data type
> 
> I have an "old" glibc (2.1) which doesn't support large file. Is there
> a way (via a C program ?) to delete this file ? I think it is a sparse
> file (I have no room for a more than 2 GB file).

First you should check the filesystem (xfs_check or xfs_repair -n). Maybe
the lockups produced some filesystem corruption.


The trick is to truncate the file below 2GB. Then your rm should work.

Try ">emufs.s.out" on a shell. If this works, you have a 0 byte emufs.s.out.

If this doesnt work, you could try the attached c program. It truncates a file
to a given number of bytes:

trunc 0 emufs.s.out


Hope that helps.

utz

Attachment: trunc.c
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>