Koozali.org formerly Contribs.org

smbmnt in fstab

Zig

smbmnt in fstab
« on: November 27, 2002, 10:46:23 AM »
Hello!

I've searched this forum up and down, but I haven't found any topic that covers my problem. I have an entry in my /etc/fstab that looks like this:

//win2kserver/users /home/e-smith/files/users smbfs username=netmap,password=xXxXxXx 0 0

When I boot my SMEserver it looks like it tries to mount the drive before it starts the network. I've also tried with '0 3' at the end. No matter what I try, the drive is not mounted after reboot. If I try

mount /home/e-smith/files/users

after reboot, it mounts right, but I want it to mount automatic. Any suggestions??

Best regards,
Zig

Nathan Fowler

Re: smbmnt in fstab
« Reply #1 on: November 27, 2002, 06:15:36 PM »
Add the below line to /etc/rc.d/rc.local

/bin/mount -t smbfs -o username=netmap,password=xXxXxXx "//win2kserver/users" /home/e-smith/files/users

Dean Mumby

Re: smbmnt in fstab
« Reply #2 on: November 27, 2002, 08:44:20 PM »
Using rc.local you could even issue the /bin/mount home/e-smith/files/users, with
the relevant entry in /etc/fstab

I was wondering if there was some way to check if the mount was still acessable and if not re-issue the mount command (eg if the w2k server reboots)

Nathan Fowler

Re: smbmnt in fstab
« Reply #3 on: November 27, 2002, 09:50:29 PM »
You could create a Perl script that would check for the existance of a file on the 2K box, if the file is inaccessible you could umount/mount the UNC path again.

You could also use a bash script and schedule it to run in CROND every 1 minute.

Just a thought,
Nathan