Hello, I have a RedHat 7.3 workstation and have created a samba mount to my samba server. Everything seems to be working ok, but when I reboot my RH workstation the mount is not reestablished. I believe the problem is that when I reboot the machine the samba share is not unmounted. After rebooting the machine when I run smbstatus on the samba server it indicates the mount is still active. Samba version 2.2.5 Service uid gid pid machine ---------------------------------------------- tmp nobody nobody 11311 gimli (192.168.1.12) Tue Aug 6 23:30: 59 2002 I when I run smbumount before I reboot I don't run into the problem. Is there any way to fix this problem without having to manually unmout the shares every time i reboot or power down my Linux box? Here is my /etc/fstab on my Linux box: ... //pcs2/homes /mnt/pcs2/home/jhines smbfs credentials=/var/tmp/pass,uid=jhines,gid=jhines 0 0 //pcs2/tmp /mnt/pcs2/tmp smbfs scope=guest 0 0 Thank You, John Hines -------------- next part -------------- HTML attachment scrubbed and removed
I am a bit surprised there isn't a provision in the network script to unmount all your smbmounted shares when the network is taken down. I would poke around in it (likely /etc/rc.d/init.d/network or something similar) to see if there is some provision for it, and try to see why it isn't working. You can post it if you can't understand bash or just need help trying to figure it out. These simple scripts can get very complicated. When Redhat goes down (or up) I believe it prints to the screen what it is doing, and there should be an entry about SMB mounts, I think. Here is what I have written for my caldera 2.4 box to umount these shares when I reboot or the network goes down: mount | grep " type smbfs " | sed 's/^.*on *//' | sed 's/ *type.*//' \ | sed 's/ /\\\ /g' | xargs -n1 -i{} umount {} This is simply a way to create an umount command from the output of mount. I put this into my network script in the shutdown section. It works. Joel On Tue, Aug 06, 2002 at 07:52:27PM -0400, John Hines wrote:> Hello, > > I have a RedHat 7.3 workstation and have created a samba mount to my samba server. Everything seems to be working ok, > but when I reboot my RH workstation the mount is not reestablished. I believe the problem is that when I reboot the machine > the samba share is not unmounted. After rebooting the machine when I run smbstatus on the samba server it indicates the mount > is still active. > > Samba version 2.2.5 > Service uid gid pid machine > ---------------------------------------------- > tmp nobody nobody 11311 gimli (192.168.1.12) Tue Aug 6 23:30: > 59 2002 > > I when I run smbumount before I reboot I don't run into the problem. Is there any way to fix this problem without having to manually > unmout the shares every time i reboot or power down my Linux box? > > Here is my /etc/fstab on my Linux box: > > ... > //pcs2/homes /mnt/pcs2/home/jhines smbfs credentials=/var/tmp/pass,uid=jhines,gid=jhines 0 0 > //pcs2/tmp /mnt/pcs2/tmp smbfs scope=guest 0 0 > > > > Thank You, > > John Hines > > > >
On Tue, 6 Aug 2002, John Hines wrote:> Hello, > > I have a RedHat 7.3 workstation and have created a samba mount to my > samba server. Everything seems to be working ok, but when I reboot my > RH workstation the mount is not reestablished. I believe the problem is > that when I reboot the machine the samba share is not unmounted. After > rebooting the machine when I run smbstatus on the samba server it > indicates the mount is still active.When you reboot the connection is dropped and the server should see that as an umount. At least after a while ...> I when I run smbumount before I reboot I don't run into the problem. > Is there any way to fix this problem without having to manually unmout > the shares every time i reboot or power down my Linux box?umount -a -t smbfs /etc/init.d/netfs should be run on shutdown and should unmount for you. It includes this line, and if you had any smbfs mounts it should find them. [ -n "$SMBMTAB" ] && action $"Unmounting SMB filesystems: " umount -a -t smbfs If you don't get that printout on shutdown, try adding the umount command on a line of it's own. /Urban