0

Trying to auto mount two shares from my QNAP NAS onto my raspberry pi. QNAP NAS Shares:

\\192.168.1.7\Disk3
\\192.168.1.7\Disk8

At the Raspberry Pi, created two folders:

/mnt/shares/NASDisk3
/mnt/shares/NASDisk8

fstab:

//192.168.1.7/Disk3 /mnt/shares/NASDisk3 cifs \
uid=1000,credentials=/etc/smbpass.txt,user,noauto,rw 0    0

//192.168.1.7/Disk8 /mnt/shares/NASDisk8 cifs \
uid=1000,credentials=/etc/smbpass.txt,user,noauto,rw 0    0

After boot of the Raspberry Pi only Disk3 is mounted. Following tried without success:

  • change of sequence in fstab
  • adding _netdev
  • checked the credentials at the NAS

Can mount Disk8 using:

mount //192.168.1.8/Disk8

However mount -a doesn't mount Disk8, and umount cifs result in "no cifs mounted" (according to mtab).

This is how mtab looks like after boot:

//192.168.1.7/Disk3 /mnt/shares/NASDisk3 cifs rw,nosuid,nodev,noexec,relatime,\
vers=1.0,cache=strict,username=pi,domain=NASC7B132,uid=1000,forceuid,gid=0,\
noforcegid,addr=192.168.1.7,fi$

and after doing sudo mount //192.168.1.7/Disk8, mtab contains:

//192.168.1.7/Disk8 /mnt/shares/NASDisk8 cifs rw,nosuid,nodev,noexec,relatime,\
vers=1.0,cache=strict,username=pi,domain=NASC7B132,uid=1000,forceuid,gid=0,\
noforcegid,addr=192.168.1.7,fi$

Still, umount cifs result in no cifs found.

  • Exchange noauto by _netdev in fstab – Costas Jul 9 '16 at 11:34
  • umount -t cifs may be? – Costas Jul 9 '16 at 11:35
  • Script /etc/network/if-up.d/mountnfs usually do the mounting of all net-disks after networks is up – Costas Jul 9 '16 at 11:43
  • adding _netdev doesn't change anything. Only Disk3 is mounted during boot. Disk3 is the second of three 'identical' lines in fstab, so I assume that a network issue should result in the second AND the third line being executed ...but only the second line is, for some reason – Woody Jul 10 '16 at 12:23
0

You have a number of problems:

  1. The noauto flag is telling mount to ignore this line for -a mounts. You would be able to manually attempt the mount with mount /mnt/shares/NASDisk3. If you want to have this mounted at boot time then remove the noauto flag.

  2. Your umount syntax is wrong; it should be umount -t cifs. Otherwise you are trying to tell the system to unmount something mounted at $PWD/cifs which isn't what you meant :-)

  • removing the noauto flag works for "mount -a" and "umount -a -t cifs" but still only Disk3 is mounted during boot ... – Woody Jul 10 '16 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.