thumbdrive not automatically mounting and unmounting properly
I'm having an issue with my hfs-formatted (not hfs+) thumbdrive automounting/auto-unmounting on my FC3 (Fedora Core 3) system. (It's hfs because
I was using it on a Powerbook, and just gave it a try on my GNU/Linux box. I couldn't care less what format it is, but it would be useful if my Apple Powerbook (OS X) could read it.)
{Note: after typing this message out, I later reformatted the thumbdrive in OS X as ext2 (using ExtFSManager) but then had problems getting it to work right here on GNU/Linux -- some sort of hard lock-up while copying files to it. I then rebooted Fedora (wouldn't respond to '#shutdown -r now' -- had to actually pull the plug). Reformatted the thumbdrive again in OS X, this time as UFS, but that made more complications which I won't go into here.}
Summary: Right after I boot the system up, I can plug
in my thumbrive and it mounts right up showing an icon on my Gnome desktop. I can copy files to and from it, and then right-click unmount it just fine that first time (then I unplug it when I'm done). When I plug it back in, it no longer will show up on the desktop and I came across an error message that said to post about it here.
So here I am. :)
Ok, here's my system:
[john@avocado ~]$ uname -a
Linux avocado 2.6.9-1.667 #1 Tue Nov 2 14:41:25 EST 2004 i686 athlon i386 GNU/Linux
Right after I boot the system, here's what we have:
[john@avocado ~]$ cat /etc/mtab/dev/mapper/VolGroup00-LogVol00 / ext3 rw 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw,gid=5,modeb0 0 0
usbfs /proc/bus/usb usbfs rw 0 0/dev/hda1 /boot ext3 rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
[john@avocado ~]$ cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,modeb0 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0/dev/hdc /media/cdrom auto
pamconsole,fscontext=system_u:object_r:removable_t,ro,exec,noauto,managed 0 0/dev/fd0 /media/floppy auto
pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
[john@avocado ~]$ /sbin/lsmod
Module Size Used by mga 114244 2 lp 11565 0 autofs4 24005 0 i2c_dev 10433 0 i2c_core 22081 1 i2c_dev sunrpc 160421 1 ipt_REJECT 6465 1 ipt_state 1857 1 ip_conntrack 40693 1 ipt_state iptable_filter 2753 1 ip_tables 16193 3 ipt_REJECT,ipt_state,iptable_filter md5 4033 1 ipv6 232577 8 uhci_hcd 31449 0 parport_pc 24705 1 parport 41737 2 lp,parport_pc emu10k1_gp 3649 0 gameport 4801 1 emu10k1_gp snd_emu10k1 93769 2 snd_rawmidi 26725 1 snd_emu10k1 snd_pcm_oss 47609 0 snd_mixer_oss 17217 2 snd_pcm_oss snd_pcm 97993 2 snd_emu10k1,snd_pcm_oss snd_timer 29765 1 snd_pcm snd_seq_device 8137 2 snd_emu10k1,snd_rawmidi snd_ac97_codec 64401 1 snd_emu10k1 snd_page_alloc 9673 2 snd_emu10k1,snd_pcm snd_util_mem 4801 1 snd_emu10k1 snd_hwdep 9413 1 snd_emu10k1 snd 54053 11 snd_emu10k1,snd_rawmidi,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_seq_device,snd_ac97_codec,snd_hwdep soundcore 9889 2 snd natsemi 30369 0 floppy 58609 0 dm_snapshot 17029 0 dm_zero 2369 0 dm_mirror 23341 2 ext3 116809 2 jbd 74969 1 ext3 dm_mod 54741 6 dm_snapshot,dm_zero,dm_mirror
#-----------------------------------------------------------------------------------------------------------------------------------------------------
After I plug in the thumbdrive, it mounts and shows up on the desktop, and we get this:
{tail -f /var/log/messages yields: }
Nov 30 21:09:44 avocado kernel: usb 1-2.2: new full speed USB device using address 4 Nov 30 21:09:45 avocado kernel: SCSI subsystem initialized Nov 30 21:09:45 avocado kernel: Initializing USB Mass Storage driver... Nov 30 21:09:45 avocado kernel: scsi0 : SCSI emulation for USB Mass Storage devices Nov 30 21:09:45 avocado kernel: Vendor: Memorex Model: ThumbDrive Rev: 1.12 Nov 30 21:09:45 avocado kernel: Type: Direct-Access ANSI SCSI revision: 02 Nov 30 21:09:46 avocado kernel: usbcore: registered new driver usb-storage Nov 30 21:09:46 avocado kernel: USB Mass Storage support registered. Nov 30 21:09:46 avocado scsi.agent[3304]: disk at /devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.2/1-2.2:1.0/host0/0:0:0:0 Nov 30 21:09:46 avocado kernel: SCSI device sda: 258048 512-byte hdwr sectors (132 MB) Nov 30 21:09:46 avocado kernel: sda: Write Protect is off Nov 30 21:09:46 avocado kernel: sda: assuming drive cache: write through Nov 30 21:09:47 avocado kernel: sda: [mac] sda1 sda2 sda3 Nov 30 21:09:47 avocado kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 Nov 30 21:09:47 avocado fstab-sync[3409]: added mount point /media/hfs_bkup for /dev/sda2 Nov 30 21:09:48 avocado kernel: HFS-fs warning: Filesystem was not cleanly unmounted, running fsck.hfs is recommended. mounting read-only. Nov 30 21:09:48 avocado kernel: SELinux: initialized (dev sda2, type hfs), not
configured for labeling
[john@avocado ~]$ cat /etc/mtab/dev/mapper/VolGroup00-LogVol00 / ext3 rw 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw,gid=5,modeb0 0 0
usbfs /proc/bus/usb usbfs rw 0 0/dev/hda1 /boot ext3 rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0/dev/sda2 /media/hfs_bkup hfs rw,nosuid,nodev,sync,noatime,fscontext=system_u:object_r:removable_t,user=john 0 0 <-- *** This line appeared ***
[john@avocado ~]$ cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,modeb0 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0/dev/hdc /media/cdrom auto
pamconsole,fscontext=system_u:object_r:removable_t,ro,exec,noauto,managed 0 0/dev/fd0 /media/floppy auto
pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0/dev/sda2 /media/hfs_bkup hfs
pamconsole,noatime,sync,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0 <-- *** This line appeared ***
[john@avocado ~]$ /sbin/lsmod
Module Size Used by
hfs 45253 1 <-- *** Hi, I'm new here
****************sd_mod 16961 2 <-- *** Hi, I'm new here
****************usb_storage 61321 1 <-- *** Hi, I'm new here
****************scsi_mod 118417 2 sd_mod,usb_storage <-- *** Hi, I'm new here
****************
mga 114244 2 lp 11565 0 autofs4 24005 0 i2c_dev 10433 0 i2c_core 22081 1 i2c_dev sunrpc 160421 1 ipt_REJECT 6465 1 ipt_state 1857 1 ip_conntrack 40693 1 ipt_state iptable_filter 2753 1 ip_tables 16193 3 ipt_REJECT,ipt_state,iptable_filter md5 4033 1 ipv6 232577 8 uhci_hcd 31449 0 parport_pc 24705 1 parport 41737 2 lp,parport_pc emu10k1_gp 3649 0 gameport 4801 1 emu10k1_gp snd_emu10k1 93769 2 snd_rawmidi 26725 1 snd_emu10k1 snd_pcm_oss 47609 0 snd_mixer_oss 17217 2 snd_pcm_oss snd_pcm 97993 2 snd_emu10k1,snd_pcm_oss snd_timer 29765 1 snd_pcm snd_seq_device 8137 2 snd_emu10k1,snd_rawmidi snd_ac97_codec 64401 1 snd_emu10k1 snd_page_alloc 9673 2 snd_emu10k1,snd_pcm snd_util_mem 4801 1 snd_emu10k1 snd_hwdep 9413 1 snd_emu10k1 snd 54053 11 snd_emu10k1,snd_rawmidi,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_seq_device,snd_ac97_codec,snd_hwdep soundcore 9889 2 snd natsemi 30369 0 floppy 58609 0 dm_snapshot 17029 0 dm_zero 2369 0 dm_mirror 23341 2 ext3 116809 2 jbd 74969 1 ext3 dm_mod 54741 6 dm_snapshot,dm_zero,dm_mirror
#-----------------------------------------------------------------------------------------------------------------------------------------------------
Then, after I right-click and unmount it:
{this one lost a line: }
[john@avocado ~]$ cat /etc/mtab /dev/mapper/VolGroup00-LogVol00 / ext3 rw 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw,gid=5,modeb0 0 0
usbfs /proc/bus/usb usbfs rw 0 0/dev/hda1 /boot ext3 rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0 sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0 ******************* --> The line that was here went away <--
********************
{this one stayed the same: }
[john@avocado ~]$ cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,modeb0 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0/dev/hdc /media/cdrom auto
pamconsole,fscontext=system_u:object_r:removable_t,ro,exec,noauto,managed 0 0/dev/fd0 /media/floppy auto
pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0/dev/sda2 /media/hfs_bkup hfs
pamconsole,noatime,sync,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
{tail -f /var/log/messages yields nothing. (Hmm... no message about unmounting.) }
#-----------------------------------------------------------------------------------------------------------------------------------------------------
And finally, when I unplug it:
{tail -f /var/log/messages yields: }
Nov 30 21:20:04 avocado kernel: usb 1-2.2: USB disconnect, address 4 Nov 30 21:20:04 avocado fstab-sync[3606]: removed mount point /media/hfs_bkup
for /dev/sda2
and after it's unplugged, we have:
{this one stayed the same: }
[john@avocado ~]$ cat /etc/mtab/dev/mapper/VolGroup00-LogVol00 / ext3 rw 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw,gid=5,modeb0 0 0
usbfs /proc/bus/usb usbfs rw 0 0/dev/hda1 /boot ext3 rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
{this one lost it's last line: }
[john@avocado ~]$ cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,modeb0 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0/dev/hdc /media/cdrom auto
pamconsole,fscontext=system_u:object_r:removable_t,ro,exec,noauto,managed 0 0/dev/fd0 /media/floppy auto
pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0 ******************* --> The line that was here went away <--
********************
#-----------------------------------------------------------------------------------------------------------------------------------------------------
Finally, when I plug the thumbrive back after all of this:
{tail -f /var/log/messages yields: }
Nov 30 21:24:58 avocado kernel: usb 1-2.2: new full speed USB device using address 5 Nov 30 21:24:58 avocado kernel: scsi1 : SCSI emulation for USB Mass Storage devices Nov 30 21:24:58 avocado kernel: Vendor: Memorex Model: ThumbDrive Rev: 1.12 Nov 30 21:24:58 avocado kernel: Type: Direct-Access ANSI SCSI revision: 02 Nov 30 21:24:58 avocado kernel: SCSI device sda: 258048 512-byte hdwr sectors (132 MB) Nov 30 21:24:58 avocado kernel: sda: Write Protect is off Nov 30 21:24:58 avocado kernel: sda: assuming drive cache: write through Nov 30 21:24:58 avocado kernel: sda: [mac] sda1 sda2 sda3 Nov 30 21:24:58 avocado kernel: Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0 Nov 30 21:24:58 avocado scsi.agent[3731]: disk at /devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.2/1-2.2:1.0/host1/1:0:0:0 Nov 30 21:25:01 avocado fstab-sync[3844]: added mount point /media/hfs_bkup for /dev/sda2 Nov 30 21:25:01 avocado kernel: HFS-fs warning: Filesystem was not cleanly unmounted, running fsck.hfs is recommended. mounting read-only. Nov 30 21:25:01 avocado kernel: SELinux: initialized (dev sda2, type hfs), not
configured for labeling
and it shows up on the Gnome desktop -- only I can't copy any files to it.
{Interesting. Last time I did this (before composing this message) it didn't show up on the desktop at all (and I got something in /var/log/messages telling me to email this list). Read-on though.}
Anyhow, although I'm not able to copy any files to it, 'ls' still tells me that I should be able to write to it:
[john@avocado ~]$ ls -l /media/
total 17
drwxr-xr-x 2 root root 4096 Nov 30 20:51 cdrom/ drwxr-xr-x 2 root root 4096 Nov 30 20:51 floppy/ drwxr-xr-x 1 john john 5 Jan 1 1904 hfs_bkup/
Right-click unmount, and it disappears from the desktop, but nothing is appended to/var/log/messages. (Again, shouldn't there be a message there saying it's being unmounted?)
Unplugging it, /var/log/messages says:
Nov 30 21:33:58 avocado kernel: usb 1-2.2: USB disconnect, address 5 Nov 30 21:33:58 avocado fstab-sync[3990]: removed mount point /media/hfs_bkup
for /dev/sda2
And finally, plugging it back in, it manages to come up on the desktop again, but/var/log/messages says to email this list:
Nov 30 21:34:21 avocado kernel: usb 1-2.2: new full speed USB device using address 6 Nov 30 21:34:21 avocado kernel: scsi2 : SCSI emulation for USB Mass Storage devices Nov 30 21:34:21 avocado kernel: Vendor: Memorex Model: ThumbDrive Rev: 1.12 Nov 30 21:34:21 avocado kernel: Type: Direct-Access ANSI SCSI revision: 02 Nov 30 21:34:21 avocado kernel: SCSI device sda: 258048 512-byte hdwr sectors (132 MB) Nov 30 21:34:26 avocado wait_for_sysfs[4020]: either wait_for_sysfs (udev 039)
needs an update to handle the device '/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.2/1-2.2:1.0' properly (no bus device link) or the sysfs-support of your device's driver needs to be fixed, please report to <[email protected]>
Nov 30 21:34:26 avocado wait_for_sysfs[4026]: either wait_for_sysfs (udev 039)
needs an update to handle the device '/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.2/1-2.2:1.0/host2/2:0:0:0' properly (no bus device link) or the sysfs-support of your device's driver needs to be fixed, please report to <[email protected]>
Nov 30 21:34:27 avocado kernel: sda: Write Protect is off Nov 30 21:34:27 avocado kernel: sda: assuming drive cache: write through Nov 30 21:34:27 avocado kernel: sda: [mac] sda1 sda2 sda3 Nov 30 21:34:27 avocado kernel: Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0 Nov 30 21:34:28 avocado scsi.agent[4084]: disk at /devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.2/1-2.2:1.0/host2/2:0:0:0 Nov 30 21:34:30 avocado fstab-sync[4184]: added mount point /media/hfs_bkup for /dev/sda2 Nov 30 21:34:31 avocado kernel: HFS-fs warning: Filesystem was not cleanly unmounted, running fsck.hfs is recommended. mounting read-only. Nov 30 21:34:31 avocado kernel: SELinux: initialized (dev sda2, type hfs), not
configured for labeling
Well, there you have the whole ordeal in a tiny little itty- bitty nutshell. I hope this bug report is useful. Please let me know:
a. If there was anything else I could have provided (short of
a patch :) that would've been useful here.
b. If you know of a solution to my problem so I can pass files
back and forth to my Powerbook using my thumbdrive.
c. If there's a filesystem I'm supposed to be using on this
thumbdrive instead of hfs. I can repartition/reformat it, but I'd like for Apple OS X to be able to read it (I think OS X may have a problem reading Linux-formatted UFS drives, but that's a discussion for another list on another night!) :)
(If you tell me I should repartition/reformat on Linux, some brief instructions would be helpful.)
d. Wait. This is Linux 2.6, not 2.4. Isn't something called
"udev" supposed to have replaced this SCSI emulation that thumbdrives had previously used?
e. If this is something I'm supposed to post to a bugzilla
somewhere, I'd appreciated it if you could direct me to the proper place to do so.
Thanks,
---J
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel