title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Raspberry fstab setting for mounting drive

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RaspberryAsset

    • Feb 2018
    • 41

    Raspberry fstab setting for mounting drive

    I upgraded to 6.1 and had trouble mounting my network drives. I can manually mount the drive with -

    sudo mount -t cifs -o guest //192.168.2.210/n4f-01/Media/MEDIA /home/pi/DLNA

    I tired this in the fstab but it did not work and automount.

    //192.168.2.210/n4f-01/Media/MEDIA /home/pi/DLNA cifs guest, 0 0

    can someone help with this please.

    Thanks
  • simes_pep
    dBpoweramp Enthusiast

    • Dec 2013
    • 297

    #2
    Re: Raspberry fstab setting for mounting drive

    I though I remembered this issue - see https://forum.dbpoweramp.com/showthr...l=1*post140799 from Christmas '13

    It is not an Asset 6.1 issue, but something coming from a more recent Kernel

    The fix is to add sec=ntlm in the fstab entry, so would be now:

    //192.168.2.210/n4f-01/Media/MEDIA /home/pi/DLNA cifs guest,sec=ntlm 0 0
    or even, with the _netdev, wait for network
    //192.168.2.210/n4f-01/Media/MEDIA /home/pi/DLNA cifs guest,_netdev,sec=ntlm 0 0

    The problem (feature?) is introduced in recent kernels, which you get after running the apt-get update/upgrade. It is a security provision on the mounting of an external filestore.

    I have moved away from CIFS mounts to NFS mounts, as they are reported to offer higher performance and better suited to Linux environments - however, streaming audio only needs a few MB/s transfer rate.
    Do you transcode on your RPi.

    I still have a Configure Guide, as well as some custom browser trees and folder icons at https://www.dropbox.com/sh/bu8etep76nu4v5z/aMw624ZA5U

    Thanks,
    Simon.

    Comment

    • RaspberryAsset

      • Feb 2018
      • 41

      #3
      Re: Raspberry fstab setting for mounting drive

      Thanks for the reply.

      I am not sure what is going on. I tried it and it did not work.

      pi@raspberrypi:~ $ df
      Filesystem 1K-blocks Used Available Use% Mounted on
      /dev/root 30353980 4440412 24615824 16% /
      devtmpfs 470116 0 470116 0% /dev
      tmpfs 474724 0 474724 0% /dev/shm
      tmpfs 474724 12288 462436 3% /run
      tmpfs 5120 4 5116 1% /run/lock
      tmpfs 474724 0 474724 0% /sys/fs/cgroup
      /dev/mmcblk0p1 43436 22137 21299 51% /boot
      tmpfs 94944 0 94944 0% /run/user/1000

      pi@raspberrypi:~ $ sudo mount -t cifs -o guest //192.168.2.210/n4f-01/Media/MEDIA /home/pi/DLNA
      pi@raspberrypi:~ $ df
      Filesystem 1K-blocks Used Available Use% Mounted on
      /dev/root 30353980 4370768 24685468 16% /
      devtmpfs 470116 0 470116 0% /dev
      tmpfs 474724 0 474724 0% /dev/shm
      tmpfs 474724 12288 462436 3% /run
      tmpfs 5120 4 5116 1% /run/loc k
      tmpfs 474724 0 474724 0% /sys/fs/ cgroup
      /dev/mmcblk0p1 43436 22137 21299 51% /boot
      tmpfs 94944 0 94944 0% /run/user/1000
      //192.168.2.210/n4f-01/Media/MEDIA 3784338188 3313424756 470913432 88% /home/pi/DLNA

      Any other ideas? The install is good, as it works great, and autostarts but not mounting properly.
      Asset is doing no transcoding. All the transcoding is being done at the player

      Thanks

      Comment

      • simes_pep
        dBpoweramp Enthusiast

        • Dec 2013
        • 297

        #4
        Re: Raspberry fstab setting for mounting drive

        But it looks like /home/pi/DLNA is mounted, can you navigate to it?

        Also try sudo mount -a
        This should mount all entries in your fstab file

        So then is your setting in Asset&*8217;s config for Watched folders correct against the directory you have mounted.

        Comment

        • RaspberryAsset

          • Feb 2018
          • 41

          #5
          Re: Raspberry fstab setting for mounting drive

          I can mount it and use it fully works. when I manually put in this command in terminal.

          sudo mount -t cifs -o guest //192.168.2.210/n4f-01/Media/MEDIA /home/pi/DLNA

          But if I reboot the server it does not auto mount. I have to log and put the above command in again and then do a rescan.

          Thanks

          Comment

          • simes_pep
            dBpoweramp Enthusiast

            • Dec 2013
            • 297

            #6
            Re: Raspberry fstab setting for mounting drive

            Yes, I have this too with my NFS mounts, with the very latest kernel releases the auto-mount following reboot, doesn&*8217;t work. I have to log in and run a &*8216;sudo mount -a&*8217; to re-establish the network drives. I have tried including the _netdev option which should instruct the mount comand to wait for the network, but something is broken.
            Hopefully there are some Linux experts on this forum who could help, if not we have to wait for a kernel release with a fix.

            Thanks,
            Simon

            Comment

            • RaspberryAsset

              • Feb 2018
              • 41

              #7
              Re: Raspberry fstab setting for mounting drive

              Simon- thanks.. I have spent hours trying to figure this out. I will just wait until a release is made available. It is a bit of a hassle but at least it works once it is mounted.

              Comment

              • RaspberryAsset

                • Feb 2018
                • 41

                #8
                Re: Raspberry fstab setting for mounting drive

                I figured out a solution for my situation. The detail of the root cause are here in this thread.



                I have found a fix for my issue because I am running nas4free I can choose the SMB protocol levels. I switched to minimum of SMB 2 and voila. I am back in business after a reboot.

                It looks like it can also be done in the smb.conf in the raspberry

                Comment

                • simes_pep
                  dBpoweramp Enthusiast

                  • Dec 2013
                  • 297

                  #9
                  Re: Raspberry fstab setting for mounting drive

                  We are not alone:





                  I deleted my EFI partition mistakenly while trying to uninstall windows from a dual boot. Now, the only partitions on my drive are a unformatted section and the partition for my filesystem (50GB). Is there anyway of getting the EFI partition back because when I use manjaro-chroot, as mhwd cannot be downloaded, it says that /boot doesn’t look like an EFI partition. Thank you. I would embed a photo, but I am not allowed to. The drive is nvme0n1 and the partition with the filesystem is nvme0n1p5


                  So hopefully this will work its way through to a new RPI update soon.

                  Simon.

                  Comment

                  • psweetie
                    dBpoweramp Enthusiast

                    • Feb 2016
                    • 72

                    #10
                    Re: Raspberry fstab setting for mounting drive

                    I have tried both NFS and SMB on my RPi with a Synology NAS and ended up sticking with SMB as the morereliable.Performance seemed to be on a par so no reason to choose one over the other with a windows based network. I did find the RPi connections suddenly stopped working after a Debian update and ended up changing the fstab entry to the following which works fine . . .

                    //192.168.1.245/media /home/pi/nas cifs username=user,password=password,vers=3.0

                    Comment

                    • ASF
                      dBpoweramp Enthusiast

                      • Jun 2012
                      • 123

                      #11
                      Re: Raspberry fstab setting for mounting drive

                      I have had the same problem after upgrading the firmware on my WD NAS (PR 4100). I checked all of my settings on the server which Simon helped me set to NFS. Here is the server share setting:



                      This is exactly what is was before the firmware upgrade.

                      I have checked my Raspberry Pi and found the following:

                      Here is what's in the "/etc/fstab" file:

                      proc /proc proc defaults 0 0
                      /dev/mmcblk0p6 /boot vfat defaults 0 2
                      /dev/mmcblk0p7 / ext4 defaults,noatime 0 1
                      * a swapfile is not a swap partition, no line here
                      * use dphys-swapfile swap[on|off] for that
                      nfs://192.168.1.152/nfs/Music /home/pi/nas nfs ro 0 0

                      which seems like it should work.

                      When I then type "crontab -e", I see the following:

                      File: /tmp/crontab.tg44r6/crontab (note the file name)

                      * For more information see the manual pages of crontab(5) and cron(8)
                      *
                      * m h dom mon dow command
                      @reboot /etc/init.d/rpcbind start
                      @reboot sudo mount -t nfs 192.168.1.152:/nfs/Music /home/pi/nas
                      @reboot /usr/bin/asset/bin/AssetUPnP

                      Yet when I use the VNC directory view and open the crontab file within /etc/ folder, I see the following:

                      * /etc/crontab: system-wide crontab
                      * Unlike any other crontab you don't have to run the `crontab'
                      * command to install the new version when you edit this file
                      * and files in /etc/cron.d. These files also have username fields,
                      * that none of the other crontabs do.

                      SHELL=/bin/sh
                      PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

                      * m h dom mon dow user command
                      17 * * * * root cd / && run-parts --report /etc/cron.hourly
                      25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
                      47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
                      52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

                      Does this mean the crontab file with the needed instructions has become a temporary file and the added text needs to be inserted into the root crontab file, or might there be some other problem?

                      Any help would be greatly appreciated.

                      Aaron

                      Comment

                      • RaspberryAsset

                        • Feb 2018
                        • 41

                        #12
                        Re: Raspberry fstab setting for mounting drive

                        Hey Arron

                        I think the fix for all of us is to add the ver-3.0 after the mount command. So for you it will be

                        @reboot sudo mount -t nfs 192.168.1.152:/nfs/Music /home/pi/nas, ,vers=3.0

                        This is what Psweetie found out. I did the same thing effect by changing the protocol on my server, but when I get some time I will also try this method as well.

                        Comment

                        • ASF
                          dBpoweramp Enthusiast

                          • Jun 2012
                          • 123

                          #13
                          Re: Raspberry fstab setting for mounting drive

                          Simon/Spoon:

                          By way of update, I tried inserting the three "@reboot..." lines above into my "/etc/crontab" file, but this didn't help.

                          After reviewing the posts above, I noticed where you noted having to manual enter the command "sudo mount -a" to get the server to mount. I figured I give this a try and received the following message:



                          Now I am really confused. Can you help further?

                          Thanks

                          Aaron

                          Comment

                          • ASF
                            dBpoweramp Enthusiast

                            • Jun 2012
                            • 123

                            #14
                            Re: Raspberry fstab setting for mounting drive

                            As a last resort, I contacted Western Digital. They had me "reset" the server but this did nothing to resolve the problem.

                            Aaron

                            Comment

                            • RaspberryAsset

                              • Feb 2018
                              • 41

                              #15
                              Re: Raspberry fstab setting for mounting drive

                              I just tried the fix suggested by Psweetie and it worked fine. Adding vers=3.0 after the command I had before was all that was needed...!!!
                              My previous fix was to change the protocol on the drives to version 2.

                              My current Fstab command is.


                              //192.168.2.210/n4f-01/Media/MEDIA/Music /home/pi/DLNA cifs guest, 0 0, vers=3.0

                              Comment

                              Working...

                              ]]>