Using Ubuntu 14.04.1 LTS, I have mounted a 1 TB usb drive formatted with FAT32.
The drive was mounted with this command (no error) :
sudo mount -t vfat /dev/sdc1 /media/jpgs/
- I create a single folder named "test"
- I copy images into this folder (~ 5MB per image)
- After ~ 20000 files copied, the system throws this error : ... No space left on device
That's obviously not the case, as I can still create a new directory and copy files into it...
According to this question : https://stackoverflow.com/questions/466521/how-many-files-can-i-put-in-a-directory, I should be able to put 65,535 files per directory.
I have read many questions regarding this issue and cannot find a clear explanation nor a solution.
I have tested it with different versions of ubuntu and different drives and I always see the same error.
No problem when I plug the drive on a mac osX system.
Results of fdisk, df, fsck :
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sdc1 932G 63G 869G 7% /media/jpgs $ fdisk -l Disk /dev/sdc: 1000.2 GB, 1000202043392 bytes 255 heads, 63 sectors/track, 121600 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdc1 1 121601 976759749 b W95 FAT32 fsck from util-linux-ng 2.17.2 dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN /dev/sdc1: 24068 files, 2059652/30516291 clusters $ mount /dev/sda1 on / type ext4 (rw,errors=remount-ro,acl) proc on /proc type proc (rw,noexec,nosuid,nodev) [...] /dev/sdc1 on /media/jpgs type vfat (rw)
Edit: output of
sudo dosfsck -v /dev/sdc1
fsck.fat 3.0.26 (2014-03-07) fsck.fat 3.0.26 (2014-03-07) Checking we can access the last sector of the filesystem Boot sector contents: System ID "BSD 4.4" Media byte 0xf0 (5.25" or 3.5" HD floppy) 512 bytes per logical sector 32768 bytes per cluster 32 reserved sectors First FAT starts at byte 16384 (sector 32) 2 FATs, 32 bit entries 122065408 bytes per FAT (= 238409 sectors) Root directory start at cluster 2 (arbitrary size) Data area starts at byte 244147200 (sector 476850) 30516291 data clusters (999957823488 bytes) 32 sectors/track, 255 heads 0 hidden sectors 1953519498 sectors total Checking for unused clusters. Checking free cluster summary. /dev/sdb1: 24068 files, 2059652/30516291 clusters