usb stick gets auto-mounted
I use fedora core3. As soon as i insert a usb stick (in the port)the device gets auto mounted and any operations(read write) on the device takes a lot of time. Please help!!
|
Hey, that one didn't work with mine and I was pissed. Goto /etc/rc5.d. There should be a script called "autofs" or "automount", or something similar. If you are not sure what the program is, ask the man pages. When you find the script whose name involved the automounter, delete it.
That should do the job. |
Better to use "chkconfig" to do the trick
Code:
chkconfig --level 5 automount off The fun fact is, when most of the people are complaining that their distro by default won't automount the USB drive, you are complaining that it does. |
lol. Actually i am complaining because the automounted device operates at snail\s pace. I generally have to umount and mount it again :-)
|
There was no service called automount, so i tried
chkconfig --level 5 autofs off it did not work, the usb memory stick got auto mounted and the read-write operations were taking a long time as usual. !? |
Do a "ps -ax" on your console and post the output so we can identify the deamon responsible for the automounting process.
|
here you go ....
[root@pchoudhary:~]$ ps -ax Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ PID TTY STAT TIME COMMAND 1 ? S 0:01 init [5] 2 ? SN 0:02 [ksoftirqd/0] 3 ? S< 0:02 [events/0] 4 ? S< 0:00 [khelper] 5 ? S< 0:00 [kacpid] 20 ? S< 0:00 [kblockd/0] 33 ? S< 0:00 [aio/0] 21 ? S 0:01 [khubd] 32 ? S 0:27 [kswapd0] 106 ? S 0:00 [kseriod] 181 ? S 0:08 [kjournald] 1102 ? S<s 0:00 udevd 1594 ? S<s 0:00 /sbin/dhclient -1 -q -cf /etc/dhclient-eth0.conf -lf /var/lib/dhcp/dhclient-eth0.lea 1896 ? S 0:00 [kjournald] 2288 ? Ss 0:00 /sbin/dhclient -1 -q -cf /etc/dhclient-eth0.conf -lf /var/lib/dhcp/dhclient-eth0.lea 2322 ? Ss 0:00 syslogd -m 0 2326 ? Ss 0:00 klogd -x 2347 ? Ss 0:00 portmap 2367 ? Ss 0:00 rpc.statd 2400 ? Ss 0:00 rpc.idmapd 2470 ? Ss 0:27 nifd -n 2500 ? Ssl 0:00 mDNSResponder 2512 ? S 0:00 /usr/sbin/smartd 2522 ? Ss 0:00 /usr/sbin/acpid 2595 ? Ss 0:00 /usr/sbin/sshd 2606 ? Ss 0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid 2625 ? Ss 0:03 sendmail: accepting connections 2634 ? Ss 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue 2645 ? Ss 0:02 gpm -m /dev/input/mice -t imps2 2675 ? Ss 0:00 /usr/sbin/htt -retryonerror 0 2676 ? S 0:00 htt_server -nodaemon 2688 ? Ss 0:00 /usr/sbin/cannaserver -syslog -u canna 2700 ? Ss 0:00 crond 2741 ? Ss 0:01 xfs -droppriv -daemon 2760 ? Ss 0:00 /usr/sbin/atd 2779 ? Ss 0:04 dbus-daemon-1 --system 2792 ? Ss 0:00 cups-config-daemon 2803 ? Ss 2:33 hald 2813 tty1 Ss+ 0:00 /sbin/mingetty tty1 2814 tty2 Ss+ 0:00 /sbin/mingetty tty2 2815 tty3 Ss+ 0:00 /sbin/mingetty tty3 2816 tty4 Ss+ 0:00 /sbin/mingetty tty4 2817 tty5 Ss+ 0:00 /sbin/mingetty tty5 2818 tty6 Ss+ 0:00 /sbin/mingetty tty6 2819 ? Ss 0:00 /usr/bin/gdm-binary -nodaemon 3286 ? S 0:00 /usr/bin/gdm-binary -nodaemon 3301 ? S 1007:19 /usr/X11R6/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7 3480 ? Ss 0:05 /usr/bin/gnome-session 3508 ? Ss 0:00 /usr/bin/ssh-agent -s 3535 ? S 0:00 /usr/bin/dbus-launch --exit-with-session /etc/X11/xinit/Xclients 3536 ? Ss 0:00 dbus-daemon-1 --fork --print-pid 8 --print-address 6 --session 3540 ? S 0:02 /usr/libexec/gconfd-2 11 3543 ? S 0:00 /usr/bin/gnome-keyring-daemon 3545 ? Ss 0:00 /usr/libexec/bonobo-activation-server --ac-activate --ior-output-fd=18 3547 ? S 0:05 /usr/libexec/gnome-settings-daemon --oaf-activate-iid=OAFIID:GNOME_SettingsDaemon -- 3553 ? S 0:18 /usr/libexec/gam_server 3562 ? S 0:17 xscreensaver -nosplash 3586 ? Ss 1:36 metacity --sm-save-file 1126677225-21388-4274523486.ms 3588 ? Ss 0:03 gnome-volume-manager --sm-config-prefix /gnome-volume-manager-xe9ek2/ --sm-client-id 3590 ? Ssl 0:14 nautilus --sm-config-prefix /nautilus-C2i5L7/ --sm-client-id 117f0000010001122028465 3592 ? Ss 0:30 gnome-panel --sm-config-prefix /gnome-panel-uehz4X/ --sm-client-id 117f0000010001122 3594 ? Ssl 0:02 /usr/libexec/evolution/2.0/evolution-alarm-notify --sm-config-prefix /evolution-alar 3596 ? Ss 0:07 eggcups --sm-config-prefix /eggcups-ZZVTb1/ --sm-client-id 117f000001000112202846500 3599 ? Ss 0:04 /usr/bin/pam-panel-icon --sm-client-id 117f000001000112202846500000246310005 3600 ? S 0:01 /sbin/pam_timestamp_check -d root 3604 ? Sl 0:00 /usr/libexec/gnome-vfs-daemon --oaf-activate-iid=OAFIID:GNOME_VFS_Daemon_Factory --o 3609 ? Sl 0:00 /usr/libexec/evolution-data-server-1.0 --oaf-activate-iid=OAFIID:GNOME_Evolution_Dat 3618 ? S 0:00 /usr/libexec/mapping-daemon 3634 ? S 1:11 /usr/libexec/wnck-applet --oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory --oaf-ior-f 3636 ? S 0:38 /usr/libexec/multiload-applet-2 --oaf-activate-iid=OAFIID:GNOME_MultiLoadApplet_Fact 3638 ? Sl 0:03 /usr/libexec/gweather-applet-2 --oaf-activate-iid=OAFIID:GNOME_GWeatherApplet_Factor 3640 ? S 0:06 /usr/libexec/gdict-applet --oaf-activate-iid=OAFIID:GNOME_GDictApplet_Factory --oaf- 3643 ? S 0:13 /usr/libexec/mixer_applet2 --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oaf 3645 ? S 0:07 /usr/libexec/clock-applet --oaf-activate-iid=OAFIID:GNOME_ClockApplet_Factory --oaf- 3647 ? S 0:03 /usr/libexec/notification-area-applet --oaf-activate-iid=OAFIID:GNOME_NotificationAr 3722 ? S 3:21 /usr/bin/artsd -F 10 -S 4096 -s 60 -m artsmessage -l 3 -f 4622 ? Sl 1:09 evolution 4638 ? Sl 0:02 /usr/libexec/evolution/2.0/evolution-exchange-storage --oaf-activate-iid=OAFIID:GNOM 4640 ? Z 0:00 [netstat] <defunct> 4735 ? S 4:20 gaim 4743 ? S 0:00 /bin/sh /usr/lib/firefox-0.10.1/firefox -UILocale en-US 4761 ? S 0:00 /bin/sh /usr/lib/firefox-0.10.1/run-mozilla.sh /usr/lib/firefox-0.10.1/firefox-bin - 4766 ? Sl 55:17 /usr/lib/firefox-0.10.1/firefox-bin -UILocale en-US 4775 ? Z 0:00 [netstat] <defunct> 24513 ? Sl 1:23 skype 2663 ? S 2:01 konsole 2665 ? Ss 0:00 kdeinit: Running... 2668 ? S 0:02 kdeinit: dcopserver --nosid --suicide 2670 ? S 0:00 kdeinit: klauncher 2672 ? S 0:45 kdeinit: kded 2772 ? S 1:55 kdeinit: knotify 3261 ? S 0:02 [pdflush] 3467 ? S 0:00 [pdflush] 17438 ? Ss 0:00 /usr/bin/spamd --port 7830 --local --daemonize 17440 ? S 0:00 spamd child 17441 ? S 0:00 spamd child 17442 ? S 0:00 spamd child 17443 ? S 0:00 spamd child 17444 ? S 0:00 spamd child 13054 ? Ss 0:00 cupsd 22484 ? Ss 0:01 sshd: root@pts/3 22486 pts/3 Ss+ 0:00 -bash 5756 ? S 0:40 konsole 6720 pts/9 Ss 0:00 /bin/bash 4133 pts/9 S 0:00 su - 4136 pts/9 S 0:00 -bash 4584 ? Sl 0:53 gnome-terminal 4585 ? S 0:00 gnome-pty-helper 4586 pts/1 Ss 0:00 bash 4605 pts/1 S 0:00 su - 4608 pts/1 S 0:00 -bash 4654 pts/1 S+ 0:01 minicom 25796 pts/6 Ss 0:00 /bin/bash 25815 pts/6 S 0:00 su - 25818 pts/6 S+ 0:00 -bash 28235 pts/2 Ss 0:00 /bin/bash 28465 pts/2 S 0:00 su - 28708 pts/2 S+ 0:00 -bash 6868 ? S 0:02 konsole 7612 pts/4 Ss 0:00 /bin/bash 8151 pts/4 S 0:00 su - 8273 pts/4 S+ 0:00 -bash 17728 pts/7 Ss 0:00 /bin/bash 18162 pts/7 S 0:00 su - 18610 pts/7 S+ 0:00 -bash 4495 pts/5 Ss 0:00 /bin/bash 4514 pts/5 S 0:00 su - 4517 pts/5 S+ 0:00 -bash 12388 pts/9 R+ 0:00 ps -ax [root@pchoudhary:~]$ |
Quote:
Code:
chkconfig --list | grep on |
I think this is what you are looking for ...
[root@pchoudhary:~]$ chkconfig --list | grep autofs autofs 0:off 1:off 2:off 3:on 4:on 5:off 6:off On what runlevels should i turn off autofs.... will it have any other side-effects?? |
The program giving you the trouble is udevd.
This program registrates bus events and reports them to hotplug. Hotplug manages the mounting of your USB stick. shut it down, there should be no more mounting. However I think that udevd simply links a new device, meaning that this will prevent new devices being created at runtime (for example linking an external hard disk while computer is running, etc, etc). Disable it by writing "kill -s SIGKILL 1102" (replace 1102 with the PID of udevd). Does the computer still automount? Are there any other complications? |
I did as you said. I killed udevd. then i did a
[root@pchoudhary:sbin]$ ps -ef | grep udevd root 32139 9780 0 14:49 pts/4 00:00:00 grep udevd then i plugged in a usb memory stick. [root@pchoudhary:sbin]$ ps -ef | grep udevd root 32154 1 0 14:49 ? 00:00:00 udevd root 32276 9780 0 14:49 pts/4 00:00:00 grep udevd So you can see... as soon as the usb evice was plugged in, udevd got restarted. |
I made some research on udevd. udevd is a salve of hotplug. I was originally frustrated by the fact that I couldn't find hotplug as an application running on zour computer (examining your ps post). However, I found the following quote in the udevd manual:
"In the Linux 2.6 kernel, hotplugging has been integrated with the driver model core so that any bus or class can report hotplug events when devices are added or removed. " According to the istallation manual, the kernel calls out to a program or script called /sbin/hotplug when hotplug events take place. Check if it is there, if it exists rename it to /sbin/hotplug_disabled or something. Try it? Did it work? |
your flash driveis getting mount ed with sync on. this lets you pull it out without mounting it. This is a problem with suse, check teh suse forum they should help you with that
|
All times are GMT -5. The time now is 03:11 AM. |