Choose style:

Author Topic: Cifs mount using fstab is not working in PM7-(SOLVED)  (Read 1043 times)

0 Members and 1 Guest are viewing this topic.

Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Cifs mount using fstab is not working in PM7-(SOLVED)
« on: September 14, 2016, 06:03:10 am »
Hi,

I'm able to mount windows share using Fstab in PM6. It is working fine. But same thing is not working in PM7.

FSTAB
Code: [Select]
//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 try to googled and found there are lot people facing same kind to issues with 16.04 and looking for solution.

Regards,

Rajeev Gautam


« Last Edit: September 17, 2016, 01:10:14 am by rajeev2631007 »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 24444
  • Karma: 2698
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Cifs mount using fstab is not working in PM7
« Reply #1 on: September 14, 2016, 06:03:10 am »
[THIS IS AN AUTOMATED RESPONSE]

If this is a new request for support and you haven't already done so, can you please be sure to include information about your system that will help us to help you.

Please open a terminal (Ctrl+Alt+T) and run the following command:
Code: [Select]
inxi -Fz
then copy what was returned in the terminal and post it back here.

Thanks in advance :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 24444
  • Karma: 2698
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Cifs mount using fstab is not working in PM7
« Reply #2 on: September 14, 2016, 08:06:21 am »
Please see the auto response above.
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: Cifs mount using fstab is not working in PM7
« Reply #3 on: September 15, 2016, 01:50:12 am »
Hi,

Inxi -Fz Result

Code: [Select]
System:    Host: Lap020 Kernel: 4.4.0-24-generic i686 (32 bit) Desktop: N/A Distro: Peppermint Seven
Machine:   System: Dell (portable) product: Inspiron 6000
           Mobo: Dell model: 0W9260 Bios: Dell v: A09 date: 09/28/2005
CPU:       Single core Intel Pentium M (-UP-) cache: 2048 KB speed: 1600 MHz (max)
Graphics:  Card: Intel Mobile 915GM/GMS/910GML Express Graphics Controller
           Display Server: X.org 1.18.3 drivers: intel (unloaded: fbdev,vesa)
           tty size: 142x43 Advanced Data: N/A for root
Audio:     Card Intel 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller driver: snd_intel8x0
           Sound: Advanced Linux Sound Architecture v: k4.4.0-24-generic
Network:   Card-1: Broadcom BCM4401-B0 100Base-TX driver: b44
           IF: eth0 state: down mac: <filter>
           Card-2: Intel PRO/Wireless 2200BG [Calexico2] Network Connection driver: ipw2200
           IF: wlp3s3 state: up mac: <filter>
Drives:    HDD Total Size: 71.5GB (47.0% used) ID-1: /dev/sda model: HTS548040M9AT00 size: 40.0GB
           ID-2: USB /dev/sdb model: DataTraveler_2.0 size: 31.5GB
Partition: ID-1: / size: 9.1G used: 3.1G (36%) fs: ext4 dev: /dev/sda1
           ID-2: swap-1 size: 1.02GB used: 0.09GB (9%) fs: swap dev: /dev/sda5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 54.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 171 Uptime: 12 min Memory: 423.5/736.0MB Client: Shell (sudo) inxi: 2.2.35

If I try given below command in terminal manually it mount windows share and it is not mounting automatically using fstab.

Code: [Select]
administrator@Lap020 ~ $ sudo mount -a
[sudo] password for administrator:
administrator@Lap020 ~ $


Boot Log

Code: [Select]
administrator@Lap020 ~ $ cat /var/log/boot.log 
[     *] A start job is running for LSB: AppArmor initialization (10s / no limit[    **] A start job is running for LSB: AppArmor initialization (10s / no limit[   ***] A start job is running for LSB: AppArmor initialization (10s / no limit[  OK  ] Started LSB: AppArmor initialization.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on CUPS Scheduler.
[  OK  ] Started Trigger resolvconf update for networkd DNS.
[  OK  ] Started ACPI Events Check.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
         Starting Console System Startup Logging...
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Started CUPS Scheduler.
[  OK  ] Reached target Paths.
[  OK  ] Listening on ACPID Listen Socket.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Listening on UUID daemon activation socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting System Logging Service...
[  OK  ] Started ACPI event daemon.
[  OK  ] Started D-Bus System Message Bus.
         Starting Avahi mDNS/DNS-SD Stack...
         Starting Login Service...
[  OK  ] Started Run anacron jobs.
[  OK  ] Started CUPS Scheduler.
         Starting LSB: Record successful boot for GRUB...
[  OK  ] Started Regular background program processing daemon.
         Starting Bluetooth service...
         Starting Restore /etc/resolv.conf if the system crashed before the ppp link was shut down...
         Starting Save/Restore Sound Card State...
         Starting Network Manager...
         Starting Initialize hardware monitoring sensors...
         Starting Accounts Service...
[  OK  ] Started Daily apt activities.
[  OK  ] Reached target Timers.
         Starting Detect the available GPUs and deal with any system changes...
         Starting Modem Manager...
         Starting Raise network interfaces...
[  OK  ] Started System Logging Service.
[  OK  ] Started Console System Startup Logging.
[  OK  ] Started Restore /etc/resolv.conf if the system crashed before the ppp link was shut down.
[  OK  ] Started Save/Restore Sound Card State.
[  OK  ] Started Initialize hardware monitoring sensors.
[  OK  ] Started Bluetooth service.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started Login Service.
[  OK  ] Started Make remote CUPS printers available locally.
[  OK  ] Reached target Bluetooth.
         Starting Hostname Service...
[  OK  ] Started Detect the available GPUs and deal with any system changes.
[  OK  ] Started Hostname Service.
         Starting Authenticate and Authorize Users to Run Privileged Tasks...
[  OK  ] Started Authenticate and Authorize Users to Run Privileged Tasks.
[  OK  ] Started Accounts Service.
[  OK  ] Started Modem Manager.
[  OK  ] Started Network Manager.
         Starting Network Manager Wait Online...
         Starting Network Manager Script Dispatcher Service...
[  OK  ] Started Network Manager Script Dispatcher Service.
[  OK  ] Started LSB: Record successful boot for GRUB.
         Starting WPA supplicant...
[  OK  ] Stopped LSB: Start NTP daemon.
[  OK  ] Started WPA supplicant.
[  OK  ] Started Raise network interfaces.
[  OK  ] Reached target Network.
         Starting LSB: Start NTP daemon...
[  OK  ] Started LSB: Start NTP daemon.
[  OK  ] Started Network Manager Wait Online.
[  OK  ] Reached target Network is Online.
         Starting /etc/rc.local Compatibility...
         Mounting /mnt/windowsshare1...
[  OK  ] Started /etc/rc.local Compatibility.
[FAILED] Failed to mount /mnt/windowsshare1.
See 'systemctl status mnt-windowsshare1.mount' for details.
[DEPEND] Dependency failed for Remote File Systems.
         Starting LSB: disk temperature monitoring daemon...
         Starting LSB: start Samba NetBIOS nameserver (nmbd)...
         Starting LSB: daemon to balance interrupts for SMP systems...
         Starting Permit User Sessions...
         Starting LSB: start Samba daemons for the AD DC...
         Starting mintsystem.service...
         Starting LSB: Set the CPU Frequency Scaling governor to "ondemand"...
[  OK  ] Started Permit User Sessions.
         Starting Light Display Manager...
         Starting Hold until boot process finishes up...
[  OK  ] Started LSB: disk temperature monitoring daemon.
[  OK  ] Started LSB: daemon to balance interrupts for SMP systems.
[  OK  ] Started LSB: Set the CPU Frequency Scaling governor to "ondemand".
administrator@Lap020 ~ $

Dmesg Log


Code: [Select]
administrator@Lap020 /var/log $ sudo dmesg |grep 'CIFS VFS'
[   37.339167] CIFS VFS: Error connecting to socket. Aborting operation.
[   37.339248] CIFS VFS: cifs_mount failed w/return code = -101
administrator@Lap020 /var/log $

Regards,

Rajeev Gautam
« Last Edit: September 15, 2016, 05:18:36 am by rajeev2631007 »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 24444
  • Karma: 2698
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Cifs mount using fstab is not working in PM7
« Reply #4 on: September 15, 2016, 06:36:52 am »
I had exactly the same problem with wireless connections and it was a pain to solve without causing shutdown to hang .. here's how I did it...

Create a script that basically waits 20 seconds before running "mount -a", then run it as a systemd service.

Open a terminal and run
Code: [Select]
sudo pluma /usr/bin/cifs-mounter-script.sh
and make it read
Code: [Select]
#!/bin/bash
## This script is used by the systemd cifs-mounter-script.service
sleep 20
mount -a

exit 0
Save the file and exit pluma

make it executable with:
Code: [Select]
sudo chmod +x /usr/bin/cifs-mounter-script.sh
Now create a systemd service file
Code: [Select]
sudo pluma /etc/systemd/system/cifs-mounter-script.service
and make it read
Code: [Select]
[Unit]
Description=Cifs Mounter Script Service
After=multi-user.target

[Service]
Type=idle
ExecStart=/usr/bin/cifs-mounter-script.sh

[Install]
WantedBy=multi-user.target
SAVE the file and exit pluma

Give the service file 644 permissions
Code: [Select]
sudo chmod 644 /etc/systemd/system/cifs-mounter-script.service
Now enable the service with:
Code: [Select]
sudo systemctl enable cifs-mounter-script.service
and reload the unit files:
Code: [Select]
systemctl daemon-reload
Now you can reboot to test.

If it still doesn't automount, try adjusting the
sleep 20
line in
sudo pluma /usr/bin/cifs-mounter-script.sh
to increase the delay

Or if you have an SSD so the system boots pretty quickly, you could try decreasing the delay to say "sleep 10" .. you'll have to find a sleep delay value that works best for you.
« Last Edit: September 15, 2016, 06:43:46 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: Cifs mount using fstab is not working in PM7
« Reply #5 on: September 16, 2016, 12:29:13 am »
Hi PCNetSpec Thanks your information and sharing.

I'll try what you suggest and let you know the feedback.

If I'm not wrong _netdev was working fine in PM6 and it is not working in PM7. In PM7 it is trying to mount remorte filesystem before local Network is up and connected. And putting delay using above script allow network connection to up and running and than mount network share. Please correct me if my understanding is wrong.

I had tryed to put sleep and mount command in /etc/rc.local and it's work for me.

Code: [Select]
administrator@Lap020 ~ $ sudo pluma /etc/rc.local
[sudo] password for administrator:

rc.local

Code: [Select]
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
sleep 20
sudo mount -a

exit 0

There is any differance in way you suggested and the above way.

Regards,

Rajeev Gautam

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 24444
  • Karma: 2698
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Cifs mount using fstab is not working in PM7
« Reply #6 on: September 16, 2016, 02:16:46 pm »
No they effectively do the same thing .. but when I used rc.local with a wireless connection I couldn't shut the system down without a 2 minute pause where it was trying to unmount the remote system AFTER wireless had already been taken down.

If you're not having that shutdown issue, your rc.local solution is fine.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec