Thursday, March 27, 2008

Ubuntu shows that iPod (or any mass storage device) is full when it's not.

In Ubuntu, I have noticed that sometimes when mass storage devices (particularly my iPod) will sometimes be recognized as having no free space when I know, in fact, that there are several gigabytes worth of free space. I had searched for a couple hours until I finally discovered a way to fix the free space on device.

To fix:

1. Plug in the device.

2. Open a Terminal and type:
you@linux-box:~$ df -h

3. Look for your iPod's name in the list of disks. It should be something like /dev/sdf2 or something similiar. Look to the right hand column for the name of the media. Take note of the directory in the left column (/dev/sd**)

4. In the terminal, enter the command:
you@linux-box:~$ sudo dosfsck -rV /dev/sdf2
but don't forget to replace /dev/sdf2 with the path to your device.

5. dosfsck will begin checking the drive for inconsistencies, and prompt you with a message about 'Free Cluster Summary Wrong'

6. When it asks you
1) Correct
2) Incorrect
?
you want to type '1' and hit enter.

7. After this, it will start verifying your device and will ask you if you want to Perform Changes. Type 'y' and hit enter and it will make the changes on your device.

8. Then, in the terminal, type:

you@linux-box:~$ sudo eject /dev/sdf2

Again, making sure that you replace /dev/sdf2 with the path to your device.

9. Your device will unmount. Unplug your device and plug it back in and your device should display the correct amount of free space.

This has yet to fail me and I've used it a number of times. Good Luck


EDIT:

Overall, your session should look like this:


cody@cody-desktop:~$ sudo dosfsck -rV /dev/sdf2
[sudo] password for cody:
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Starting check/repair pass.
Free cluster summary wrong (0 vs. really 2446184)
1) Correct
2) Don't correct
? 1
Starting verification pass.
Perform changes ? (y/n) 1
Invalid input.
Perform changes ? (y/n) y
/dev/sdf2: 20280 files, 2427159/4873343 clusters
cody@cody-desktop:~$

1 comment:

slutfukkr said...

Very useful information.