klgrieve
Posts: 2
Joined: Mon Jul 29, 2019 7:15 pm

fstab cifs and pi4

Tue Aug 13, 2019 5:07 pm

OK Guys

I've had a pi3 for a little while and finally got it to mount my NAS music folder (more luck than judgement) BUT now I've upgraded to the pi4 and what worked before doesn't work now.... here's my current issue:

If I type in a terminal:
sudo mount -t cifs -o username=admin,password=XXXXX,vers=1.0 //192.168.1.50/Volume1/music /home/pi/NAS325/music
and
sudo mount -a
OK! No problems, files there, playable by VLC - great!

But if instead I add the following to /etc/fstab:
//192.168.1.50/Volume1/music /home/pi/NAS325/music -t cifs -o username=admin,password=XXXXX,vers=1.0,x-systemd=automount default 0 0
and
sudo mount -a
I get:
mount: /etc/fstab: parse error at line 7 -- ignored

I've tried cat to look for wrong characters, spelling, even copy/paste through libreoffice - for the life of me (and what remains of my hair) I can't see the problem - how stupid am i being? (It's a Zyxel NSA325 box - needs cifs ver 1?)

Help and thanks

Ken

Ernst
Posts: 1246
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: fstab cifs and pi4

Tue Aug 13, 2019 7:07 pm

proper use of code tags is missing in your post.
klgrieve wrote:
Tue Aug 13, 2019 5:07 pm

Code: Select all

//192.168.1.50/Volume1/music /home/pi/NAS325/music -t cifs -o username=admin,password=XXXXX,vers=1.0,x-systemd=automount default 0 0 
maybe you should consider to use "x-systemd.automount"
The road to insanity is paved with static ip addresses

User avatar
thagrol
Posts: 1891
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: fstab cifs and pi4

Wed Aug 14, 2019 12:07 pm

klgrieve wrote:
Tue Aug 13, 2019 5:07 pm
But if instead I add the following to /etc/fstab:
//192.168.1.50/Volume1/music /home/pi/NAS325/music -t cifs -o username=admin,password=XXXXX,vers=1.0,x-systemd=automount default 0 0
That doesn't look like a valid fstab entry. "-t" and "-o" should not be present, "default" is not a valid mount option (it's "defaults"), there should be a "," between "automount" and "default", and having defaults at the end of your mount options may reset some options previously specifed (mount takes the last occurance of an option as the one to use).

Try this:

Code: Select all

//192.168.1.50/Volume1/music /home/pi/NAS325/music cifs  defaults,_netdev,username=admin,password=XXXXX,vers=1.0 0 0
Attempts to contact me outside of thes forums will be ignored unless signed in triplicate, sent in, sent back, queried, lost, found, subjected to public enquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters

klgrieve
Posts: 2
Joined: Mon Jul 29, 2019 7:15 pm

Re: fstab cifs and pi4

Wed Aug 14, 2019 1:33 pm

Ernst and Thagrol

You are Gentlemen and Scholars! I corrected the = to . and rewrote the line as as suggested - Bingo! Loads on restart and am happily back in the land of 70's rock.....

Many thanks for swift, polite and helpful replies,

Ken

Return to “Beginners”