Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo won't let go of USB stick in a non-distructive way!
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
dargosch
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2003
Posts: 101

PostPosted: Thu Jan 08, 2004 9:51 pm    Post subject: Gentoo won't let go of USB stick in a non-distructive way! Reply with quote

Hi all,

I have a problem safely removing my USB memory stick (which is acctually this cool watch http://www.thinkgeek.com/gadgets/watches/5eec/)

Code:

ikketeru dev # mkfs -t vfat /dev/sdb1
mkfs.vfat 2.10 (22 Sep 2003)
ikketeru dev # cat /etc/fstab |grep watch
/dev/sdb1               /mnt/watch      vfat            noauto,uid=zak,sync,user 0 0


With the above preparations, I may do:

Code:

zak@ikketeru:~$ mount /mnt/watch/
zak@ikketeru:~$ cp -Ra  drivers/ /mnt/watch/
zak@ikketeru:~$ ls -l /mnt/watch/
total 2
drwxr--r--    2 zak      users        2048 Jul 15 21:05 drivers
zak@ikketeru:~$ umount /mnt/watch/


Now, the thing is that when I detach the stick, reattaches it and tries to mount it, it fails because the filesystem is corrupted.

So, how do I get detach the stick without corrupting the data on it????

my modules are:



Code:

ikketeru dev # lsmod |grep -v snd
Module                  Size  Used by    Tainted: P 
usb-storage            48532   2
ne2k-pci                5184   0  (unused)
8390                    6544   0  [ne2k-pci]
emu10k1-gp              1320   0  (unused)
ipt_LOG                 3480  19  (autoclean)
ipt_limit               1016   6  (autoclean)
ipt_multiport            696   7  (autoclean)
ipt_REJECT              3480   1  (autoclean)
ipt_state                568  16  (autoclean)
ip_conntrack_ftp        3920   0  (autoclean) (unused)
ide-scsi                9936   0
vfat                   10252   2  (autoclean)
fat                    31960   0  (autoclean) [vfat]
iptable_mangle          2200   1  (autoclean)
iptable_nat            18062   0  (autoclean) (unused)
ip_conntrack           19012   3  (autoclean) [ipt_state ip_conntrack_ftp iptable_nat]
iptable_filter          1772   1  (autoclean)
ip_tables              11776  10  [ipt_LOG ipt_limit ipt_multiport ipt_REJECT ipt_state iptable_mangle iptable_nat iptable_filter]
ide-cd                 31044   0  (autoclean)
nvidia               1630624  11  (autoclean)
e100                   48872   1  (autoclean)
sd_mod                 11532   4


Does anyone have any idea as to why the filesystem gets corrputed???
Am I missing something in my setup? Are there more scsi things that HAVE to be modules?
_________________
Registered Linux user #163029 http://counter.li.org/
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/
Back to top
View user's profile Send private message
Andersson
Guru
Guru


Joined: 12 Jul 2003
Posts: 525
Location: Göteborg, Sweden

PostPosted: Fri Jan 09, 2004 6:44 pm    Post subject: Reply with quote

There are a few modules I can't see, but you probably have them in the kernel, otherwise you wouldn't be able to mount it in the first place.

Are you very quick when you unplug the watch? I see you have sync, but perhaps it needs a couple of seconds to finish writing. They're not very fast are they?

Hmm.. What file system do you have on it by the way?
Back to top
View user's profile Send private message
dargosch
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2003
Posts: 101

PostPosted: Sat Jan 10, 2004 8:09 am    Post subject: Reply with quote

Thank you for replying to my post,

Quote:

There are a few modules I can't see, but you probably have them in the kernel, otherwise you wouldn't be able to mount it in the first place.


Would you mind giving examples of such modules? Some things (like SCSI) is compiled into the kernel, but I feel that I would be stubid to assumed that it's all there since it does not work..

Quote:

Are you very quick when you unplug the watch? I see you have sync, but perhaps it needs a couple of seconds to finish writing. They're not very fast are they?

I wouln't say I'm very quick. I left it syncing over night once, and that did not solve the problem. The led is still blinking in a low-frequency way, as if it was waiting fore something.
The led stops when I remove the (usb-)uhci module...

Quote:

Hmm.. What file system do you have on it by the way?


In the beginning I do a
Code:

mkfs -t vfat /dev/sdb1

so I hoe that makes it a proper vfat filesystem... or do I have to do something special with it?
_________________
Registered Linux user #163029 http://counter.li.org/
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/
Back to top
View user's profile Send private message
Dracnor
Guru
Guru


Joined: 08 Jun 2003
Posts: 397
Location: Pennsylvania

PostPosted: Sat Jan 10, 2004 5:03 pm    Post subject: Reply with quote

Have you tried a different file system? When you mount can you specify vfat or msdos....I've had problem getting my iriver ifp-180 from mounting properly without the msdos option. What kernel are you using?
Back to top
View user's profile Send private message
Andersson
Guru
Guru


Joined: 12 Jul 2003
Posts: 525
Location: Göteborg, Sweden

PostPosted: Sat Jan 10, 2004 5:13 pm    Post subject: Reply with quote

dargosch wrote:
Would you mind giving examples of such modules? Some things (like SCSI) is compiled into the kernel, but I feel that I would be stubid to assumed that it's all there since it does not work..

These are the options I use. I have everything built-in by the way, and I don't have any usb 2.0.
Code:
(Under usb)
<*> Support for USB
[*]   USB device filesystem
<*>   UHCI HCD (most Intel and VIA) support (Although some mobos use ohci)
<*>   USB Mass Storage support
(Under SCSI)
[*]   legacy /proc/scsi/ support
<*>   SCSI disk support
<*>   SCSI generic support

Quote:
I wouln't say I'm very quick. I left it syncing over night once, and that did not solve the problem. The led is still blinking in a low-frequency way, as if it was waiting fore something.
The led stops when I remove the (usb-)uhci module...

Mine stops a few seconds after I unmount it. Still, the flashing could mean it's getting power or something...
Quote:
In the beginning I do a
Code:
mkfs -t vfat /dev/sdb1

so I hoe that makes it a proper vfat filesystem... or do I have to do something special with it?

I use the file system it came with (also vfat), but that should be enough. Perhaps you could try to make an ext2 file system just to see if it works better?
Back to top
View user's profile Send private message
Dracnor
Guru
Guru


Joined: 08 Jun 2003
Posts: 397
Location: Pennsylvania

PostPosted: Sat Jan 10, 2004 8:38 pm    Post subject: Reply with quote

Before you try to umount it, can you transfer the data off of the usb stick on to your hard drive? Just wondering if it transfers properly back and forth.
Back to top
View user's profile Send private message
dargosch
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2003
Posts: 101

PostPosted: Mon Jan 12, 2004 6:28 am    Post subject: Sucess -- one issue remaining Reply with quote

Hi all,

Now I can mount, copy files back and forth and unmount the device.
I can even remove it, by issuing
Code:

eject /dev/sdb1


However, when I eject the device, I have to restart devfsd in order to get sdb1 back... is there a way to get this automatcally done?
Or, is there another way of getting proper probing of sd devices back?
_________________
Registered Linux user #163029 http://counter.li.org/
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/
Back to top
View user's profile Send private message
Yama
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jul 2002
Posts: 135
Location: Sydney, Australia

PostPosted: Thu Jan 29, 2004 12:09 pm    Post subject: Reply with quote

I'm having the same problem with my 256MB USB MP3 player. It works fine on another computer running Mandrake Linux. In Gentoo, I can add files to the device and it will play them once I have disconnected the USB link. These files are mysteriously deleted upon reconnection to either my Mandrake or Gentoo machines. Files added from the Mandrake machine aren't affected and remain as they should.

In the meantime, I using mtools to access my player. It's unwieldy, but it works well.
Back to top
View user's profile Send private message
jonfr
Veteran
Veteran


Joined: 20 Jul 2003
Posts: 1006
Location: Iceland

PostPosted: Thu Jan 29, 2004 12:54 pm    Post subject: Reply with quote

I don't see this problem whit my usb stick, i did have to format it to fat32 to make it work in correct in linux
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