Please help mounting a cifs filesystem

This forum is for discussion about general software issues.

Please help mounting a cifs filesystem

Postby rjalex » Tue Oct 14, 2014 6:26 pm

Dear friends,
after a lot of reading and experimenting I succeeded into mounting a CIFS share from a Mavericks MAC OS to a Raspberry running an Archlinux version (Archphile).

Here is the relevant /etc/fstab line I have identified by trial and error (it's a single line):
$this->bbcode_second_pass_code('', '//192.168.174.3/rja /mnt/nas-samba cifs credentials=/etc/.smbcredentials,ro,sec=ntlmssp,nounix,nofail 0 2')

What I need help with is how to automate the mounting of this share at boot and how to handle the unavailability of such as share graciously.

Thanks for any help for this poor newcomer :-)
rjalex
 
Posts: 21
Joined: Thu Oct 02, 2014 5:45 am

Re: Please help mounting a cifs filesystem

Postby Socaltom » Tue Oct 14, 2014 7:08 pm

used to be owned by me
Pink Pogo V2, Black Pogo V3, Zyxel NAS 325 v1,
used to be Adminstrator for
Goflex net, Black V3, Black V2
Now I have a couple of raspberry pi ( 3+ and 4)
Socaltom
 
Posts: 571
Joined: Thu Apr 07, 2011 2:21 pm
Location: The left side

Re: Please help mounting a cifs filesystem

Postby rjalex » Tue Oct 14, 2014 7:30 pm

Tom thanks a lot. nobootwait is just what I hoped to find (and additionally in the process I learned about the existance of mountall which now explains some apparently odd behaviour of the mount command :-)) but UNLUCKILY it does not seem to exist for CIFS:
$this->bbcode_second_pass_code('', 'dmesg | grep boot
[ 216.756778] CIFS: Unknown mount option "nobootwait')
I am ALMOST there with this new /etc/fstab line:
$this->bbcode_second_pass_code('', '//192.168.174.3/rja /mnt/nas-samba cifs credentials=/etc/.smbcredentials,ro,sec=ntlmssp,nounix,nofail,noauto,x-systemd.automount 0 0')

The only BIG problem I keep on getting is that when I do the first
$this->bbcode_second_pass_code('', 'ls -l /mnt/nas-samba')
the directory listing is REALLY messed up and only shows lines like:
$this->bbcode_second_pass_code('', 'drwxr-xr-x 2 root root 0 Oct 14 19:28
drwxr-xr-x 2 root root 0 Oct 14 19:28
drwxr-xr-x 2 root root 0 Oct 14 19:28
drwxr-xr-x 2 root root 0 Oct 14 19:28
drwxr-xr-x 2 root root 0 Oct 14 19:28')
(without the filenames showing and all timestamps are of the UTC moment I issued the ls command)
while is I issue the same command again the directory shows ALMOST perfectly as it should (there's still some confusion over the files timestamps which seem to shift misteriously) such as:
$this->bbcode_second_pass_code('', 'drwxr-xr-x 2 root root 0 Oct 14 17:49 Wolfgang Amadeus Mozart
drwxr-xr-x 2 root root 0 Oct 14 17:49 Wolfgang Amadeus Mozart; Alfred Brendel, Academy of St Martin in the Fields, Sir Neville Marriner
drwxr-xr-x 2 root root 0 Oct 14 17:49 Wolfgang Amadeus Mozart; Bryn Terfel, Rod Gilfry, Cyndia Sieden, Sir John Eliot Gardiner')
Ideas ???
rjalex
 
Posts: 21
Joined: Thu Oct 02, 2014 5:45 am

Re: Please help mounting a cifs filesystem

Postby Socaltom » Tue Oct 14, 2014 7:50 pm

You are using a lot of options on that line, are you sure you need them all?
another option you could consider is instead of including the mount in fstab, add a command to your rc.local file. I believe systemd still runs any commands in that file during bootup.
Tom
used to be owned by me
Pink Pogo V2, Black Pogo V3, Zyxel NAS 325 v1,
used to be Adminstrator for
Goflex net, Black V3, Black V2
Now I have a couple of raspberry pi ( 3+ and 4)
Socaltom
 
Posts: 571
Joined: Thu Apr 07, 2011 2:21 pm
Location: The left side

Re: Please help mounting a cifs filesystem

Postby rjalex » Wed Oct 15, 2014 5:21 am

Well,
I arrived there via trial and error but I believe I need all of them to mount a MacOS (Mavericks) share-

credentials is a no brainer
ro is what I want
sec without this the Mavericks share will not mount
nounix tried wihtout and it's a no go
nofail <- this one is debatable
noauto and automount both needed to mount on-demand

See anything strange ?

Thanks
rjalex
 
Posts: 21
Joined: Thu Oct 02, 2014 5:45 am

Re: Please help mounting a cifs filesystem

Postby Socaltom » Wed Oct 15, 2014 7:07 pm

I'm grasping at straws, but it seems like the directory information is taking too long to load, and that's why you get the weird ls info. I'm guesssing that either the options your using create that situation? Are the any options on the host side you should look at?
Tom
used to be owned by me
Pink Pogo V2, Black Pogo V3, Zyxel NAS 325 v1,
used to be Adminstrator for
Goflex net, Black V3, Black V2
Now I have a couple of raspberry pi ( 3+ and 4)
Socaltom
 
Posts: 571
Joined: Thu Apr 07, 2011 2:21 pm
Location: The left side

Re: Please help mounting a cifs filesystem

Postby rjalex » Wed Oct 15, 2014 8:15 pm

Thanks Socaltom,
I think you're fully right !

The directory I am sharing is quite large with approx 600 first level directories and probably some 10K files in them. The share on the Mac's side is done via the GUI and so I have very little control but I think your diagnosis is correct, plus this share is done over a slowish wifi link !!!!!
rjalex
 
Posts: 21
Joined: Thu Oct 02, 2014 5:45 am


Return to General

Who is online

Users browsing this forum: No registered users and 32 guests