The MP3 Player's Vanishing Disk Space Mystery

Martin Dittus · 2005-09-02 · konsum, stuff · write a comment

I own a simple MP3 player by a German company called dnt, the player model is called "Fun 256". It doesn't have any fancy features, doesn't play OGG, and occasionally chokes when presented with high bit rates, but it's adequate for my needs.

When I started using iTunes this spring I made up for its lack of generic player support by using a combination of a dynamic playlist, the "Copy files to folder" AppleScript from Doug's Scripts for iTunes, and an AppleScript that marks selected tracks as played. This way I could fill up the player with songs that I haven't listened to during the last couple of weeks, which is a rough imitation of iTunes' iPod integration functionality.

As I started using this I found that the player would accept significantly less than the advertised 256 MB of files, which isn't that surprising, considering most players keep their software on the same storage as the music. So I adapted the size of the dynamic playlist several times, making it generate a shorter and shorter playlist. At some point not too long ago, after having another copy error from a large playlist, I decided on a whim to make the playlist size sufficiently small so that it would fit in all cases (I was too lazy to open the shell or Finder to check for the actual size of available space), and so I set the playlist size down to only 230 MB.

This anecdote in itself doesn't say much; the above process of adapting the playlist size usually happened spontaneously, and without giving it much of a thought, so I can't say if the available space on the flash drive did indeed shrink. The comparatively large difference between advertised and available space is a but curious though.

Today I had another instance of a generated dynamic playlist being too large to fit on the drive; the AppleScript gave an error when it attempted to copy the last track of the playlist. After cleaning the drive of all files I checked the available space, which was only 100 KB under the 230 MB mark. And now I'm getting curious.

Is the space available on the flash drive actually getting smaller over time? And if it is: what's filling it up?

At this point there are several explanations:

  1. I'm getting sloppy, and blame on technology what is actually to be attributed to (my) user error.
  2. OS X is leaving behind traces of data that I can't see with ls -la (yes, I did delete .DS_STORE and the likes)
  3. The drive is having disk errors, and blocking damaged sectors (it is a pretty old player by now).
  4. Conspiracy theory: the player is keeping a log (e.g. of usage data)
  5. ...?

I' rooting for option 4 (everybody loves conspiracy theories), but I'm pretty sure that it's either or a combination of option 1 and 3.

So to get behind this I'll simply start monitoring the drive, and post my findings here.

First entry: 2005-09-02

I manually cleaned all data off the drive, excluding the three mandatory directories LOGO, MUSIC and VOICE, but including all hidden files and directories.

$ du
32      ./LOGO
32      ./MUSIC
32      ./VOICE
128     .
$ df
Filesystem      512-blocks      Used    Avail Capacity  Mounted on
/dev/disk1s1        511872     41056   470816     8%    /Volumes/Untitled

Hm; so an "empty" drive uses up 20 MB of disk space. It's hard to imagine that the operating system is that large (it's a really simple player).

I have yet to figure out how to fsck the drive. OS X's Disk Utility mentions "130 lost Clusters", whatever that means; I'm pretty sure though that those are all FAT entries of deleted files, as its analysis closes with "No repairs necessary."

And I need to figure out a way to check a flash drive's physical "health". Afaik there are no S.M.A.R.T. tools for this.

To make sure we don't miss anything, here's a full directory listing:

$ ls -laR
total 128
drwxrwxrwx   1 user  user   8192 Sep  2 16:08 .
drwxrwxrwt   5 root   admin    170 Sep  2 15:45 ..
drwxrwxrwx   1 user  user  16384 Jan  1  1970 LOGO
drwxrwxrwx   1 user  user  16384 Sep  2 15:44 MUSIC
drwxrwxrwx   1 user  user  16384 Jan  1  1970 VOICE

./LOGO:
total 64
drwxrwxrwx   1 user  user  16384 Jan  1  1970 .
drwxrwxrwx   1 user  user   8192 Sep  2 16:08 ..

./MUSIC:
total 64
drwxrwxrwx   1 user  user  16384 Sep  2 15:44 .
drwxrwxrwx   1 user  user   8192 Sep  2 16:08 ..

./VOICE:
total 64
drwxrwxrwx   1 user  user  16384 Jan  1  1970 .
drwxrwxrwx   1 user  user   8192 Sep  2 16:08 ..

Next article:

Previous article:

Recent articles:

Comments

Comments are closed. You can contact me instead.