Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 11-26-2004, 06:17 PM   #1
LQ Newbie
Registered: Nov 2004
Location: Norway
Distribution: Gentoo
Posts: 25

Rep: Reputation: 15
USB stick, "losing space" - filesystem inconsistensies?

I have a USB stick, which I store files on. The disk tends to "lose" space, which means that when I delete files, the size of the deleted files doesn't get freed up.

Space on disk 128mb
I copy files which is 10 mb to usbdisk, leaving 118 mb on disk, then deleting them
Then the disk is still 118mb

So I need to do this in order to restore the usb stick to its original capacity:
mkfs.vfat /dev/sdb1

However, this is not very convenient, because then I have to move all the files, temporarily, to another location, and then copy them back. Is it because of inconsistenties in the file system this tends to happen? How can I solve this without formating?

My file system is vfat, because I need to use the stick on MS Windows and Linux.
Old 11-26-2004, 07:01 PM   #2
Simon Bridge
LQ Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
I've had this trouble once or twice myself... when it happens I have to re-format the stick too.

I've had the best result by copying files, then deleting the ones on the stick, when I have to move files.

Tell me, do you use the gui for these operations or the terminal?
If you normally sue one, try the other just to see. Normally the file is not erased from the media, just the filename from the file allocation table. So the space will not look vacant (all zeros) to some software/hardware combinations. It sounds as if something is removing the filename but not resetting the empty-space pointers... hmmmm.

Let us know, step-by-step what you are doing...

1. write to media: ie
[bash]$cp testfile /mnt/m-stick

2. erase from media: ie
[bash]$rm /mnt/m-stick/testfile

check the memory before and after each step. you may want a look at the system logs too... funny errors can show up there.
if the problem persists... past everything here.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't "Safely Remove" usb stick: KDE, SUSE 10.0 m29389 SUSE / openSUSE 8 11-16-2005 12:35 AM
"Turning off" USB memory stick before unplugging/disconnecting detly Linux - Hardware 3 03-15-2005 01:34 PM
lost writing ability on usb-stick / not possible with protocol "drives" - how to fix? ungua SUSE / openSUSE 3 11-24-2004 09:11 PM
Writing to "/dev/usb/hiddev*" and to "/proc/bus/usb/00B/00S" throw an arror EI stpg Programming 0 07-14-2004 06:44 AM
"no space left on device" - But df shows free space! monita Linux - General 7 03-30-2004 02:14 PM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration