Skip navigation.
Home
Now Shipping Version 7.0

[solved] "No space left on device" on MMC while 244M free


Posts: 3

hi,

i just encountered a weird problem with a 1GB MMC from transcend. i happen to run mepis and it's to do with filesystem stuff, so here we go ... the story's a little longer, though. flame me!Eye-wink
preface: i bought the mmc to turn a nokia 6230 into a sound mp3 player. very happy that such "mature" device would work with a 1gb mmc, i startet to fill that up with mp3s. into one gig there fits quite a lot of music (100+ songs), so i wanted to bring some structure into it. unfortunately, the 6230 does support neither playback from mmc subfolders (root dir only :-< ) nor on-the-fly creation of playlists - you're supposed to do the later with the proprietary "nokia pc suite", which runs on window$ exclusivly. which i don't own. :-|
i've been googling for some days, trying this and that to create playlists manually - in vain. today i discovered that the 6230 won't let you put files with the filename extension .pl (like playlist) onto it. Puzzled bl**dy firmware! must try to access the mmc in another way... since i don't own a card reader, i abused an exilim digicam with a SD/MMC-slot and usb-link for the purpose. and that's where the story really starts.
using lame bluetooth, i had managed to fill the mmc to about 700mb. now, i've got a fast usb link! Cool the 6230 doesnt support moving around files via OBEX (right! you cant move or rename files that way :< ) - so first i try to do is to move files around the mmc with konqueror.

it wrote:
can't move file(s) ... no space left on device

well,
  1. one third of all the space should be free Puzzled and
  2. if i want to move stuff within one storage device, how can there be too little space anyhow...?

hmm... who know's what's wrong with the filesystem. i'm going to reformat it. ``man mkfs.vfat" ... brings up the manpage of mkdosfs ... dating from May 1995?!? Jawdropping! okay, my MEPIS install is old and patchy, but this... i'm starting to feel a little angry. a search with Synaptic for packages with "vfat" yields glorious two entries, both about some rescue tool, ``apropos vfat'' yields only pointers to {fsck|mkfs}.vfat, and in all the nifty kde menus the only thing to do with formating is a shiny ``floppy formater"... btw, my sources.list ist

  1. deb http://apt.mepis.org/mepis32-6.5/ mepis main
  2. deb http://apt.mepis.org/simply32-6.0/ mepis main
  3. deb http://archive.ubuntu.com/ubuntu/ dapper main
  4. deb http://security.ubuntu.com/ubuntu/ dapper-security main universe multiverse
  5. deb http://archive.ubuntu.com/ubuntu/ dapper-updates main
  6. deb http://archive.ubuntu.com/ubuntu/ dapper-backports main
  7. deb http://archive.ubuntu.com/ubuntu/ dapper universe multiverse
  8. deb http://archive.ubuntu.com/ubuntu/ dapper-backports universe multiverse
  9. # deb http://medibuntu.sos-sts.com/repo/ dapper free non-free
  10. # deb http://flomertens.keo.in/ubuntu/ dapper main main-all

i don't think this can be so very wrong, can it? (i mean it. am i mistaken? correct me!)

well, suddenly i'm not so sure anymore if reformating is such a good idea. with mkdosfs...?
large and by i like my MEPIS, but this is really annoying! who will ever need to format a vfat fs? i do! and having had bad experiences with that very topic, i'm not going to download some sourcecode tarballs claiming to do filesystem service. expectation of working tools for those purposes is exactly the reason i use a distribution after all, and here MEPIS simply fails. okay, enough of that. Evil

so, suspiciously, i contented myself with just erasing all data on the mmc.

df wrote:
0% usage
okay. hope.
that refilling of the card works well until
Quote:
no space left on device

aehm... konqueror claims there're 304MB free, df agrees. Puzzled :? Puzzled changing to the command line, i notice that i still can create an empty file on the device (mounted at /media/sda1). what about a non-empty file?
wrote:

user@0[sda1]$ dd if=/dev/zero of=y bs=1M count=65
65+0 records in
65+0 records out

hum... Puzzled
wrote:

user@0[sda1]$ touch x
touch: cannot touch `x': No space left on device
user@0[sda1]$ dd if=/dev/zero of=y bs=1M count=165
165+0 records in
165+0 records out
173015040 bytes (173 MB) copied, 60,152 seconds, 2,9 MB/s
user@0[sda1]$ df -h
Filesystem Size Used Avail Use% Mounted on
[...]
/dev/sda1 968M 825M 143M 86% /media/sda1
user@0[sda1]$ touch x
touch: cannot touch `x': No space left on device
user@0[sda1]$ dd if=/dev/zero of=y bs=1M count=300
300+0 records in
300+0 records out
314572800 bytes (315 MB) copied, 217,657 seconds, 1,4 MB/s
user@0[sda1]$ df -h
Filesystem Size Used Avail Use% Mounted on
[...]/dev/sda1 968M 960M 7,4M 100% /media/sda1
user@0[sda1]$ touch x
touch: cannot touch `x': No space left on device

using konqueror, i delete one of the mp3-files on the card. one...
Quote:

user@0[sda1]$ touch x
user@0[sda1]$ touch z
user@0[sda1]$ touch w
touch: cannot touch `w': No space left on device

... somewhere in between i remembered something about a limited number of root directory entries, but

umount sda1; fsck.vfat -v sda1 wrote:

[...]
Root directory starts at byte 262144 (sector 512)
512 root directory entries
[...]

,where there where only
mount sda1; ls sda1 | wc -l wrote:

102
files on the card. that can't be it, anyhow, since in the example above the deletion of one file misteriously allows for the creation of two others...

i'm completely lost here. any comments? Smiling

no space

Hi, maybe it's too simple, but sometimes it*s just a hidden trash folder that fills the card. Just a thought.
good Luck anyway, c.

thanx *sigh*

i doubt it's about a trash folder:

  1. df doesnt care about "hiddennes" of files/dirs, much less trash foldes and such;
  2. i wasn't allowed to create one more _empty_ file `x', while beeing able to increase the size of file 'y' from 65mb to 300mb without problems. that's exactly what puzzled me. :->

thank you for the moral support, anyway...

EnigmaOne's picture

Just a thought........

Just a thought:

Have you tried creating directories (say, 3 or so) on the flash, and placing the media files into said directories according to some sort of method of organization which appeals to you, and checking your ability to subsequently write to the device?

You may be experiencing an issue with implementing LFNs (Long FileNames) in the root directory of the device, instead of storage access, per se; because of an interesting defect in the way VFAT stores LFNs.

When you create a LFN under VFAT, it uses one directory entry for the DOS alias and another directory entry for each additional thirteen characters contained in the LFN. In theory, a single LFN could occupy up to 21 directory entries.

Under VFAT, the root directory has a limit of 512 files; however, if you use the maximum-length LFNs in the root directory, you could cut this limit to a mere 24 files.

One should, therefore, use LFNs very sparingly in the root directory of any VFAT-filesystem formatted device; however, sub-directories are not subject to the limitations imposed upon the root directory, so you are free to populate subs with as many files as the device will accommodate by virtue of storage space alone.

Please understand that this issue, should this be the root (no pun intended) of your problem, arises from a defect in the VFAT filesystem, for which you should thank Bill Gates, I suppose. It is not a failure of Linux/SimplyMEPIS to fix the problems in a poorly-crafted FS spec.



How's my posting?

Please call: 1-800-DEV-NULL

ACK

thx enigma1, seems you're right.

i did as you suggested and right now run a script generating files in the subdir: 255 and counting... Eye-wink i've been pondering and already guessed something like that. (under win95, there was this `dir' switch to display these crypic auto-generated dos filenames, wasn't it...? )
since i can't play mp3s out of subdirs, the only solution is to provide the files with short (dos-like) names. blimey! i just finished renaming all my mp3-files proper and detailed...
understood what you mean about the root ;-> of vfat fs. you've got a point that mepis/linux is not responsible for patching vfat specs.
though, while it turns out that i don't actually need to reformat the mmc, i still think ${distribution} should provide means to do so. vfat has had a serious revival with the upcoming of all those flash devices. from what i've seen in the last days, it wouldn't surprise me in the slightest if (the firmware of) those cute mobile devices mess with plugged-in mass storage from time to time. *shakinghead*

i positively remember having imposed vfat on partitions with linux some time ago. must have been pre-mepis era...

thank you for the prompt and helpful reply. Smiling

PS: i just wonder whether we'll consider ext3 a dirty hack on ext2 some time in the future just as we do now with vat->vfat. *harrumph* no trolling meant. >:-]

EnigmaOne's picture

Quote:under win95, there was

Quote:
under win95, there was this `dir' switch to display these crypic auto-generated dos filenames, wasn't it...?
I really can't answer that question, as I never did use windoze for my own needs. I stuck with DR-DOS, UNIX and GeoWorks until I moved to Linux in 1995. There might have been, but that's not something I would remember from a support role.

Quote:
i still think ${distribution} should provide means to do so.
I was under the impression that 'mkdosfs {device_spec}' would indeed do what you want. ('mkfs.vfat' is symlinked to mkdosfs, BTW.)

Personally, I'd rather see the devices support a journaled FS like JFS, XFS, ext3 or ReiserFS_4. Much more reliable, in my mind.

Quote:
i positively remember having imposed vfat on partitions with linux some time ago.
You *can*, but you lose permissions and symlinks, etc...it's just a royal pain...not to mention the fact that FAT/VFAT will spontaneously corrupt itself when the device gremlins are bored.

Quote:
i just wonder whether we'll consider ext3 a dirty hack on ext2 some time in the future just as we do now with fat->vfat.
We might, but how much information have you lost to a corrupted FAT/VFAT FS -vs- ext3 or ReiserFS?

I've never lost anything to either of the two latter Journaling methods, myself; so, I have to lean in the direction of results speaking for themselves.



How's my posting?

Please call: 1-800-DEV-NULL

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.