LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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?

Notices

Reply
 
Search this Thread
Old 11-26-2004, 05:17 PM   #1
iskrem
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.

Example:
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, 06:01 PM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
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.
 
  


Reply


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/Novell 8 11-15-2005 11:35 PM
"Turning off" USB memory stick before unplugging/disconnecting detly Linux - Hardware 3 03-15-2005 12:34 PM
lost writing ability on usb-stick / not possible with protocol "drives" - how to fix? ungua Suse/Novell 3 11-24-2004 08:11 PM
Writing to "/dev/usb/hiddev*" and to "/proc/bus/usb/00B/00S" throw an arror EI stpg Programming 0 07-14-2004 05:44 AM
"no space left on device" - But df shows free space! monita Linux - General 7 03-30-2004 01:14 PM


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

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