Koozali.org: home of the SME Server

Mount Network Drive

scotta

Mount Network Drive
« on: September 10, 2004, 02:03:43 PM »
I have a network drive:
\\192.168.1.25\D

I want to mount this on my sme server 6.0.1 as /mnt/winD

I am wanting to have crontab schedule a script to run daily, 1am, that will copy some files off the sme server to that drive.

Thanks
Scott

Offline byte

  • *
  • 2,183
  • +2/-0
Mount Network Drive
« Reply #1 on: September 10, 2004, 03:21:32 PM »
What windows you want to mount? try reading up on "smbfs" that will help you do what you require
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Michiel

Re: Mount Network Drive
« Reply #2 on: September 10, 2004, 03:24:49 PM »
Quote from: "scotta"
I have a network drive:
\\192.168.1.25\D

I want to mount this on my sme server 6.0.1 as /mnt/winD


See man smbmount

Quote from: "scotta"
I am wanting to have crontab schedule a script to run daily, 1am, that will copy some files off the sme server to that drive.


See man rsync

regards,
Michiel

scotta

Mount Network Drive
« Reply #3 on: September 10, 2004, 04:55:23 PM »
Mount Network Drive:
I have created the directory /mnt/winBackup
When I run:
mount -t smbfs -o username=xyz,password=secret //192.168.196.99/d /mnt/winBackup

I get the following error:
SMBSERVER failed (Called name not present)

???

Once I get the mount correct I am going to rin the following:
rsync -auv /home/e-smith/files/ibays/server2d/files/ /mnt/winBackup/
Where server2d is the iBay I want to backup to the remote windows share.

Does this look ok?

Thanks
Scott

Michiel

Mount Network Drive
« Reply #4 on: September 10, 2004, 10:12:05 PM »
Quote from: "scotta"
mount -t smbfs -o username=xyz,password=secret //192.168.196.99/d /mnt/winBackup


AFAIK you need to use a netbios name, not an IP. Try smbclient -L //<SMEBOX> When it asks for a password just press enter.  You should be seeing all SMB boxes on your network. If you don't there is probably a problem with your samba setup.

Quote from: "scotta"
rsync -auv /home/e-smith/files/ibays/server2d/files/ /mnt/winBackup/


You might also want to use the --delete switch to remove files on /mnt/winBackup that no longer exist on the server

duncan

Mount Network Drive
« Reply #5 on: September 11, 2004, 04:49:47 AM »
This is a part of a script that I use to back up our accounting database.

#!/bin/bash
mount -t smbfs -o username=username,password=password //10.0.0.21/myob /mnt/share
if test -f /mnt/share/Ver7.5/Lock0001.flk

It results in this

[root@server myob]# ./myobbackup
31673: session request to 10.0.0.21 failed (Called name not present)
31673: session request to 10 failed (Called name not present)

However it works fine.

scotta

Mount Network Drive
« Reply #6 on: September 11, 2004, 03:44:44 PM »
I still cannot seem to mount the drive. It is on a win9x machine shared with full control with no password.

I have the following in my fstab:
//TARRYN/d   /mnt/winBackup/   smbfs   workgroup=HHGROUP,gid=users 0 0

When I try to:
mount /mnt/winBackup/

I get the error:
2040: Connection to TARRYN failed
SMB connection failed

I have done a:
smbclient -L //Fileserver
and the machine tarryn is in the list.

Please help!

Thanks
Scott