You are not logged in.
Hi there
I'd like to ask if Anyone knows what is going on with my Arch Current system.
On my workstation I'm mounting Samba shares from my Samba server (using smbclient...)
And everything is fine but when I'm trying to shutdown or reboot computer, during shutdown sequence I have to wait very long when system is "Unmounting filesystems"... it's BUSY all the time...
After several minutes I'm getting something like that more or less "Cannot connect to directory: input/output error".
I'm sure that system cannot properly unmount my samba shares during that operation. Network conenctions are down because it stops network earlier even before SIGTERMS...
I've noticed that earlier, maybe 2-3 weeks ago everything was fine. But I cannot tell exactly when.
Do You experience such thing? Maybe someone could help me in this problem?
Thanks
Best regards!
Offline
I'm not going to guess why it's broken now, when it was working a while ago, but I'd recommend that you use the netfs daemon to handle your smb shares, and make sure it's listed after the network daemon in the rc.conf DAEMONS array. This way, you're network will be brought up before mounting, and down after unmounting.
<edit>
Just checked, and it's already there in rc.conf by default.
Offline
since you don't say a thing about mounting your smb shares in fstab my guess is that the network is brought down before the remaining filesystems are getting unmounted. of course you will run into problems then. ;p
I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell
Offline
I'm not going to guess why it's broken now, when it was working a while ago, but I'd recommend that you use the netfs daemon to handle your smb shares, and make sure it's listed after the network daemon in the rc.conf DAEMONS array. This way, you're network will be brought up before mounting, and down after unmounting.
<edit>
Just checked, and it's already there in rc.conf by default.
Thanks for the advice but so far I've used only samba (after network in rc.conf's deamons section) and everything was fine. I'll check that netfs...
Offline
since you don't say a thing about mounting your smb shares in fstab my guess is that the network is brought down before the remaining filesystems are getting unmounted. of course you will run into problems then. ;p
Well, 10 minutes ago i tried using FSTAB
//server/share /mount/point smbfs username=user,password=pasword,dmask=777,fmask=755 0 0
but it didn't mount samba share on startup. I had to manually do
mount //server/share
to get access to shares.
And again, during shutdown "Unmounting filesystems..." took a long time...
Strange.
here's my /etc/rc.conf deamons ection
DAEMONS=(@syslog-ng !hotplug !pcmcia network !netfs !hal !dbus @cups @samba @crond @autofs @alsamixer)
and /etc/fstab
none /dev/pts devpts defaults 0 0
#none /dev/shm tmpfs defaults 0 0
#tmpfs /tmp tmpfs defaults 0 0
usbfs /proc/bus/usb usbfs defaults 0 0
//server/share /mnt/samba smbfs username=(...),password=(...),dmask=777,fmask=755 0 0
/dev/hdd /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0
/dev/hda5 / reiserfs defaults 0 0
/dev/hda1 /mnt/fat_c vfat rw,umask=0,codepage=852,iocharset=iso8859-2 1 0
/dev/hda6 /mnt/fat_g vfat rw,umask=0,codepage=852,iocharset=iso8859-2 1 0
/dev/hda7 /mnt/fat_h vfat rw,umask=0,codepage=852,iocharset=iso8859-2 1 0
/dev/scsi/host0/bus0/target0/lun0/part1 /mnt/fat_usb vfat rw,umask=0,user,noauto,codepage=852,iocharset=iso8859-2 1 0
/dev/fd0 /mnt/fl auto user,exec,noauto,comment=managed 0 0
Maybe i should add umounting script to the end of the deamons list so it could unmount all samba shares during shutdown/reboot?
Thanks
Offline
Well, I've written script and added it to the end of the deamons section in rc.conf.
It's working quite well... but it's mounted as root so I had to set permissions (dmask,fmask) for user
Here it is:
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
case "$1" in
start)
stat_busy "Mounting Samba shares"
smbmount //server/share /home/user/mountpoint -o username=(...),password=(...),dmask=777,fmask=777
if [ $? -gt 0 ]; then
stat_fail
else
stat_done
fi
;;
stop)
stat_busy "Unmounting Samba shares"
smbumount /home/user/mountpoint
if [ $? -gt 0 ]; then
stat_fail
else
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
Offline