LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-18-2005, 04:00 AM   #1
pranavchoudhary
LQ Newbie
 
Registered: Oct 2005
Location: India
Posts: 25

Rep: Reputation: 15
Question 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!!
 
Old 10-18-2005, 04:47 AM   #2
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
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.
 
Old 10-18-2005, 04:53 AM   #3
SkyEye
Member
 
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441

Rep: Reputation: 40
Better to use "chkconfig" to do the trick
Code:
chkconfig --level 5 automount off
will off the service 'automount' in runlevel 5 (runlevel with GUI login in RH/Fedora).

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.

Last edited by SkyEye; 10-18-2005 at 05:10 AM.
 
Old 10-18-2005, 05:06 AM   #4
pranavchoudhary
LQ Newbie
 
Registered: Oct 2005
Location: India
Posts: 25

Original Poster
Rep: Reputation: 15
lol. Actually i am complaining because the automounted device operates at snail\s pace. I generally have to umount and mount it again :-)
 
Old 10-19-2005, 02:13 AM   #5
pranavchoudhary
LQ Newbie
 
Registered: Oct 2005
Location: India
Posts: 25

Original Poster
Rep: Reputation: 15
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. !?
 
Old 10-19-2005, 04:49 AM   #6
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
Do a "ps -ax" on your console and post the output so we can identify the deamon responsible for the automounting process.
 
Old 10-19-2005, 07:13 AM   #7
pranavchoudhary
LQ Newbie
 
Registered: Oct 2005
Location: India
Posts: 25

Original Poster
Rep: Reputation: 15
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:~]$
 
Old 10-19-2005, 10:06 PM   #8
SkyEye
Member
 
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441

Rep: Reputation: 40
Quote:
Originally posted by ichrispa
Do a "ps -ax" on your console and post the output so we can identify the deamon responsible for the automounting process.
Better if you can post the output of
Code:
chkconfig --list | grep on
 
Old 10-20-2005, 12:37 AM   #9
pranavchoudhary
LQ Newbie
 
Registered: Oct 2005
Location: India
Posts: 25

Original Poster
Rep: Reputation: 15
I think this is what you are looking for ...

[root@pchoudhary:~]$ chkconfig --list | grep autofs
autofs 0ff 1ff 2ff 3n 4n 5ff 6ff

On what runlevels should i turn off autofs.... will it have any other side-effects??
 
Old 10-20-2005, 09:58 AM   #10
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
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?
 
Old 10-21-2005, 04:13 AM   #11
pranavchoudhary
LQ Newbie
 
Registered: Oct 2005
Location: India
Posts: 25

Original Poster
Rep: Reputation: 15
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.
 
Old 10-21-2005, 05:35 AM   #12
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
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?
 
Old 02-25-2006, 05:31 PM   #13
darkhatter
Member
 
Registered: Dec 2005
Distribution: Slackware 12.1/Current
Posts: 159

Rep: Reputation: 30
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
 
  


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
making a mounted memory stick rw newusermike Linux - Newbie 1 08-14-2005 03:04 AM
mount/umount usb stick - PQI Intelligent Stick 2.0 sandbag Linux - Software 5 05-06-2005 11:12 AM
Usb key auto-mounted twice matthias49 Linux - Hardware 0 12-26-2004 09:09 AM
How do you auto mount a USB memory stick ? KiwiPingu Linux - Newbie 1 07-29-2004 05:44 PM
USB problems: Memorex USB stick 256MB and PSX to USB adapter by Radio Shack Knuckles T15 Linux - Hardware 1 05-19-2004 06:58 PM


All times are GMT -5. The time now is 10:14 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration