mount error: could not resolve address for Diskstation: Unknown error
Hi,
I try to mount my NAS onto Ubuntu 12.04. This is my situation:
Code:
$ smbtree
WORKGROUP
\\PX-EH PX-EH
\\PX-EH\lp
\\PX-EH\ADMIN$ IPC Service (PX-EH)
\\PX-EH\IPC$ IPC Service (PX-EH)
\\PX-EH\Guest
\\PX-EH\disk LAN disk
\\DISKSTATION
\\DISKSTATION\IPC$ IPC Service ()
\\DISKSTATION\home home
\\DISKSTATION\homes user home
\\DISKSTATION\NetBackup System default shared folder
\\DISKSTATION\Share DiskStation 212
Then I try this
Code:
$ sudo smbmount //Diskstation/home samba
mount error: could not resolve address for Diskstation: Unknown error
I even tried Diskstation with capitals and with non-capitals, but no success.
When I do
Code:
$ nmblookup -R -U <<IP-address>> diskstation
querying diskstation on <<IP-address>>
<<IP-address>> diskstation<00>
It seems there are some non-printable odd characters behind 'diskstation'.
With the PX-EH nas, I have the same problems, so it is not caused by the others side.
I don't want to type an IP-address. I want to use names, that's what they're for.
How can I mount my NAS with its name?
And if I need to add the name to some hosts file, why can I browse the samba drives with Nautilus without such a hosts file?
Re: mount error: could not resolve address for Diskstation: Unknown error
Quote:
Originally Posted by
ffonz
Hi,
I try to mount my NAS onto Ubuntu 12.04. ...I try this
Code:
$ sudo smbmount //Diskstation/home samba
mount error: could not resolve address for Diskstation: Unknown error
Where are you attempting to mount //Diskstation/home to? The location samba seems incorrect.
Quote:
Code:
$ nmblookup -R -U <<IP-address>> diskstation
querying diskstation on <<IP-address>>
<<IP-address>> diskstation<00>
It seems there are some non-printable odd characters behind 'diskstation'.
These are part of the NETBIOS protocol. They identify the type of node (i.e server or master browser or client).
Quote:
With the PX-EH nas, I have the same problems, so it is not caused by the others side.
How can I mount my NAS with its name?
And if I need to add the name to some hosts file, why can I browse the samba drives with Nautilus without such a hosts file?
I'll bet the mount command is incorrect. ;-) Where are you trying to mount //Diskstation/home to? What's the mount point?
Re: mount error: could not resolve address for Diskstation: Unknown error
Hi bab1,
'samba' is a directory in /mnt. So I try to be less ambiguous. Here is another attempt:
Code:
~$ sudo smbmount //Diskstation/home /mnt/samba
mount error: could not resolve address for Diskstation: Unknown error
~$ ls -l /mnt
total 4
drwxr-xr-x 2 root root 4096 Nov 12 2010 samba
Does the samba directory have the correct permissions?
Re: mount error: could not resolve address for Diskstation: Unknown error
Quote:
Originally Posted by
ffonz
Hi bab1,
'samba' is a directory in /mnt. So I try to be less ambiguous. Here is another attempt:
Code:
~$ sudo smbmount //Diskstation/home /mnt/samba
mount error: could not resolve address for Diskstation: Unknown error
~$ ls -l /mnt
total 4
drwxr-xr-x 2 root root 4096 Nov 12 2010 samba
Does the samba directory have the correct permissions?
The directory permissions are not a problem for mounting the share. You are having a problem resolving the name. What do you get with this command
Code:
smbclient -L diskstation
The COMPUTER name is case insensitive so caps are not needed at the CLI on Ubuntu.
Re: mount error: could not resolve address for Diskstation: Unknown error
Hi bab1,
This is the result:
Code:
~$ smbclient -L diskstation
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.2.8]
Sharename Type Comment
--------- ---- -------
Share Disk DiskStation 212
NetBackup Disk System default shared folder
homes Disk user home
home Disk home
IPC$ IPC IPC Service ()
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.2.8]
Server Comment
--------- -------
PX-EH PX-EH
DISKSTATION
Workgroup Master
--------- -------
WORKGROUP PX-EH
Re: mount error: could not resolve address for Diskstation: Unknown error
Quote:
Originally Posted by
ffonz
Hi bab1,
This is the result:
Code:
~$ smbclient -L diskstation
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.2.8]
Sharename Type Comment
--------- ---- -------
Share Disk DiskStation 212
NetBackup Disk System default shared folder
homes Disk user home
home Disk home
IPC$ IPC IPC Service ()
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.2.8]
Server Comment
--------- -------
PX-EH PX-EH
DISKSTATION
Workgroup Master
--------- -------
WORKGROUP PX-EH
This shows that the name is being resolved correctly. I'll bet you need to use a more current mount command. The command smbmount is part of the deprecated smbfs package. The newer package CIFS-UTIL will work better. The basic command is something like
Code:
mount -t cifs //SERVER/share /path/to/mountpoint -o options
or
mount.cifs //SERVER/share /path/to/mountpoint -o options
See here and .here for info.
Re: mount error: could not resolve address for Diskstation: Unknown error
Hi bab1,
I forgot to mention that I already tried mount -t cifs, with the same result:
Code:
~$ sudo mount -t cifs //diskstation/home /mnt/samba
mount error: could not resolve address for diskstation: Unknown error
If I do
Code:
sudo mount -t cifs //192.168.0.2/home /mnt/samba
I am being asked for a password, so I can contact my NAS.
I am getting a little frustrated. This isn't the first time Ubuntu lets me down :sad:
If nautilus can translate names to ip's (and mount them), why can't I do it on a CLI?! Which command should translate the names to the ip's?
Regards,
ffonz
Re: mount error: could not resolve address for Diskstation: Unknown error
Quote:
Originally Posted by
ffonz
Hi bab1,
I forgot to mention that I already tried mount -t cifs, with the same result:
Code:
~$ sudo mount -t cifs //diskstation/home /mnt/samba
mount error: could not resolve address for diskstation: Unknown error
If I do
Code:
sudo mount -t cifs //192.168.0.2/home /mnt/samba
I am being asked for a password, so I can contact my NAS.
I am getting a little frustrated. This isn't the first time Ubuntu lets me down :sad:
If nautilus can translate names to ip's (and mount them), why can't I do it on a CLI?! Which command should translate the names to the ip's?
Regards,
ffonz
The NETBIOS NAME DISKSTATION is being resolved by Samba. You can see that by the smbclient command. I'm sure that this will work too
Code:
nmblookup diskstation
The mount command does have problems. What is the output of
Re: mount error: could not resolve address for Diskstation: Unknown error
Hi bab1,
OK, thanks. The nmblookup command works. This is something I can start with.
The hosts file is
Code:
~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 alfons-laptop
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
I'm not so fond of adapting hosts files. As far as I know, then I have to manually adapt the hosts file on every machine in the network. Or are you thinking in a different direction?
Regards,
Alfons
Re: mount error: could not resolve address for Diskstation: Unknown error
Quote:
Originally Posted by
ffonz
Hi bab1,
OK, thanks. The nmblookup command works. This is something I can start with.
The hosts file is
Code:
~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 alfons-laptop
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
I'm not so fond of adapting hosts files. As far as I know, then I have to manually adapt the hosts file on every machine in the network. Or are you thinking in a different direction?
Regards,
Alfons
At this point it appears there is no DNS resolution. We do have NETBIOS resolution because nmblookup works. All Ubuntu hosts resolve hostnames by first looking in the hosts file. If therre is no mapping then DNS is tried. We can see if a hostname mapping in /etc/hosts works by mapping the host diskstation to the IP address in /etc/hosts like this
Code:
127.0.0.1 localhost
127.0.1.1 alfons-laptop
# Temp mapping of Diskstation to its IP address
192.168.0.2 diskstation
...If this works, it confirms that you do not have local DNS name services working.
Try to mount the share via //diskstation/share We shall see what happens with the temp config in your /etc/hosts file. This is only a test right now.