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:

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

My PC:
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.

// /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:

// /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:
with share-conf being the txt file.

The mount directory is in:
with Data_share being the directory

This is the fstab:

// /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 // try // (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 // /home/alphazero1990/Data_share/

With just // i get the error 22. But when i try a Dataset like 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 or, it won't be server/something/somethingelse


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.