Return to Level1Techs.com

Help me permanently mount my Samba share in Fedora 25

Hi guys. I have a NAS with samba share enabled. Now i want to use the NAS so that i don't have to mount it every time i boot. The NAS is running ZFS with 4 Datasets. Where in windows i have those datasets maped like i have 4 HUGE disks. Well now i want to replicate that in fedora.

Because all of the tutorials mentioned editing fstab and are for ubuntu i ask you guys to help me cuz i don't wanna mess up fedora now where i have it set up the way i like it.

The specs and how everything is set up:

NAS:
IP: 192.168.1.2
Name: zfsonlinux
user: alphazero1990
Data sets location: /Data/Movies, /Data/Music, /Data/Programs, /mnt/Games

My PC:
IP: 192.168.1.3
user: alphazero1990

Should be the same no matter what distro

1 Like

Am i missing something i get an Error

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount: mount point 0 does not exist

Can you paste in what you put in to /etc/fstab? But from the error it looks like you forgot to put the mount point.

//192.168.1.2 /home/alphazero1990/Data_share cifs
 defaults,credentials=/home/alphazero1990/.config/Data_share,users,auto,uid=1000,gid=1000 0 0

And when i enterd mount -a it asked me to enter the password for my nas

It's all one line right? And you made the directory for the mount point?

Try it without the defaults option

xD i broke it up into two lines.

this is the new one:

//192.168.1.2 /home/alphazero1990/Data_share cifs defaults,credentials=/home/alphazero1990/.config/share-conf,users,auto,uid=1000,gid=1000 0 0

But now i just get this:

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Oke now from the beginning:

Config file is in:
/home/alphazero1990/.config/share-conf
with share-conf being the txt file.

The mount directory is in:
/home/alphazero1990/Data_share
with Data_share being the directory

This is the fstab:

//192.168.1.2 /home/alphazero1990/Data_share cifs ,credentials=/home/alphazero1990/.config/share-conf,users,auto,uid=1000,gid=1000 0 0

I took out the defaults and no effect.
It's not working don't know whats going on. Still the same error 22

Okay, so your credentials file has username=username and password=password with each on their own line?

There's a comma before credentials that you should get rid of (from when you got rid of the defaults option).

Try it without the gid option, or try your username for uid and your user's group name for gid (this is your local user that will be accessing the shares) or you could try without those options but it may cause it to be mounted as root.

1 Like

Also, try using an actual share from your server, so instead of just //192.168.1.2 try //192.168.1.2/share (or whatever your share name is)

1 Like

Something is wrong i tride a normal mount and the same error occurs which is unlogical if my Windows, phone and nautilus fm can all access this NAS.
sudo mount -t cifs -o user=alphazero1990 //192.168.1.2 /home/alphazero1990/Data_share/

With just //192.168.1.2 i get the error 22. But when i try a Dataset like 192.168.1.2/Data/Music i get error 6 no such device.

And those are my ZFS shares.

Data/Games 1.50T 7.51T 1.50T /mnt/Games
Data/Movies 1.09T 7.51T 1.09T /Data/Movies
Data/Music 26.4G 7.51T 26.4G /Data/Music
Data/Programs 367G 7.51T 367G /Data/Programs

But are they the share names in samba? Can you do a network discovery in the file browser or something and see what the names are? I don't think it works with just the server i think it needs to be server/share. Try 192.168.1.2/data or 192.168.1.2/music, it won't be server/something/somethingelse

2 Likes

THANK you SO much. The actual name of the shares are Data_Music, Data_Games. I won't forget this lession :D. Now the perma mount should work 100%. Thx again for sticking around and helping a noob.

2 Likes