# Migrating from smbfs to cifs... Any pointers?

## cgmd

Hi, all...

I'm looking at the need to migrate from smbfs to cifs, because of the impending depreciation of smbfs support. I hope this can be painlessly accomplished, but I have my doubts...

My LAN consists of a gentoo "data server" (running net-fs/samba-3.0.3 2), which is accessed by 2 networked gentoo boxes and 2 windows machines. 

Could someone please give me some pointers as to all the changes likely to be required as I migrate from smbfs to cifs? Or, if there's a "howto" concerning this, please direct me to it?

Thanks, for any help!  :Smile: 

----------

## Hu

Impending?  SMBFS has been marked as deprecated for a while now.  :Smile:   Andrew Morton added a prominent obsolete marker in February 2008.

I am not aware of a specific how-to, but I can say that I have been using the kernel CIFS support for several releases with both Samba and native Windows servers.  I have not seen any issues with shares from either server type, and it was pretty easy to set up based on the documentation.  Be sure to emerge net-fs/mount-cifs on all client machines.

----------

## cgmd

Yes, I've been delinquent in this regard...  :Embarassed: 

Nevertheless, my kernel is enabled for cifs, but when I change my fstab to designate cifs, I get the following error when I attempt to mount the samba share

```

mount error: could not find target server. TCP name dataserver/data not found

No ip address specified and hostname not found
```

Is there more necessary than just editing /etc/fstab to make this conversion?

Thanks!

----------

## drescherjm

Looks like a hostname / dns problem. Does a ping work?

```
ping dataserver
```

----------

## cgmd

 *drescherjm wrote:*   

> Looks like a hostname / dns problem. Does a ping work?
> 
> ```
> ping dataserver
> ```
> ...

 

No, ping dataserver doesn't work:

```

cgmd  ~ $ ping dataserver

ping: unknown host dataserver

cgmd  ~ $ ping -c3 192.168.1.104

PING 192.168.1.104 (192.168.1.104) 56(84) bytes of data.

64 bytes from 192.168.1.104: icmp_seq=1 ttl=64 time=2.42 ms

64 bytes from 192.168.1.104: icmp_seq=2 ttl=64 time=0.898 ms

64 bytes from 192.168.1.104: icmp_seq=3 ttl=64 time=0.922 ms

--- 192.168.1.104 ping statistics ---

3 packets transmitted, 3 received, 0% packet loss, time 2002ms

rtt min/avg/max/mdev = 0.898/1.414/2.423/0.713 ms
```

Where should this lead me?

Thanks!

----------

## drescherjm

That means you do not have your host file configured or you did not add datastore to your dns server or the dns server is not properly configured. Or you have not setup or enabled some other hostname to ipaddress mechanism.

----------

## cgmd

 *drescherjm wrote:*   

> That means you do not have your host file configured or you did not add datastore to your dns server or the dns server is not properly configured. Or you have not setup or enabled some other hostname to ipaddress mechanism.

 

What host file are you referring to? /etc/hosts on my client machine or /etc/hosts on dataserver?

Thanks!

----------

## Hu

/etc/hosts on the client machine, since it is the one which is failing to resolve dataserver.

----------

## cgmd

 *Hu wrote:*   

> /etc/hosts on the client machine, since it is the one which is failing to resolve dataserver.

 

My /etc/hosts file contains:

```

127.0.0.1 chuxtux.chuckandstacy.com chuxtux localhost

192.168.1.104   //dataserver/data

//dataserver/data

```

Is there an obvious error or omission in it?

Thanks!

----------

## drescherjm

```
192.168.1.104   //dataserver/data 
```

That will not work.

How about just:

```
192.168.1.104   dataserver 
```

----------

## cgmd

 *drescherjm wrote:*   

> 
> 
> ```
> 192.168.1.104   //dataserver/data 
> ```
> ...

 

Voila!!  That's it!

Thanks, drescherjm & Hu, for sorting this out for me!!    :Very Happy: 

----------

## cwr

The thing that bit me in the transfer was the use of the "guest" option for

mounting; in smbfs it just works, but in cifs you have to add an explicit

sec=none option.  Took me quite a while to find that.

Will

----------

