2000-12-23 07:42:31

by Damacus Porteng

[permalink] [raw]
Subject: Arg. File > 2GB removal

For grins, I did `dd if=/dev/zero of=testfile bs=1024 count=4000000`

Obviously, with the limits of ext2, this isn't allowed, however, dd continued
marrily on its way, tho it spouted an error...

I cancelled the dd and went to remove the file, though the following occured:
root@obfuscated:/home/ftp# rm testfile
rm: cannot remove `testfile': Value too large for defined data type

'ls' complains about the same. I ran e2fsck -f /dev/hde6 (the partition of
/home) and it didn't 'find' the problem.

How do I remove this file and reclaim the HDD space?

Thanks,

D.


2000-12-23 07:50:55

by Chris Wedgwood

[permalink] [raw]
Subject: Re: Arg. File > 2GB removal

you don't mention which kernel you are using, but for some time now
ext2fs has been able to handle large files (>2GB) -- and I suspect dd
created such a beast for you

rm probably stat'd the file beforing removing it -- and failed,
because it's either old or uses and old library (which isn't LFS
aware)



--cw


On Sat, Dec 23, 2000 at 02:16:15AM -0600, Damacus Porteng wrote:
For grins, I did `dd if=/dev/zero of=testfile bs=1024 count=4000000`

Obviously, with the limits of ext2, this isn't allowed, however, dd continued
marrily on its way, tho it spouted an error...

I cancelled the dd and went to remove the file, though the following occured:
root@obfuscated:/home/ftp# rm testfile
rm: cannot remove `testfile': Value too large for defined data type

'ls' complains about the same. I ran e2fsck -f /dev/hde6 (the partition of
/home) and it didn't 'find' the problem.

How do I remove this file and reclaim the HDD space?

Thanks,

D.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

2000-12-23 07:57:18

by CaT

[permalink] [raw]
Subject: Re: Arg. File > 2GB removal

On Sat, Dec 23, 2000 at 02:16:15AM -0600, Damacus Porteng wrote:
> For grins, I did `dd if=/dev/zero of=testfile bs=1024 count=4000000`
>
> Obviously, with the limits of ext2, this isn't allowed, however, dd continued
> marrily on its way, tho it spouted an error...
>
> I cancelled the dd and went to remove the file, though the following occured:
> root@obfuscated:/home/ftp# rm testfile
> rm: cannot remove `testfile': Value too large for defined data type

Hrm... This is with 2.2.18:

[18:17:15] hogarth@theirongiant:/data>> dd if=/dev/zero of=testfile bs=1024 count=4000000
dd: testfile: File too large
2097152+0 records in
2097151+0 records out
[18:21:07] hogarth@theirongiant:/data>> rm testfile
[18:24:16] hogarth@theirongiant:/data>>

So it worked for me... Regardless though have you tried

>testfile
rm testfile

?

--
CaT ([email protected])

'We do more then just sing and dance. We've got a brain too.'
-- The Backstreet Boys

2000-12-23 07:58:57

by William T Wilson

[permalink] [raw]
Subject: Re: Arg. File > 2GB removal

On Sat, 23 Dec 2000, Chris Wedgwood wrote:

> rm probably stat'd the file beforing removing it -- and failed,
> because it's either old or uses and old library (which isn't LFS
> aware)

If that's true, then the following C programlet should remove the file:

Replace "huge-file-name" with the full path of your file, it needs to stay
in quotes.

---

#include <stdio.h>
#include <stdlib.h>

int main()
{
unlink("huge-file-name");
return 0;
}

2000-12-23 08:02:07

by William T Wilson

[permalink] [raw]
Subject: Re: Arg. File > 2GB removal

On Sat, 23 Dec 2000, William T Wilson wrote:

> If that's true, then the following C programlet should remove the file:

I lied. You need to include <unistd.h> not <stdlib.h>

Oh no! This is linux-kernel. I thought it was debian-user. Sorry,
didn't mean to waste bandwidth :}

2000-12-23 08:09:17

by Andreas Jaeger

[permalink] [raw]
Subject: Re: Arg. File > 2GB removal

>>>>> Damacus Porteng writes:

> For grins, I did `dd if=/dev/zero of=testfile bs=1024 count=4000000`
> Obviously, with the limits of ext2, this isn't allowed, however, dd continued
> marrily on its way, tho it spouted an error...
With 2.4 it's allowed.

> I cancelled the dd and went to remove the file, though the following occured:
> root@obfuscated:/home/ftp# rm testfile
> rm: cannot remove `testfile': Value too large for defined data type

> 'ls' complains about the same. I ran e2fsck -f /dev/hde6 (the partition of
> /home) and it didn't 'find' the problem.
You need an rm that's using the LFS interface.

> How do I remove this file and reclaim the HDD space?
Try:
echo > testfile

Andreas
--
Andreas Jaeger
SuSE Labs [email protected]
private [email protected]
http://www.suse.de/~aj