Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
File system corruption on a USB drive (mp3 player) [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jel
Apprentice
Apprentice


Joined: 10 Aug 2005
Posts: 259
Location: Gothenburg

PostPosted: Mon Dec 25, 2006 11:25 am    Post subject: File system corruption on a USB drive (mp3 player) [SOLVED] Reply with quote

I have a problem with my 1GB vfat drive. It seems like the disk buffer is not properly flushed on unmount so the filesystem is in an inconsistent state when I physically remove the drive. I have tried sync && umount /mnt/stick, but that still doesn't help. This was after copying a 500MB mp3 file using copy&paste in GNOME nautilus.

Additionally, I have found that mkfs.vfat does not properly reformat the drive; the mp3 player won't recognize the file system. I suppose the mp3 player does not implement vfat correctly. Luckily I have two of these mp3 players so I managed to copy the raw blocks from the other, empty, drive using dd.

These are the options in fstab. The mount point is shared with a USB stick, hence the name.

Code:

# USB stick
/dev/sda1 /mnt/stick vfat defaults,user,uid=1000,gid=100 0 0


dd just finished reconstructing the empty file system so I'm going to try copying the mp3 using cp.


Last edited by jel on Wed Dec 27, 2006 10:12 am; edited 1 time in total
Back to top
View user's profile Send private message
jel
Apprentice
Apprentice


Joined: 10 Aug 2005
Posts: 259
Location: Gothenburg

PostPosted: Mon Dec 25, 2006 11:46 am    Post subject: Re: File system corruption on a USB drive (mp3 player) Reply with quote

Quote:

dd just finished reconstructing the empty file system so I'm going to try copying the mp3 using cp.


After cp, unmount and waiting for the write indication to stop, unplugging, replugging and remounting; file does not show up, but the usage is ~500 MB. Running dd again...
Back to top
View user's profile Send private message
jel
Apprentice
Apprentice


Joined: 10 Aug 2005
Posts: 259
Location: Gothenburg

PostPosted: Mon Dec 25, 2006 1:56 pm    Post subject: Re: File system corruption on a USB drive (mp3 player) Reply with quote

Just thinking, maybe the file length descriptor exceeds some max number of bits. The byte size of 512 MB is 39 bits, perhaps the blocks/sectors counter exceeds 31 bits..? I have successfully transferred files up to 200-300 MB to the drive, perhaps there's a threshold at 512 MB...

I'm using mp3splt to split the mp3 into 100 minute files to see if that'll work.
Back to top
View user's profile Send private message
jel
Apprentice
Apprentice


Joined: 10 Aug 2005
Posts: 259
Location: Gothenburg

PostPosted: Wed Dec 27, 2006 10:11 am    Post subject: Re: File system corruption on a USB drive (mp3 player) Reply with quote

jel wrote:

I'm using mp3splt to split the mp3 into 100 minute files to see if that'll work.


That worked. Guess the file size limit on the drive is 512 MB then.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum