Announcement

Collapse
No announcement yet.

Mounting cifs share from /etc/fstab on boot

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Re: Mounting cifs share from /etc/fstab on boot

    Originally posted by mando_hacker
    The init scripts are not moved around.
    I was talking about the startup links (that can be moved around), not the init scripts themselves :P

    Originally posted by mando_hacker
    It could be. I would be very surprised if that is true.
    It's quite possible, as the waitnfs initscript seems to do basically the same thing in hardy (and there is no waitnfs script for Intrepid?/Jaunty, perhaps mountnfs is just an improved and renamed version of waitnfs).

    I'd check the existence of /etc/network/if-up.d/mountnfs. Try running 'sudo /etc/network/if-up.d/mountnfs' to see if the script can mount your share.

    Comment


      #17
      Re: Mounting cifs share from /etc/fstab on boot

      Code:
      root@Lepiota:/home/pwa# dpkg -L initscripts | grep nfs
      /sbin/fsck.nfs
      /etc/init.d/mountkernfs.sh
      /etc/init.d/umountnfs.sh
      /etc/init.d/mountnfs-bootclean.sh
      /etc/init.d/waitnfs.sh
      /etc/network/if-up.d/mountnfs
      /usr/share/man/man8/fsck.nfs.8.gz
      root@Lepiota:/home/pwa#
      It looks as though /etc/network/if-up.d/mountnfs does the right thing, but it's probably not in the right place. Or is it?

      So what would be the best course of action now? And does this look like a reportable bug, given that Hardy isn't the latest release?

      Comment


        #18
        Re: Mounting cifs share from /etc/fstab on boot

        That should get run when a network interface comes up. How is you network getting configured? Have you edited /etc/network/interfaces or are you using network-manager, or maybe wicd?

        You could try to run the script and see if it mounts. It probably requires startlike,
        sudo /etc/network/if-up.d/mountnfs.sh start

        I still am not convinced that you share name (hpmediavault:FileShare) is correct. Is this a local mount of some sort? If not what is the host(server) and what is the share. Where did you get that notation?

        Comment


          #19
          Re: Mounting cifs share from /etc/fstab on boot

          Originally posted by pwabrahams
          It looks as though /etc/network/if-up.d/mountnfs does the right thing, but it's probably not in the right place. Or is it?
          Yes it is, there are two mountnfs scripts (or in your case waitnfs and mountnfs), the one in /etc/network/if-up.d/ should run every time network is brought up, and the init.d script will run on boot, and should hold up the boot until network is ready and shares mounted (although the waitnfs script seems to be slightly different).

          So what would be the best course of action now? And does this look like a reportable bug, given that Hardy isn't the latest release?
          Before reporting a bug it's advisable to try to find out what is actually responsible for the issue...so the bug can be directed at the correct package (and to make sure it really a bug and not just misconfiguration).

          Was running /etc/network/if-up.d/mountnfs successful in mounting the share?

          EDIT:
          Originally posted by mando_hacker
          I still am not convinced that you share name (hpmediavault:FileShare) is correct. Is this a local mount of some sort? If not what is the host(server) and what is the share. Where did you get that notation?
          I don't think that's the issue since a simple mount command is able to mount the share 'as is'. Of course it could be an issue with mountnfs not understanding the notation. Anyway, it doesn't hurt to try a 'traditional' share name---or perhaps refer to the share with an IP address instead of a host name...just to reduce the number of variables for the problem

          Comment


            #20
            Re: Mounting cifs share from /etc/fstab on boot

            It does seem strange that it mounts but there is something weird here and that is definitely not right. Here are HP's instructions.
            http://h10025.www1.hp.com/ewfrf/wc/d...roduct=3193058

            They indicate standard notation.

            Comment


              #21
              Using the standard notation

              I got the notation I used from a FAQ on the MediaVault. However, after reading the comments here I changed to the "standard" notation:
              Code:
              //hpmediavault/FileShare /mediavault cifs defaults,user,guest,_netdev 0 0
              and it made no difference,

              Perhaps the problem is that it is taking the MediaVault a minute or so to come up, well after the network connection has been established. Or maybe it has to do with the fact that I'm using wicd (it's a wireless network with WPA-PSK authentication and the builtin stuff doesn't handle that) and by the time wicd has brought up the network, all the mountnfs stuff has gone away.

              Comment


                #22
                Re: Mounting cifs share from /etc/fstab on boot

                You may have just hit on the problem. I do not know if wicd will call the if-up.d scripts. This seems to indicate not, which is interesting and distressing because it means the goofy network situation is even worse.

                You could try configuring your wireless in /etc/network/interfaces and then the network would start automatically and the drives get mounted. Depending on your access point setup youwould need an entry like one of these
                auto wlan0
                iface wlan0 inet dhcp
                wpa-ssid essid
                wpa-psk passphrase

                or
                auto wlan0
                iface wlan0 inet dhcp
                wireless-essid essid
                wireless-key keyvalue

                Comment


                  #23
                  Re: Mounting cifs share from /etc/fstab on boot

                  It turns out that wicd does support running a script after connecting but it is not setup to run the if-up.d directory. I think you can make it do what you want by opening wicd and clicking on the essid of you wireless and selecting scripts. In post connections script put
                  /etc/network/if-up.d/mountnfs
                  This will run the script and mount network filesystems. I tried that using a windows Vista share.

                  Comment


                    #24
                    wicd post-connection script

                    Putting in that post-connection script did the trick. The automount works fine now. Thanks!!

                    Comment

                    Working...
                    X