# Unable to mount NFS share



## balanga (Mar 23, 2020)

I have create a local FreeBSD repository using a similar directory structure to that used by FreeBSD and have created an NFS share, but am unable to mount it. I guess the problem is due to the ':' character in the path...

This is what happens:

```
showmount -e 192.168.1.3
Exports list on 192.168.1.3:
/mnt/nas/backup                    Everyone
/mnt/nas/iocage/jails/test/root/usr/local/www/apache24/data/FreeBSD:12:amd64 Everyone

mount 192.168.1.3:/mnt/nas/iocage/jails/test/root/usr/local/www/apache24/data/FreeBSD:12:amd64/ /mnt/tmp
mount_nfs: 192.168.1.3:/mnt/nas/iocage/jails/test/root/usr/local/www/apache24/data/FreeBSD:12: Name does not resolve
```

Is there any way to get around this?


----------



## Zvoni (Mar 23, 2020)

balanga said:


> I have create a local FreeBSD repository using a similar directory structure to that used by FreeBSD and have created an NFS share, but am unable to mount it. I guess the problem is due to the ':' character in the path...
> 
> This is what happens:
> 
> ...


Put the offending path in quotes?


----------



## balanga (Mar 23, 2020)

Thanks for the suggestion but whatever I try I get 
`mount_nfs: 192.168.1.3:/mnt/nas/iocage/jails/test/root/usr/local/www/apache24/data/FreeBSD:12: Name does not resolve`

I notice it does not display the last part of the path in the error msg - it should be */FreeBSD:12:amd64 *


----------



## SirDice (Mar 23, 2020)

balanga said:


> mount 192.168.1.3:/mnt/nas/iocage/jails/test/root/usr/local/www/apache24/data/FreeBSD:12:amd64/ /mnt/tmp


If you look closely at the mount path you'll notice that the semicolon is used to separate the host from the path. The semicolons in the path cause confusion.

Try this: `mount 192.168.1.3:"/mnt/nas/iocage/jails/test/root/usr/local/www/apache24/data/FreeBSD:12:amd64/" /mnt/tmp`


----------



## balanga (Mar 23, 2020)

Thanks for the suggestion. I copied and pasted the above into a command line:-


```
root@Vbox:/mnt# mount 192.168.1.3:"/mnt/nas/iocage/jails/test/root/usr/local/www/apache24/data/FreeBSD:12:amd64/" /mnt/tmp
mount_nfs: 192.168.1.3:/mnt/nas/iocage/jails/test/root/usr/local/www/apache24/data/FreeBSD:12: Name does not resolve
```


----------



## SirDice (Mar 23, 2020)

I suggest you use a path that doesn't include colons.


----------



## Zvoni (Mar 23, 2020)

SirDice said:


> I suggest you use a path that doesn't include semicolons.


I think you mean "colons" = ":" not semicolons = ";"

I'm more surprised, that he could create those folders (on his NAS?) with colons in the name in the first place.


----------



## balanga (Mar 23, 2020)

Zvoni said:


> I'm more surprised, that he could create those folders (on his NAS?) with colons in the name in the first place.



To be quite honest, I was too!


```
root@NAS[...test/root/usr/local/www/apache24/data]# pwd 
/mnt/nas/iocage/jails/test/root/usr/local/www/apache24/data
root@NAS[...test/root/usr/local/www/apache24/data]# ls -al
total 20
drwxr-xr-x  5 root  wheel   7 Mar 23 10:47 .
drwxr-xr-x  6 root  wheel   6 Feb 20 00:12 ..
drwxr-xr-x  2 root  wheel   3 Feb 20 00:12 adminer
drwxr-xr-x  3 root  wheel   3 Mar 21 20:32 FreeBSD:12:amd64
-rw-r--r--  1 www   www    45 Feb 20 00:12 index.html
-rw-r--r--  1 www   www    20 Feb 20 00:12 info.php
```


----------



## SirDice (Mar 23, 2020)

Zvoni said:


> I think you mean "colons" = ":" not semicolons = ";"


Oh, oops. You're absolutely correct.

Both UFS and ZFS don't have problems with the _colons_ in the name but NFS might.


----------



## Zvoni (Mar 23, 2020)

Hmmm, after reading a bit, and looking again at his error-message:
is it possible that the problem is the second (!) colon?


----------

