Page 1 of 1

no space left on device - nearly empty SD card SOLVED / INSOLUBLE

Posted: 1. Nov 2019, 09:28
by mimosa
I just bought an ancient phone (the HTC Desire C) to use as a tablet for Anki flashcards. However it wouldn't fully sync my deck, which contains some quite large collections with audio files.

When I tried copying the files manually, I get a "no space left on device" error, after quite a number of files have been copied. The card is formatted as FAT32 by the phone, and indeed there is a limit of around 65,000 files per directory in FAT, but I am still way short of that, and there is plenty of space.

Of course the card itself could be defective, but before buying another, I'd like to explore whether the problem has some other cause (that a new card wouldn't fix).

Here is some output:

Code: Select all

mimosa[collection.media]$ ls | wc -l
11567
mimosa[collection.media]$ touch test
touch: cannot touch 'test': No space left on device
mimosa[collection.media]$ du -d 1
545824  .
mimosa[collection.media]$ df
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sdb2       28866560 15088452  13082972  54% /
devtmpfs         4031904        0   4031904   0% /dev
tmpfs            4034044     1048   4032996   1% /run
tmpfs            4034044   183624   3850420   5% /dev/shm
cgroup_root      4034044        0   4034044   0% /sys/fs/cgroup
/dev/sda2      102687744 17532824  84484280  18% /home/Data
/dev/sdb1         270812    59504    211308  22% /boot/efi
tmpfs            4034044        0   4034044   0% /tmp
/dev/sdd1       31154688   856416  30298272   3% /media/3832-3034
mimosa[collection.media]$ cat /etc/mtab
/dev/sdb2 / btrfs rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
/dev/sda2 /home/Data btrfs rw 1 2
/dev/sdb1 /boot/efi vfat rw 1 0
tmpfs /tmp tmpfs rw,nosuid,nodev,mode=1777 0 0
gvfsd-fuse /dev/shm/mimosa/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,user=mimosa 0 0
/dev/sdd1 /media/3832-3034 vfat rw,nodev,nosuid,uid=1000,gid=100,shortname=mixed,utf8=1,showexec,flush,uhelper=udisks2 0 0
EDIT I just tested outside the directory concerned, and there is no no-space error:

Code: Select all

mimosa[collection.media]$ touch test
touch: cannot touch 'test': No space left on device
mimosa[collection.media]$ cd ..
mimosa[AnkiDroid]$ touch test
mimosa[AnkiDroid]$ rm test

Re: no space left on device - nearly empty SD card

Posted: 1. Nov 2019, 10:04
by laprjns

Re: no space left on device - nearly empty SD card

Posted: 1. Nov 2019, 11:05
by mimosa
Indeed, there's no room on the phone itself to do very much at all, but this is the SD card I added to be able to install Anki in the first place. And it works and quite a lot of the data associated with Anki was downloaded. There is plenty of room on the card, it just won't add any more inside that directory.

The experiments above were done in Salix, with the SD card in my computer's SD card slot.

Re: no space left on device - nearly empty SD card

Posted: 2. Nov 2019, 12:17
by laprjns
Ok, now that I actually read your opening post how about this:
https://stackoverflow.com/questions/671 ... d-not-full

Re: no space left on device - nearly empty SD card

Posted: 2. Nov 2019, 15:15
by mimosa
Yes, that's it, and unfortunately, there's no easy way round it as the files in question are thousands of audio files with very long names.

I tried formatting the card as ext4, but despite contradictory views online, the android in this phone at least doesn't like it. Even if it did, there may be a permissions issue - not with FAT, of course.

I suspect the best course is to root the phone and perhaps most straightforwardly, remove some of the bloatware in its main memory.

Re: no space left on device - nearly empty SD card

Posted: 2. Nov 2019, 17:30
by gapan
I may be talking nonsense, but isn't the limit only applicable to the root directory of the sd card? Couldn't you just move the content to a directory?

Re: no space left on device - nearly empty SD card

Posted: 2. Nov 2019, 18:14
by mimosa
It apparently applies to any directory - which is where the data is (audio files for Anki flashcards, with ridiculously long names). In any case, I decided to return the phone, which is just too feeble, quite apart from filling all its standard memory with cruft.

Really annoying because Anki is the only reason I want to have a "smart" phone ... but it seems a newer model is needed even for that. And they are all so large!

I'll mark this as solved, even though it's more a case of definitively unsolved.