Choose style:

Author Topic: Re: SMB Share is not mounting automatically through fstab PM8 - Solved  (Read 1697 times)

0 Members and 1 Guest are viewing this topic.

Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Hi,
 
I was accessing  SMB share on windows server 2012 using fstab in PM6 and PM7 and it was working fine on these but it is not mounting automatically on PM8. If we are run
Code: [Select]
sudo mount -a 
then it mount SMB share and after restart it stop mounting automatically.

System Detail

Code: [Select]
administrator@Lap023 ~ $ sudo inxi -Fzx
[sudo] password for administrator:
System:    Host: Lap023 Kernel: 4.8.0-53-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: N/A Distro: Peppermint Eight
Machine:   System: Acer (portable) product: Gateway series
           Mobo: Acer model: Gateway series
           Bios: American Megatrends v: 1.00 date: 08/29/2014
CPU:       Dual core Intel Pentium A1018 (-MCP-) cache: 1024 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3) bmips: 8381
           clock speeds: max: 2100 MHz 1: 1199 MHz 2: 1199 MHz
Graphics:  Card: Intel 3rd Gen Core processor Graphics Controller
           bus-ID: 00:02.0
           Display Server: X.org 1.18.4 drivers: (unloaded: fbdev,vesa)
           tty size: 82x24 Advanced Data: N/A for root
Audio:     Card Intel 7 Series/C210 Series Family High Definition Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture v: k4.8.0-53-generic
Network:   Card-1: Realtek RTL8188EE Wireless Network Adapter
           driver: rtl8188ee port: e000 bus-ID: 01:00.0
           IF: wlp1s0 state: up mac: <filter>
           Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: d000 bus-ID: 02:00.1
           IF: enp2s0f1 state: down mac: <filter>
Drives:    HDD Total Size: 500.1GB (3.0% used)
           ID-1: /dev/sda model: ST500LT012 size: 500.1GB temp: 39C
Partition: ID-1: / size: 14G used: 5.9G (45%) fs: ext4 dev: /dev/sda1
           ID-2: /home size: 438G used: 953M (1%) fs: ext4 dev: /dev/sda6
           ID-3: swap-1 size: 8.00GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 54.0C mobo: 27.8C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 178 Uptime: 2 min Memory: 416.2/3845.1MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (sudo) inxi: 2.2.35

fstab detail

Quote
//172.168.1.3/user /mnt/windowsshare1 cifs credentials=/home/administrator/fstab/smbcredentials,iocharset=utf8,_netdev,auto,dir_mode=0777,file_mode=0777 0 0

I request you please advice in the matter.

Regards,

Rajeev Gautam
« Last Edit: September 19, 2017, 06:12:46 am by rajeev2631007 »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25082
  • Karma: 2774
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: SMB Share is not mounting automatically through fstab PM8
« Reply #1 on: June 22, 2017, 08:09:54 am »
do you get any output from:
Code: [Select]
sudo mount -a
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Re: SMB Share is not mounting automatically through fstab PM8
« Reply #2 on: June 30, 2017, 12:21:18 pm »
Sorry for late reply.

Code: [Select]
sudo mount -a

If I run this command in terminal it mount my share without issue. But it is not mount through fstab.

Regards,

Rajeev Gautam

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25082
  • Karma: 2774
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: SMB Share is not mounting automatically through fstab PM8
« Reply #3 on: July 01, 2017, 10:02:21 am »
Is this PC connected wirelessly ? .. and if so, when you manually mount it does it create any shutdown issues (like the PC taking 2 minutes to shut down) ?

Does the share automount at boot if connected via ethernet cable ?
« Last Edit: July 01, 2017, 10:04:05 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Re: SMB Share is not mounting automatically through fstab PM8
« Reply #4 on: July 03, 2017, 03:22:38 am »
Hi,

It is not mounting through FSTAB using wireless and Ethernet both. It is not giving any shutdown issue or any other issue when I mount through terminal using mount command manually.

I had also tried to made mount command bash script with different sleep timing and map to run during startup but it was not worked for me.

At last moved back to PM6 which the version it was running earlier and it is working fine.

In my network PM6 is working excellently well, I can't upgrade to PM8 until it will start mounting automatically using FSTAB OR other ways if any?

Thanks for your help.

Regards,

Rajeev Gautam



Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Re: SMB Share is not mounting automatically through fstab PM8 - Solved
« Reply #5 on: September 19, 2017, 06:12:01 am »
Hi,

Given below syntax able to mount automatically share using FSTAB in PM8 .


Code: [Select]
//IPAddress/ShareFolder/  /media/ZDrive  cifs  username=user,password=passwd,_netdev,iocharset=utf8  0 0



Earlier in PM6 and PM7 it is working fine with below syntax. But In PM8 it is stop mounting automatically using FSTAB.

Code: [Select]
//IPAddress/Sharefolder /mnt/windowsshare1 cifs credentials=/home/administrator/fstab/smbcredentials,iocharset=utf8,_netdev,auto,dir_mode=0777,file_mode=0777 0 0

I'm not able to find out actual reason. May be auto/dir _mode/file _mode are not compatible with PM8 ( 17.04). I'm not sure about it.

Regards,

Rajeev Gautam

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25082
  • Karma: 2774
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: SMB Share is not mounting automatically through fstab PM8 - Solved
« Reply #6 on: September 19, 2017, 07:36:46 am »
You're lucky, I can't get my NAS shares to automount at all using CIFS, I had to switch to NFS and mess with systemd service files.
(luckily my new NAS supports NFS .. I'd have been stuck with my old one)

For me I think it was a timing issue with my new laptop booting ridiculously quickly .. _netdev is supposed to make it wait for the network device, but didn't seem to make any difference.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Re: SMB Share is not mounting automatically through fstab PM8 - Solved
« Reply #7 on: September 20, 2017, 03:28:35 am »
Hi,

After googled I found about _netdev which is as below:-

Quote
The _netdev option is also used for systems that only have networking started at user login (as when using the  Network Manager package). For having network connections enabled at boot up (without requiring a user login) then tools that write to the /etc/network/interfaces file may have to be used. It is probably good policy to always use _netdev for all automatic network mounts.

I also found given below link which may be useful for other users who want to use CIFS.

MountWindowsSharesPermanently

https://help.ubuntu.com/community/MountWindowsSharesPermanently

MountSAMBAshareFSTAB

https://help.ubuntu.com/community/MountSAMBAshareFSTAB

Linux mount CIFS Windows Share
https://www.cyberciti.biz/faq/linux-mount-cifs-windows-share/


Gigolo – Easily Manage Local And Remote Filesystem Connections
https://linuxaria.com/recensioni/gigolo-easily-manage-local-and-remote-filesystem-connections/


Regards,
Rajeev Gautam
« Last Edit: September 20, 2017, 03:51:36 am by rajeev2631007 »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25082
  • Karma: 2774
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: SMB Share is not mounting automatically through fstab PM8 - Solved
« Reply #8 on: September 20, 2017, 09:16:10 am »
I understand all the mount options, it wasn't so much that cifs mounts wouldn't mount via fstab, it's that:-

a) _netdev seriously slows boot
and
b) cifs mounts over a wireless connection stopped the PC shutting down properly

NFS gives me the option to mount on first access (speeding up boot times considerably over cifs mounts), and (after a little tweaking) allowed the PC to shut down properly.
« Last Edit: September 20, 2017, 09:22:01 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec