Ask Your Question
0

samba mount error(6)

asked 2016-12-30 03:52:30 -0500

Hi, this is my first post here. I'm trying to set up a home file server on Fedora 25 (upgraded from 23 to 24, then to 25).

First I successfully followed step by step the tutorial here and I have /myshare mounted to /test for user: adam.

Now I'm trying the same for another directory created on a software raid1 volume mounted as /mnt/raid1. I followed once again the same tutorial replacing "/myshare" with "/mnt/raid1/raid1share" and "/test" with "/test2" and it goes well all the way until that step:

~]# mount //localhost/raid1share /test2/ -o user=adam

...where after entering the password I get the following error:

Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I remember a bit unix and linux from my university days in the early '1990s (Including first linux version ever, booted from a single 3.5" floppy disk :-) ) but then my entire professional career involved MS Windows Server systems mostly.

I'm trying to brush up my linux skills after many years, so please be patient with me. Thanks!

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2016-12-30 14:26:15 -0500

Hi, thanks for you reply. Yes, I changed also the name in the brackets.

[myshare]
comment = myshare
path = /myshare
public = yes
writable = no

[raid1share]
comment = raid1share
path = /mnt/raid1/raid1share
public = yes
writable = no

and the folder raid1share exists.

[root@amofdr01 adam]# namei -l /myshare
f: /myshare
dr-xr-xr-x root root /
drwxr-xr-x root root myshare

[root@amofdr01 adam]# namei -l /mnt/raid1/raid1share
f: /mnt/raid1/raid1share
dr-xr-xr-x root root /
drwxr-xr-x root root mnt
drwxrwxr-x adam adam raid1
drwxrwxr-x adam adam raid1share

I figured out that temporary disabling selinux:

setenforce 0

helps:

[root@amofdr01 adam]# setenforce 0
[root@amofdr01 adam]# mount //localhost/raid1share /test2 -o username=adam
Password for adam@//localhost/raid1share:  *****
[root@amofdr01 adam]#
[root@amofdr01 adam]#
[root@amofdr01 adam]# ls /test2
raid1file1
[root@amofdr01 adam]# setenforce 1
[root@amofdr01 adam]#
[root@amofdr01 adam]#
[root@amofdr01 adam]# ls /test2
ls: reading directory '/test2': Permission denied

not sure what's wrong with the permissions.

edit flag offensive delete link more
0

answered 2016-12-30 05:15:06 -0500

You did not mention if you also renamed the sharename which is between the brackets []. That sharename must be used when mounting it. So I assume that your config looks as follows.

[myshare] 
   comment = My share 
   path = /mnt/raid1/raid1share 
   public = yes
   writeable = no

If that is the case you could mount that share, provided that the folder /mnt/raid1/raid1share exists, as follows.

mount //localhost/myshare /test2/ -o user=adam

Or, if you want to rename the share to something else, edit the samba configuration as follows and restart the samba service.

 [raid1share] 
    comment = My share 
    path = /mnt/raid1/raid1share 
    public = yes
    writeable = no

And mount it with the sharename.

mount //localhost/raid1share /test2/ -o user=adam
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-12-30 03:52:30 -0500

Seen: 403 times

Last updated: Dec 30 '16