Hi,
I'm using ESX 3.0.1 32039 and I added the following command at startup (/etc/rc.d/rc.local):
mount -t smbfs -o username=myuser,password=mypwd //192.168.1.5/backup /mnt/backup[/b]
Of course i tested this command in the shell and it works fine but when i reboot my server the mount is not done ???
Anyone know why ?
Thx
Redirect the output of the command to a log file so you can check what's going on
mount -t smbfs -o username=myuser,password=mypwd //192.168.1.5/backup /mnt/backup > /tmp/log 2>&1
This makes sure that ALL messages (not only error messages) get logged. Maybe this helps you
Maybe networking isn't yet (completely) active when the rc.local scripts executes
Well you know the way to award the "useful tip" right ?
You can try and use the "sleep" command for it, but this only helps if it really is a timeout issue. If it's just the order of starting services this will not work...
But you can try it anyhow.
EDIT: BTW, to verify if it's a order of a timeout you can also add a ping command in the startup with the output to the log file.
Not a complete solution here, but wouldn't be setting this up in /etc/fstab be the correct way of doing this?
Issue command opening ESX firewall to be open for SMB client
esxcfg-firewall -e smbClient
Possibly change AD/Windows server settings to allow client connection from Linux (ESX) (depends on version of OS you are connecting to, see post in this link)
http://www.vmware.com/community/thread.jspa?messageID=563162ò;
modify /etc/fstab to mount SMB share - see this link for example
http://www.vmware.com/community/thread.jspa?messageID=573479ò§
No need to reboot to test, just issue command mount -a to remount, and this will list any errors.
Hiya,
I haven't tried it on ESX 3.01 yet - but I found a very similar issue on ESX 2.52 - which may well have a similar solution:
I could happily manually mount the SMB share - but adding a mount command in the /etc/fstab never worked at boot.
In the end I found the following needed doing:
By default nothing seems to try to mount smb shares in the boot process.
There is a K75netfs file (this is to bring down any mounted network file systems at shutdown)
This is a symbolic link to /etc/init.d/netfs
But there was no corresponding start command to mount them at boot - I needed to create a startup netfs script via:
cd to /etc/rc3.d (where we want script to be) - then run:
ln -s /etc/init.d/netfs S75netfs (L not I - for link)
Subsequent boots then mounted the file system OK[/i]
I suspect the same issue may well apply to ESX 3.01?
Let me know?
Dinny
I had the same issue, my solution is:
1. put an entry in /etc/fstab:
//192.168.1.5/backup //mnt/backup smbfs username=myuser,password=mypwd 0 0
2. add an entry in /etc/rc.local:
mount -a
That does the trick at my ESX 2.5 and 3.01 environment.
See if that helps,
bk
/etc/fstab
//server/share /mnt/mountpoint smbfs noauto,username=username,password=passwoooorrdd 0 0
just the last step
type chkconfig netfs on and enter, this was
after the reboot your mount will be done !
Hi Nautilus,
I come from a mainly Windows background - but I'm
guessing:
me too
is a far easier/better way of acheiving what I did
manually via :
why you are making a link ?? set the netfs on for your runlevel
you can query this chkconfig --list, when you do not set this ON, you will see OFF as setting for netfs, and when you type
chkconfig netfs on , this will be enabled, you dont need a symbolink link.
Is that correct?
Dinny
look this thread
http://www.vmware.com/community/message.jspa?messageID=505989
biekee
This did the trick for me; thx for the info.