Thanks for the advice. Unfortunately, the thing is that when I drop down 
to runlevel 1, pretty much everything is killed off except kernel-level 
processes. At that point, both Samba daemons, smbd and nmbd, are not 
running (checked using ps). If I try to do a 'ls' on the mounted 
directory, I get an "Input/output error." If I try to umount it, I get a 
(I believe) "Device busy" error, which means that I will not be able to 
unmount it. If I try to use fuser to see what is holding it up, I get 
another error. Basically, I have no way of dealing with the mount once I 
get the Input/output error. Below is the script output of a few commands 
in runlevel 1 to demonstrate what I am talking about.

------------------------------------------------------------------------------
bash-2.05# ps -efl
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
100 S root 1 0 0 68 0 - 356 do_sel Jul15 ? 00:00:03 init
040 S root 2 1 0 69 0 - 0 contex Jul15 ? 00:00:03 [keventd]
040 S root 3 1 0 69 0 - 0 apm_ma Jul15 ? 00:00:00 [kapmd]
040 S root 4 0 0 79 19 - 0 ksofti Jul15 ? 00:00:01 [ksoftirqd_CPU0]
040 S root 5 0 0 69 0 - 0 kswapd Jul15 ? 00:01:14 [kswapd]
040 S root 6 0 0 69 0 - 0 bdflus Jul15 ? 00:00:00 [bdflush]
040 S root 7 0 0 69 0 - 0 kupdat Jul15 ? 00:00:00 [kupdated]
040 S root 8 1 0 59 -20 - 0 md_thr Jul15 ? 00:00:00 [mdrecoveryd]
040 S root 14 1 0 69 0 - 0 down_i Jul15 ? 00:00:00 [scsi_eh_0]
040 S root 17 1 0 69 0 - 0 end Jul15 ? 00:00:01 [kjournald]
040 S root 247 1 0 69 0 - 0 end Jul15 ? 00:00:00 [kjournald]
040 S root 250 1 0 69 0 - 0 end Jul15 ? 00:00:00 [kjournald]
040 S root 251 1 0 69 0 - 0 end Jul15 ? 00:00:01 [kjournald]
040 S root 252 1 0 69 0 - 0 end Jul15 ? 00:00:04 [kjournald]
040 S root 253 1 0 69 0 - 0 end Jul15 ? 00:00:03 [kjournald]
040 S root 4369 1 0 69 0 - 356 wait4 17:01 tty1 00:00:00 init
000 S root 4370 4369 0 69 0 - 579 wait4 17:01 tty1 00:00:00 /bin/sh
100 S root 4389 4370 0 72 0 - 348 read_c 17:05 tty1 00:00:00 script -f 
/pub/rlev1.txt
040 S root 4390 4389 0 73 0 - 350 read_c 17:05 tty1 00:00:00 script -f 
/pub/rlev1.txt
000 S root 4391 4390 0 75 0 - 575 wait4 17:05 pts/0 00:00:00 bash -i
000 R root 4393 4391 0 76 0 - 770 - 17:05 pts/0 00:00:00 ps -efl

bash-2.05# netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path

bash-2.05# mount
/dev/hda1 on / type ext3 (rw)
none on /proc type proc (rw)
none on /dev type devfs (rw)
none on /dev/pts type devpts (rw,mode=0620)
none on /dev/shm type tmpfs (rw)
/dev/hda8 on /home type ext3 (rw)
/mnt/cdrom on /mnt/cdrom type supermount 
(ro,dev=/dev/hdc,fs=iso9660,--,iocharset=iso8859-1)
/mnt/floppy on /mnt/floppy type supermount 
(rw,sync,dev=/dev/fd0,fs=vfat,--,iocharset=iso8859-1,codepage=850)
/mnt/zip on /mnt/zip type supermount 
(rw,sync,dev=/dev/sdb4,fs=vfat,--,iocharset=iso8859-1,codepage=850)
/dev/sda5 on /opt type ext3 (rw)
/dev/hdb1 on /pub type ext3 (rw)
/dev/hda6 on /usr type ext3 (rw)
/dev/hda7 on /var type ext3 (rw)
none on /proc/bus/usb type usbdevfs (rw,devmode=0664,devgid=43)
//RGILLEN/shared on /home/borgille/mnt/RGILLEN/shared type smbfs (0)

bash-2.05# umount /home/borgille/mnt/RGILLEN/shared
umount: /home/borgille/mnt/RGILLEN/shared: device is busy

bash-2.05# ls /home/borgille/mnt/RGILLEN/shared
ls: /home/borgille/mnt/RGILLEN/shared: Input/output error

bash-2.05# touch /home/borgille/mnt/RGILLEN/shared
touch: setting times of `/home/borgille/mnt/RGILLEN/shared': 
Input/output error
-------------------------------------------------------------------------------

Note that I did this on my Mandrake box at work (I was experiencing the 
problem at home). To reproduce the problem, I first used smbmount to 
mount a share on a Win2K box. Then, I disabled the network connection in 
the Windows control panel on the machine that had the share. At this 
point, any shells on the Mandrake box that try to do anything 
interactive with the mounts lock up. After closing what I can, I 
telinit'd down to runlevel 1 (from 5), which is where I ran the commands 
that you see above. You'll notice that none of the Samba daemons are 
running (nor could they without the network running). Even after I 
return to runlevel 5 and restart the networking on the Win2K box, I 
cannot umount the share. I can do nothing with it. At this point, the 
only way to remove the mount (that I know of) is to reboot the machine. 
This is the main reason that I suggested that it might be a kernel-level 
problem -- the kernel, which controls filesystem mounts, will not 
release the mount point under any circumstances. So, if I am correct 
about it being a kernel problem, I am wondering if it happens only with 
Mandrake kernels.

Unfortunately, since I am at work, I couldn't reproduce the dhcpd 
problem that I think might be related. I thought that the problem might 
be affecting networking on the Mandrake box, but in my scenario here at 
the office, I can connect to a smb share on the Mandrake box from the 
Win2K one.

ROB


J. Craig Woods wrote:

>Rob Gillen wrote:
>
>I do not believe this is a samba "bug" per se. It does, however, point
>out some things you should be aware of in regards to any *nix type
>system. When you mount a remote directory, using ether the "smbmount" or
>"mount -t smbfs" commands, you have called a daemon to run on your linux
>machine. This daemon is spawned by the command "/usr/bin/smbmount", and
>it will run until you umount your remote directory. Now you are saying
>that someone comes along, and kills the machine you have mounted the
>remote directory from. The problem now is not samba: it is that you have
>a daemon running that can no longer make a connection to the "dead"
>machine. You can restart the samba services until hell freezes over but
>it will not help you. You must stop the samba mount daemon that is
>running. If I have a remote directory mounted via smbmount on my linux
>machine, and I do a "ps -aux | grep mount", I will see the daemon. In my
>case it looks 
>like this: 
>
><snip>
>



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to