Active Topics

 


Reply
Thread Tools
Posts: 15 | Thanked: 6 times | Joined on Nov 2007
#1
Learned the hard way that there's a 4GB file limit. Now I have a directory with a bogus entry. I was copying a 5GB file from another machine, and this is what it looked like there:

% scp In\ the\ Shadow\ of\ the\ Moon\ \(Recorded\ Jul\ 16,\ 2009,\ TDCC\).mpg user@192.168.1.1:/media/mmc1
user@192.168.1.1's password:
In the Shadow of the Moon (Recorded Jul 16, 2 80% 4098MB 744.8KB/s 22:48 ETAFile size limit exceeded
In the Shadow of the Moon (Recorded Jul 16, 2 80% 4098MB 708.7KB/s 23:58 ETAlost connection

This is what it looks like on the Nokia (N810, OS2008):

/media/mmc1 $ ls -l
ls: ./In the Shadow of the Moon (Recorded Jul 16, 2009, TDCC).mpg: Value too large for defined data type

I can't get an inode:

/media/mmc1 $ ls -i
ls: ./In the Shadow of the Moon (Recorded Jul 16, 2009, TDCC).mpg: Value too large for defined data type

Based on the output of df, the file doesn't exist, but its header does. I tried rebooting, no difference. How do I repair this directory? I don't think I can just create another directory and move everything into it, because /media/mmc1 is the mount point for the external card.
 
Bundyo's Avatar
Posts: 4,708 | Thanked: 4,649 times | Joined on Oct 2007 @ Bulgaria
#2
Which file system?
__________________
Technically, there are three determinate states the cat could be in: Alive, Dead, and Bloody Furious.
 

The Following User Says Thank You to Bundyo For This Useful Post:
Posts: 540 | Thanked: 387 times | Joined on May 2009
#3
It's FAT32 obviously.

I assumed you already tried to remove the file with rm -f (as root)
If this file was saved to the external SD card, did you try putting into a desktop/laptop (Linux) and mounting it?

There might be another way to delete it that is slipping my mind...

Hope you have the files backed up as you might need to format that card's partition.
 
Bundyo's Avatar
Posts: 4,708 | Thanked: 4,649 times | Joined on Oct 2007 @ Bulgaria
#4
fsck in linux/checkdisk in windows?
 

The Following 2 Users Say Thank You to Bundyo For This Useful Post:
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#5
Originally Posted by pjscott View Post
Learned the hard way that there's a 4GB file limit.
Interesting... Using dd the maximum size I can produce on a VFAT card is one byte under 2GiB, and the limit seems to be imposed by the kernel: when dd reaches that it receives signal 25 (SIGXFSZ) and dies.

I'm running an scp now but it estimates it's going to take another hour or so...

How do I repair this directory?
If rm doesn't work, try

Code:
$ perl -le 'unlink "In the Shadow of the Moon (Recorded Jul 16, 2009, TDCC).mpg";'
If that doesn't work either, you'll probably have to resort to dosfsck. Assuming your card is /dev/mmcblk1p1:

Code:
# umount /dev/mmcblk1p1
# dosfsck -d "In the Shadow of the Moon (Recorded Jul 16, 2009, TDCC).mpg" \
/dev/mmcblk1p1
# dosfsck -a /dev/mmcblk1p1
 

The Following 3 Users Say Thank You to lma For This Useful Post:
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#6
Originally Posted by lma View Post
I'm running an scp now but it estimates it's going to take another hour or so...
It's reached past the 2048MB point now and still going...

Originally Posted by pjscott View Post
/media/mmc1 $ ls -l
ls: ./In the Shadow of the Moon (Recorded Jul 16, 2009, TDCC).mpg: Value too large for defined data type
Looks like a busybox problem (built without LARGEFILE support). The Fremantle version is OK, so it seems pointless to file a bug at this stage :-/

I'm attaching an (earlier) Fremantle busybox binary built on Diablo, just in case it helps you. Do not put it in /bin, just somewhere where it can be executable and use it with an explicit path. For example:

Code:
scp busybox.gz root@<tablet>:
on your PC, and
Code:
# gunzip /root/busybox.gz
# chmod +x /root/busybox
# /root/busybox ls -l /media/mmc1
on the tablet.
Attached Files
File Type: gz busybox.gz (190.8 KB, 244 views)
 

The Following 2 Users Say Thank You to lma For This Useful Post:
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#7
Originally Posted by lma View Post
Looks like a busybox problem (built without LARGEFILE support). The Fremantle version is OK, so it seems pointless to file a bug at this stage :-/
Never mind, that was bug 3917 actually.
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#8
Originally Posted by lma View Post
It's reached past the 2048MB point now and still going...
Terminated at 4294967295 bytes as expected. FYI, the Diablo rm can't delete such a file:

Code:
rm: cannot stat '4gbfile': Value too large for defined data type
but perl worked.
 

The Following User Says Thank You to lma For This Useful Post:
Posts: 15 | Thanked: 6 times | Joined on Nov 2007
#9
Thanks, that worked! I am embarrassed that I assumed a straight unlink wouldn't work and didn't bother to try perl... since I am the author of three books on Perl :-)
 

The Following User Says Thank You to pjscott For This Useful Post:
Reply

Tags
broken, directory, header, large file


 
Forum Jump


All times are GMT. The time now is 19:18.