Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: ntblade on November 29, 2007, 03:21:25 PM

Title: Help with mounting samba share at boot from SME to SME please.
Post by: ntblade on November 29, 2007, 03:21:25 PM
Hi all,
I have this...
Code: [Select]
//pluto/nas  /mnt/tmp  smbfs  credentials=/root/.smbpasswd  0 0in my fstab but when the box boots the share isn't mounted but when I do...
Code: [Select]
mount -ait is.  Also, it takes ~30s to mount...
Code: [Select]
[root@sun /]# date
Thu Nov 29 14:18:15 GMT 2007
[root@sun /]# mount -a
[root@sun /]# date
Thu Nov 29 14:18:47 GMT 2007
Can anyone help please?

TIA
Noz
Title: Re: Help with mounting samba share at boot from SME to SME please.
Post by: mmccarn on November 29, 2007, 04:00:19 PM
Here's how to do it for a USB disk:  http://wiki.contribs.org/USBDisks#Mount_your_disk_automatically_at_boot-up

I assume you can do it for a samba share like this:
Code: [Select]
cat <<EOF > /etc/e-smith/events/local/S95mount_SMB
#! /bin/sh
mount //pluto/nas
EOF

chmod +x /etc/e-smith/events/local/S95mount_SMB

or in your case like this:
Code: [Select]
cat <<EOF > /etc/e-smith/events/local/S95mount_ALL
#! /bin/sh
mount -a
EOF

chmod +x /etc/e-smith/events/local/S95mount_ALL

Title: Re: Help with mounting samba share at boot from SME to SME please.
Post by: ntblade on November 30, 2007, 12:37:43 PM
Thanks for the reply,
I read the link but it looks to me that the info applies to local drives attached to the server which the server has already detected.

Could my entry in fstab not work because the samba isn't up when fstab is read?

N
Title: Re: Help with mounting samba share at boot from SME to SME please.
Post by: mmccarn on November 30, 2007, 03:07:13 PM
The links, and the instructions given, have to do with mounting partitions using a "local" event whenever your SME server reboots.

I learned how to do it when working on USB disks.

Did you try my suggestions and find they don't work?
Title: Re: Help with mounting samba share at boot from SME to SME please.
Post by: ntblade on November 30, 2007, 04:52:59 PM
To be honest, I read them and the link and didn't quite understand what I was doing.  :?
Title: Re: Help with mounting samba share at boot from SME to SME please.
Post by: mmccarn on November 30, 2007, 06:27:02 PM
1. Open an ssh connection to your SME server
2. Copy and paste the following code into your shell window:
Code: [Select]
cat <<EOF > /etc/e-smith/events/local/S95mount_ALL
#! /bin/sh
mount -a
EOF

chmod +x /etc/e-smith/events/local/S95mount_ALL
3. Reboot to test, or issue the command signal-event local
4. Let us know if it works for you.