Re: [expert] Unmountable Samba mounts and other oddities
For the record and for those that are interested, it looks like the problem *was* kernel-level. I was running 2.4.18-6mdk, and the problem seems to have been fixed (see the package changes for the RPM regarding smbfs) in the 2.4.18-7mdk and later kernels (I grabbed the 2.4.18-8mdk one). The problem still appears to be there at first, but after I used the "umount -l" command, it took a few moments, but the unmountable mountpoint went away. Yay! Nevertheless, I still think this is an unacceptable way to handle such a problem, but at least I won't have to reboot anymore. Thanks to all who threw ideas my way. ROB Rob Gillen wrote: > I've seen a problem for many different versions (latest 8.2) of > Mandrake with Samba before, and I may have even inquired about it > before. Whether it is a problem with Samba I have no idea, but I > suspect not. I'm trying to get some info/advice about what might be > potentially the problem before going to Samba mailing lists to query > them. > > Some of you might already be familiar with the strange way that Linux > will often disallow umount-ing or listing directory contents of a > mounted smb share, returning the error text, "Input/output error." I > believe this error happens when a smb share is mounted, then that > remote share is removed. This is a seriously annoying problem, > because restarting Samba does not solve the problem, nor does changing > runlevels. Which is why I think it may be a kernel-level problem. I > have tried changing the runlevel to [S]ingle level user, which is > running pretty much nothing save kernel processes and a simple shell. > At this level, a 'mount' command still shows the shares to be mounted, > and also at this level it is still impossible to umount them. The > only solution that I have found so far is rebooting, which I think is > an unacceptable way to handle such a problem. > Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Unmountable Samba mounts and other oddities
From the man pages for unmount: -l Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. (Requires kerĀnel 2.4.11 or later.) - Jason B. On Tuesday 30 July 2002 07:58 pm, James Sparenberg wrote: > Jason, >Not to seem dense. (I really do try not to.) is that a -1 > (one) or a -l (ell). Second where did you find this out? It's > seems to be a neat way to umount a "stuck" mount, I'd like to read > more. > > James > > > On Mon, 29 Jul 2002 18:44:08 -0400 > > PlugHead <[EMAIL PROTECTED]> wrote: > > I have this problem all the time: > > > > 'umount /mount/point -l' > > > > should do the trick. > > > > -Jason > > > > (And once again, my first post on the topic was dropped... > > grr...) > > > > On Monday 29 July 2002 05:42 pm, Rob Gillen wrote: > > > 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. > > > > = > > "Did any of them kids have some space alien with a face like a > > friendly turd in a bike basket?" > > -- (Terry Pratchett & Neil Gaiman, Good Omens) Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Unmountable Samba mounts and other oddities
(Yet Another Re-posted Message...) James, It's -l (ell) as in 'lazy'. From "man umount": -l Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all referĀ ences to the filesystem as soon as it is not busy anymore. (Requires kernel 2.4.11 or later.) This has always worked for me, but it may be a different problem. My problem seems to be that our NT "server" is disconnecting shares after a timeout period, and Samba doesn't automatically re-connect. This seems to occurr with Samba (at least) 2.2.3 - 2.2.5... Anyhow, Todd's suggestion of "-f" (force) is probably more appropriate... :) -Jason On Tuesday 30 July 2002 07:58 pm, James Sparenberg wrote: > Jason, >Not to seem dense. (I really do try not to.) is that a -1 > (one) or a -l (ell). Second where did you find this out? It's > seems to be a neat way to umount a "stuck" mount, I'd like to read > more. > > > 'umount /mount/point -l' = In the Beginning It was a nice day. -- (Terry Pratchett & Neil Gaiman, Good Omens) Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Unmountable Samba mounts and other oddities
Hi Todd, Actually, if smbd is responsible for inbound smb requests, then it probably isn't relevant. My problem occurs when I connect to a Windows machine from my Mandrake machine, and then lose the network connection between them (power loss, windows machine removed from network, routing problems, etc.). But the real problem doesn't occur until after restarting the Samba daemons when the network connection is broken. I know, the easiest way to fix this problem is to avoid restarting Samba. But, I am really only using that example to demonstrate what I believe is a bigger problem, but whether or not it occurs with a generic kernel or a Mandrake one, I do not know (yet). Also, using 'umount -f' does not work after the Samba restart. Whether it works prior to that, I'm not sure (haven't had time to check). The following is a clip from a script capture trying it out (along with a few other things): -- bash-2.05# mount | grep smbfs //RGILLEN/shared on /home/borgille/mnt/RGILLEN/shared type smbfs (0) bash-2.05# ls /home/borgille/mnt/RGILLEN/shared ls: /home/borgille/mnt/RGILLEN/shared: Input/output error bash-2.05# umount -f /home/borgille/mnt/RGILLEN/shared umount2: Device or resource busy umount: //RGILLEN/shared: not found umount: /home/borgille/mnt/RGILLEN/shared: Illegal seek bash-2.05# umount -l /home/borgille/mnt/RGILLEN/shared bash-2.05# mount | grep smbfs //RGILLEN/shared on /home/borgille/mnt/RGILLEN/shared type smbfs (0) bash-2.05# umount -f /home/borgille/mnt/RGILLEN/shared umount2: Invalid argument umount: //RGILLEN/shared: not found umount: /home/borgille/mnt/RGILLEN/shared: Illegal seek bash-2.05# rmdir /home/borgille/mnt/RGILLEN/shared/ bash-2.05# umount -f /home/borgille/mnt/RGILLEN/shared umount2: No such file or directory umount: //RGILLEN/shared: not found umount: /home/borgille/mnt/RGILLEN/shared: Illegal seek -- ROB Todd Lyons wrote: >Rob Gillen wrote on Mon, Jul 29, 2002 at 05:42:12PM -0400 : > >>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 >> > >Doesn't matter if smbd is running. This is a MOUNT. It is handled >directly by the kernel for outbound samba requests for accessing a >remote Samba or NT or Windows share. smbd is a program that runs in >userland that provides a service for inbound samba requests where the >program LOOKS like an NT server. > >>(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 >>//RGILLEN/shared on /home/borgille/mnt/RGILLEN/shared type smbfs (0) >> > >umount -f /home/borgille/mnt/RGILLEN/shared > Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Unmountable Samba mounts and other oddities
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,
Re: [expert] Unmountable Samba mounts and other oddities
I imagine you wanted to grep the output of ps to find the smbd server, but at runlevel 1 nothing is really running (by default). I get pretty much the same thing from ps when I have the problem and when I do not. The first listing is with the problem (telinit 1 first). The second listing is after a reboot into runlevel 1: --- bash-2.05# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 1424 380 ?SJul15 0:03 init root 2 0.0 0.0 00 ?SW Jul15 0:03 [keventd] root 3 0.0 0.0 00 ?SW Jul15 0:00 [kapmd] root 4 0.0 0.0 00 ?SWN Jul15 0:01 [ksoftirqd_CPU0] root 5 0.0 0.0 00 ?SW Jul15 1:14 [kswapd] root 6 0.0 0.0 00 ?SW Jul15 0:00 [bdflush] root 7 0.0 0.0 00 ?SW Jul15 0:00 [kupdated] root 8 0.0 0.0 00 ?SW< Jul15 0:00 [mdrecoveryd] root14 0.0 0.0 00 ?SW Jul15 0:00 [scsi_eh_0] root17 0.0 0.0 00 ?SW Jul15 0:01 [kjournald] root 247 0.0 0.0 00 ?SW Jul15 0:00 [kjournald] root 250 0.0 0.0 00 ?SW Jul15 0:00 [kjournald] root 251 0.0 0.0 00 ?SW Jul15 0:01 [kjournald] root 252 0.0 0.0 00 ?SW Jul15 0:04 [kjournald] root 253 0.0 0.0 00 ?SW Jul15 0:03 [kjournald] root 8844 0.0 0.1 1424 404 tty1 S18:28 0:00 init root 8845 0.0 0.4 2312 1212 tty1 S18:28 0:00 /bin/sh root 8846 0.0 0.1 1392 456 tty1 S18:29 0:00 script -f /pub/rl root 8847 0.2 0.1 1400 500 tty1 S18:29 0:00 script -f /pub/rl root 8848 0.5 0.4 2296 1160 pts/0S18:29 0:00 bash -i root 8849 0.0 0.2 2620 696 pts/0R18:29 0:00 ps aux --- bash-2.05# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 5.0 0.1 1412 508 ?S18:53 0:03 init root 2 0.0 0.0 00 ?SW 18:53 0:00 [keventd] root 3 0.0 0.0 00 ?SW 18:53 0:00 [kapmd] root 4 0.0 0.0 00 ?SWN 18:53 0:00 [ksoftirqd_CPU0] root 5 0.0 0.0 00 ?SW 18:53 0:00 [kswapd] root 6 0.0 0.0 00 ?SW 18:53 0:00 [bdflush] root 7 0.0 0.0 00 ?SW 18:53 0:00 [kupdated] root 8 0.0 0.0 00 ?SW< 18:53 0:00 [mdrecoveryd] root14 0.0 0.0 00 ?SW 18:53 0:00 [scsi_eh_0] root17 0.0 0.0 00 ?SW 18:53 0:00 [kjournald] root 242 0.0 0.0 00 ?SW 18:53 0:00 [kjournald] root 245 0.0 0.0 00 ?SW 18:53 0:00 [kjournald] root 246 0.0 0.0 00 ?SW 18:53 0:00 [kjournald] root 247 0.0 0.0 00 ?SW 18:53 0:00 [kjournald] root 248 0.0 0.0 00 ?SW 18:53 0:00 [kjournald] root 575 0.0 0.1 1412 508 tty1 S18:53 0:00 init root 576 0.1 0.4 2312 1208 tty1 S18:53 0:00 /bin/sh root 577 0.0 0.1 1392 456 tty1 S18:54 0:00 script /pub/rlev1 root 578 0.0 0.1 1400 500 tty1 S18:54 0:00 script /pub/rlev1 root 579 0.2 0.4 2296 1160 pts/0S18:54 0:00 bash -i root 580 0.0 0.2 2620 696 pts/0R18:54 0:00 ps aux --- They are identical for all intents and purposes. et wrote: >can you reboot to run level 1? ie.; at lilo first prompt, type "linux 1" >without the quotes? and try the same thing? or post the output from "ps aux | >grep sm" or try a "kill -9 {pidofwhatevercomesup}" from theprevious command : >"ps aux | grep sm" without the quotes and without "{ }". > Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Unmountable Samba mounts and other oddities
Rob Gillen wrote on Mon, Jul 29, 2002 at 05:42:12PM -0400 : > 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 Doesn't matter if smbd is running. This is a MOUNT. It is handled directly by the kernel for outbound samba requests for accessing a remote Samba or NT or Windows share. smbd is a program that runs in userland that provides a service for inbound samba requests where the program LOOKS like an NT server. > (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 > //RGILLEN/shared on /home/borgille/mnt/RGILLEN/shared type smbfs (0) umount -f /home/borgille/mnt/RGILLEN/shared Blue skies... Todd -- Todd Lyons -- MandrakeSoft, Inc. http://www.mandrakesoft.com/ UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn Cooker Version mandrake-release-9.0-0.2mdk Kernel 2.4.18-21mdk msg56617/pgp0.pgp Description: PGP signature
Re: [expert] Unmountable Samba mounts and other oddities
Jason, Not to seem dense. (I really do try not to.) is that a -1 (one) or a -l (ell). Second where did you find this out? It's seems to be a neat way to umount a "stuck" mount, I'd like to read more. James On Mon, 29 Jul 2002 18:44:08 -0400 PlugHead <[EMAIL PROTECTED]> wrote: > I have this problem all the time: > > 'umount /mount/point -l' > > should do the trick. > > -Jason > > (And once again, my first post on the topic was dropped... > grr...) > > On Monday 29 July 2002 05:42 pm, Rob Gillen wrote: > > 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. > > = > "Did any of them kids have some space alien with a face like a > friendly turd in a bike basket?" > -- (Terry Pratchett & Neil Gaiman, Good Omens) > > > Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Unmountable Samba mounts and other oddities
This worked the first time that I tried it, but there are cases when it does not work. For example, if after mounting a Windows share the connection gets broken, the mount will not work, and you might see things like command-line lockups during directory listings, etc. At this point, I believe you can successfully use a "umount -l" to unmount it. When I tried it, the mount was not immediately removed from the list of mounted filesystems via the mount command. I probably moved too fast trying to figure out what was going on, because I shot back to runlevel 1 (from 5), and it is from there that I noticed that the mount point was no longer listed with the "mount" command. Now, if instead of immediately using "umount -l" after the network connection is broken you decide to restart the Samba server daemons, then you will be unable to use the "mount -l" command. Here is a script output of what I see when I try this (runlevel 1 after Samba restart): - 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/share umount: /home/borgille/mnt/RGILLEN/share: not found bash-2.05# umount -l /home/borgille/mnt/RGILLEN/share umount: /home/borgille/mnt/RGILLEN/share: not found - One note here that may not be evident is that the mount point did exist. ROB PlugHead wrote: >I have this problem all the time: > >'umount /mount/point -l' > >should do the trick. > >-Jason > >(And once again, my first post on the topic was dropped... grr...) > Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Unmountable Samba mounts and other oddities
I have this problem all the time: 'umount /mount/point -l' should do the trick. -Jason (And once again, my first post on the topic was dropped... grr...) On Monday 29 July 2002 05:42 pm, Rob Gillen wrote: > 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. = "Did any of them kids have some space alien with a face like a friendly turd in a bike basket?" -- (Terry Pratchett & Neil Gaiman, Good Omens) Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Unmountable Samba mounts and other oddities
can you reboot to run level 1? ie.; at lilo first prompt, type "linux 1" without the quotes? and try the same thing? or post the output from "ps aux | grep sm" or try a "kill -9 {pidofwhatevercomesup}" from theprevious command : "ps aux | grep sm" without the quotes and without "{ }". On Monday 29 July 2002 05:42 pm, you wrote: > 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 th
Re: [expert] Unmountable Samba mounts and other oddities
Rob Gillen wrote on Sun, Jul 28, 2002 at 11:09:16PM -0400 : > > Some of you might already be familiar with the strange way that Linux > will often disallow umount-ing or listing directory contents of a > mounted smb share, returning the error text, "Input/output error." I > believe this error happens when a smb share is mounted, then that remote > share is removed. This is a seriously annoying problem, because > restarting Samba does not solve the problem, nor does changing > runlevels. Which is why I think it may be a kernel-level problem. I > have tried changing the runlevel to [S]ingle level user, which is > running pretty much nothing save kernel processes and a simple shell. > At this level, a 'mount' command still shows the shares to be mounted, > and also at this level it is still impossible to umount them. The only umount -f > solution that I have found so far is rebooting, which I think is an > unacceptable way to handle such a problem. Yes, it is a kernel issue. mount is something that is done by the kernel, but calling it a problem doesn't seem right. It is a design decision, not a problem. It HAS to be in the kernel because of the way that mounts are treated by Linux. > Now the interesting part. During the time that I could not remove the > unmountable mounted smb shares, the dhcpd daemon also seemed to start > malfunctioning. On the Mandrake box, everything seemed fine (that is, I > restarted the dhcpd daemon which had no complaints during the restart). > But none of the other machines that get served on the network from it > were getting addresses. Unfortunately, I wasn't able to sniff packets, > so I don't know what kind of communication (or lack thereof) was > occurring. It was a frustrating exercise trying to figure out why my > other boxes were not getting addresses. Strangely enough, when I > rebooted the Mandrake box again, everything worked as normal -- the > other boxes got their IP addresses fine. Read /var/log/messages. dhcpd may have started properly, but I'll bet that it didn't stay running for whatever reason. > > I don't know for sure if the dhcpd thing was related to the smb mount > problem, but I'll try to repeat the problem and see if it recurs. If > anybody has seen the same problem or something similar, I would > appreciate it if you could share how you resolved it. I doubt it too, but I'm interested to see what /var/log/messages says about it. Also, did you do a 'netstat -lnp' to see if dhcpd was actually bound to a port and listening? Blue skies... Todd -- Todd Lyons -- MandrakeSoft, Inc. http://www.mandrakesoft.com/ UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn Cooker Version mandrake-release-9.0-0.2mdk Kernel 2.4.18-21mdk msg56606/pgp0.pgp Description: PGP signature
Re: [expert] Unmountable Samba mounts and other oddities
Thanks for the input James. I've actually tried some of the stuff that you mentioned. When I experience the problem, the CPU isn't being taxed in any way. Also, the mount point for the share is not removed and cannot be removed because the system thinks that the directory is already mounted (busy). Restarting Samba doesn't change this status at all. As I said earlier, it most likely is not a Samba problem. It seemed to be more of a problem in the kernel, as that is where I expect filesystem mounting is tracked, etc. Rob James Sparenberg wrote: >this is neither a fix or a reason. But it might enable you to >"fix" the situation without a reboot. It sounds like what >happened was that samba was desperately trying to access a >non-existent share and took up all of your CPU cycles, thereby >fuzzing up your DHCPD. What I would do is. > >1. touch or otherwise recreate the share/directory that was >removed so that samba can find something. > >2. Umount the share > >3. remove it from being automounted if that is being done. > >4. restart Samba > >5. Make sure it didn't try and remount it again. > >6. Remove the share/directory from the other box. > >This isn't a fix but a work around for keeping your system >running. Then I'd go to the Samba site and report this as a bug >with as much detail as you have provided here. (Maybe include >Samba version etc.) It's definitely not catching an error and >putting itself into a loop of some kind. > Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Unmountable Samba mounts and other oddities
I've got this problem as well, only it is happening with a share that still exists. As far as I can tell, it seems to be the case that our NT server is dropping the connection after some inactivity, and Samba can't re-establish for some reason... Anyhow, for me, I just use umount with the "-l" option. After that, I'm able to re-mount the share and it works just fine (until it times out again...) If anyone knows a real fix for this, I'd love to hear it... -Jason On Sunday 28 July 2002 11:09 pm, Rob Gillen wrote: > I've seen a problem for many different versions (latest 8.2) of Mandrake > with Samba before, and I may have even inquired about it before. > Whether it is a problem with Samba I have no idea, but I suspect not. > I'm trying to get some info/advice about what might be potentially the > problem before going to Samba mailing lists to query them. > > Some of you might already be familiar with the strange way that Linux > will often disallow umount-ing or listing directory contents of a > mounted smb share, returning the error text, "Input/output error." I > believe this error happens when a smb share is mounted, then that remote > share is removed. This is a seriously annoying problem, because > restarting Samba does not solve the problem, nor does changing > runlevels. Which is why I think it may be a kernel-level problem. I > have tried changing the runlevel to [S]ingle level user, which is > running pretty much nothing save kernel processes and a simple shell. > At this level, a 'mount' command still shows the shares to be mounted, > and also at this level it is still impossible to umount them. The only > solution that I have found so far is rebooting, which I think is an > unacceptable way to handle such a problem. = "You can't second-guess ineffability, I always say." -- (Terry Pratchett & Neil Gaiman, Good Omens) Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Unmountable Samba mounts and other oddities
Rob Gillen wrote: > > Some of you might already be familiar with the strange way that Linux > will often disallow umount-ing or listing directory contents of a > mounted smb share, returning the error text, "Input/output error." I > believe this error happens when a smb share is mounted, then that remote > share is removed. This is a seriously annoying problem, because > restarting Samba does not solve the problem, nor does changing > runlevels. Which is why I think it may be a kernel-level problem. I > have tried changing the runlevel to [S]ingle level user, which is > running pretty much nothing save kernel processes and a simple shell. > At this level, a 'mount' command still shows the shares to be mounted, > and also at this level it is still impossible to umount them. The only > solution that I have found so far is rebooting, which I think is an > unacceptable way to handle such a problem. 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: "root 591 0.0 0.2 3748 1648 ? SJul28 0:00 /sbin/mount.smbfs" (if you run "ps -ef | grep mount" you will actually see the name of the remote directory, such as "//windows_name/c$". Some of this may vary according to the way you called the daemon, i.e. "smbmount" or "mount -t smbfs") Now, no doubt, because the remote machine went down, I am a bit foobarred but if I simply run a kill -9 on the correct pid, I should be good to go. Some things not to do when samba mounting. Do not do a "hard" mount, i.e. do not make entries for your mount in "/etc/fstab". Do make it a "soft" mount" Because machines can and will go down, especially M$ junk, do your smbmount, take care of what you want to do, and "smbumount" as soon as possible. Try to make sure that the M$ machine is not turned off by some knucklehead while you are in the smbmount mode (good luck on this one). > Now the interesting part. During the time that I could not remove the > unmountable mounted smb shares, the dhcpd daemon also seemed to start > malfunctioning. Well, as James S. pointed out, if you went into a major "eat cpu cycles" because you had a daemon, i.e. smbmount or mount.smbfs (this latter daemon is just a symlink to smbmount) running amuck, it is possible that it foobarred dhcp on your machine. Again, no need to reboot or restart samba, just kill...kill...kill... Hopes it makes sense, and helps drjung -- J. Craig Woods UNIX/NT Network/System Administration http://www.trismegistus.net/resume.html Character is built upon the debris of despair --Emerson Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Unmountable Samba mounts and other oddities
Rob, this is neither a fix or a reason. But it might enable you to "fix" the situation without a reboot. It sounds like what happened was that samba was desperately trying to access a non-existent share and took up all of your CPU cycles, thereby fuzzing up your DHCPD. What I would do is. 1. touch or otherwise recreate the share/directory that was removed so that samba can find something. 2. Umount the share 3. remove it from being automounted if that is being done. 4. restart Samba 5. Make sure it didn't try and remount it again. 6. Remove the share/directory from the other box. This isn't a fix but a work around for keeping your system running. Then I'd go to the Samba site and report this as a bug with as much detail as you have provided here. (Maybe include Samba version etc.) It's definitely not catching an error and putting itself into a loop of some kind. James On Sun, 28 Jul 2002 23:09:16 -0400 Rob Gillen <[EMAIL PROTECTED]> wrote: > I've seen a problem for many different versions (latest 8.2) of > Mandrake with Samba before, and I may have even inquired about > it before. Whether it is a problem with Samba I have no idea, > but I suspect not. I'm trying to get some info/advice about > what might be potentially the problem before going to Samba > mailing lists to query them. > > Some of you might already be familiar with the strange way that > Linux will often disallow umount-ing or listing directory > contents of a mounted smb share, returning the error text, > "Input/output error." I believe this error happens when a smb > share is mounted, then that remote share is removed. This is a > seriously annoying problem, because restarting Samba does not > solve the problem, nor does changing runlevels. Which is why I > think it may be a kernel-level problem. I have tried changing > the runlevel to [S]ingle level user, which is running pretty > much nothing save kernel processes and a simple shell. At this > level, a 'mount' command still shows the shares to be mounted, > and also at this level it is still impossible to umount them. > The only solution that I have found so far is rebooting, which I > think is an unacceptable way to handle such a problem. > > Now the interesting part. During the time that I could not > remove the unmountable mounted smb shares, the dhcpd daemon also > seemed to start malfunctioning. On the Mandrake box, everything > seemed fine (that is, I restarted the dhcpd daemon which had no > complaints during the restart). But none of the other machines > that get served on the network from it were getting addresses. > Unfortunately, I wasn't able to sniff packets, so I don't know > what kind of communication (or lack thereof) was occurring. It > was a frustrating exercise trying to figure out why my other > boxes were not getting addresses. Strangely enough, when I > rebooted the Mandrake box again, everything worked as normal -- > the other boxes got their IP addresses fine. > > I don't know for sure if the dhcpd thing was related to the smb > mount problem, but I'll try to repeat the problem and see if it > recurs. If anybody has seen the same problem or something > similar, I would appreciate it if you could share how you > resolved it. > > Thanks, > Rob > > > Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com