Mounting a Samab share at boot time

2003-07-10 Thread stan
I've got a boot up timing race issue.

Here is what I'm trying to do. I want to mount a Samba share from a remote
machine on boot up. Presently I have the appropriate entry in /etc/fsatb,
such that I can mount the share _once I am in multiuser_. I have figured
out how to get the smbfs kernel module loaded at boot time, using
/boot/loader.conf.

However, it appears that the remaining problem is that the NIC is not yet
configured when the startup scripts try to mount the file systems. Therefore
the system drops to a shell prompt since it can't mount _all_ the
file systems.

Seems like this issue would exist for NFS file systems that were staticly
mount (as opposed to automonted).

How can I get around this?

-- 
They that would give up essential liberty for temporary safety deserve
neither liberty nor safety.
-- Benjamin Franklin
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mounting a Samab share at boot time

2003-07-10 Thread Rus Foster
Hi,
 Here is what I'm trying to do. I want to mount a Samba share from a remote
 machine on boot up. Presently I have the appropriate entry in /etc/fsatb,
 such that I can mount the share _once I am in multiuser_. I have figured
 out how to get the smbfs kernel module loaded at boot time, using
 /boot/loader.conf.


A workaround I can think of is set the noauto option in /etc/fstab then in
/etc/rc.local put mount /samba/shre

HTH

RGds

Rus Foster
-- 
www: http://www.65535.net   | Hosting - Shell Accounts
MSNM: [EMAIL PROTECTED] | Virtual Servers from just $15/mo
e: [EMAIL PROTECTED]   | Community: http://www.65535.org
t: +44 (0) 7092016595   | 10% Donation on every FreeBSD product
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mounting a Samab share at boot time

2003-07-10 Thread Murray Taylor
I believe that the method mentioned here is the appropriate way.

#!/bin/sh
#
# $Id: smbfs.sh.sample,v 1.3 2001/01/13 04:50:36 bp Exp $
#
# Location: /usr/local/etc/rc.d/smbfs.sh
#
# Simple script to mount smbfs file systems at startup.
# It assumes that all mount points described in fstab file and password
# entries listed in /root/.nsmbrc file. See mount_smbfs(8) for details.
#
 
mount=/sbin/mount -o -N
umount=/sbin/umount
HOME=/root; export HOME
vols=`awk -- '/^\/.*[[:space:]]+smbfs[[:space:]]+/ { print $2 }'
/etc/fstab`
 
case $1 in
start)
echo -n smbfs: 
for vol in ${vols}; do
$mount $vol
echo -n $vol 
done
;;
stop)
echo -n unmounting smbfs mount points: 
for vol in ${vols}; do
$umount $vol
echo -n $vol 
done
;;
*)
echo Usage: `basename $0` {start|stop} 2
exit 64
esac
 
echo Done



It seems to me that the reason for this is that the ufs kernel
'knowledge' allows the fstab mounts for the ufs slices to progress but
perhaps the smbfs module is not yet loaded, so the smb mounts go
pearshaped in auto mode.


On Thu, 2003-07-10 at 20:44, Rus Foster wrote:
 Hi,
  Here is what I'm trying to do. I want to mount a Samba share from a remote
  machine on boot up. Presently I have the appropriate entry in /etc/fsatb,
  such that I can mount the share _once I am in multiuser_. I have figured
  out how to get the smbfs kernel module loaded at boot time, using
  /boot/loader.conf.
 
 
 A workaround I can think of is set the noauto option in /etc/fstab then in
 /etc/rc.local put mount /samba/shre
 
 HTH
 
 RGds
 
 Rus Foster
-- 
Murray Taylor
Special Projects Engineer
-
Bytecraft Systems  Entertainment
P: +61 3 8710 2555
F: +61 3 8710 2599
D: +61 3 9238 4275
M: +61 417 319 256
E: [EMAIL PROTECTED]
or visit us on the web
http://www.bytecraftsystems.com
http://www.bytecraftentertainment.com




This Email has been scanned for Viruses by MailMarshal.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mounting a Samab share at boot time

2003-07-10 Thread stan
On Fri, Jul 11, 2003 at 12:11:03AM +, Murray Taylor wrote:
 I believe that the method mentioned here is the appropriate way.
 
 #!/bin/sh
 #
 # $Id: smbfs.sh.sample,v 1.3 2001/01/13 04:50:36 bp Exp $
 #
 # Location: /usr/local/etc/rc.d/smbfs.sh
 #
 # Simple script to mount smbfs file systems at startup.
 # It assumes that all mount points described in fstab file and password
 # entries listed in /root/.nsmbrc file. See mount_smbfs(8) for details.
 #
  
 mount=/sbin/mount -o -N
 umount=/sbin/umount
 HOME=/root; export HOME
 vols=`awk -- '/^\/.*[[:space:]]+smbfs[[:space:]]+/ { print $2 }'
 /etc/fstab`
  
 case $1 in
 start)
 echo -n smbfs: 
 for vol in ${vols}; do
 $mount $vol
 echo -n $vol 
 done
 ;;
 stop)
 echo -n unmounting smbfs mount points: 
 for vol in ${vols}; do
 $umount $vol
 echo -n $vol 
 done
 ;;
 *)
 echo Usage: `basename $0` {start|stop} 2
 exit 64
 esac
  
 echo Done
 

Would this assume that you had the noauto paramter for the smbfs
partitions in /etc/fstab? Else earlier scripts would try to mount them, I
beleive, and fail.

 
 
 It seems to me that the reason for this is that the ufs kernel
 'knowledge' allows the fstab mounts for the ufs slices to progress but
 perhaps the smbfs module is not yet loaded, so the smb mounts go
 pearshaped in auto mode.

I've solved that part of the problem, by hvaing the smbfs module loaded by
using /boot/loader.conf. Howeverm that just gets me to the next problem.
An attempt is made to mount all filesystems not marked as noauto _before_
networking is brought up, Thus my problem

 
 
 On Thu, 2003-07-10 at 20:44, Rus Foster wrote:
  Hi,
   Here is what I'm trying to do. I want to mount a Samba share from a remote
   machine on boot up. Presently I have the appropriate entry in /etc/fsatb,
   such that I can mount the share _once I am in multiuser_. I have figured
   out how to get the smbfs kernel module loaded at boot time, using
   /boot/loader.conf.
  
  
  A workaround I can think of is set the noauto option in /etc/fstab then in
  /etc/rc.local put mount /samba/shre
  
  HTH
  
  RGds
  
  Rus Foster
 -- 
 Murray Taylor
 Special Projects Engineer
 -
 Bytecraft Systems  Entertainment
 P: +61 3 8710 2555
 F: +61 3 8710 2599
 D: +61 3 9238 4275
 M: +61 417 319 256
 E: [EMAIL PROTECTED]
 or visit us on the web
 http://www.bytecraftsystems.com
 http://www.bytecraftentertainment.com
 
 
 
 
 This Email has been scanned for Viruses by MailMarshal.
 
 

-- 
They that would give up essential liberty for temporary safety deserve
neither liberty nor safety.
-- Benjamin Franklin
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]