Announcement

Collapse
No announcement yet.

fstab mounts

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

    fstab mounts

    Hope someone can help me with this. I have this for my fstab


    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc nodev,noexec,nosuid 0 0
    # / was on /dev/sda1 during installation
    UUID=b1d3d58d-e044-422f-ae1d-37a193abfe39 / ext4 errors=remount-ro 0 1
    # swap was on /dev/sda5 during installation
    UUID=ba5a5445-7b2b-4834-a8e0-7661c751e44f none swap sw 0 0
    //192.168.170.100/1TBi /media/1TBi cifs username=administrator,password=****,iocharset=utf 8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0
    //192.168.170.143/USB_DRIVE_1_5_TB /media/1_5TB cifs username=nmt,password=****,iocharset=utf8,gid=1000 ,uid=1000,file_mode=0777,dir_mode=0777 0 0
    //192.168.170.143/share /media/PopcornHour cifs username=nmt,password=****,iocharset=utf8,gid=1000 ,uid=1000,file_mode=0777,dir_mode=0777 0 0

    and it does not mount the drives on boot. if I type sudo mount -a it works fine. Why is it not mounting them on boot?

    #2
    Re: fstab mounts

    I'm not 100% sure, but I think /etc/fstab is fully executed before networking is set up, in the boot sequence. If I'm right, those IP addresses don't mean anything at the time that /etc/fstab is read and executed.

    Comment


      #3
      Re: fstab mounts

      I figured that was the case. Is there any way to get it to wait for wireless before it loads it. or make it run sudo mount -a when wireless is established?

      Comment


        #4
        Re: fstab mounts

        Yikes - if you had said "wired ethernet", I would have suggested a simple init script to mount them at the end of booting up. But using wireless to "automatically" mount network drives is fraught with even more difficulties. I guess if you can put enough "sleep=" statements in your script to make double-certain that wireless is actually up and connected, then a script should work (for every time that wireless is up and connected).

        Comment


          #5
          Re: fstab mounts

          Yeah wired would be nice but this PC is in my garage and there is no way I can get a cable out here.

          Comment


            #6
            Re: fstab mounts

            dibl is correct. You need to mount the drives using their entry in /dev.

            For example, this is how I mount my Windows partition automatically at boot.

            /dev/sda2 /mnt/Windows ntfs-3g uid=1000,gid=1000,locale=en_US.UTF-8 0 0

            Of course, the target directory must exist. That was accomplished by issuing the command
            Code:
            mkdir /mnt/Windows

            Comment


              #7
              Re: fstab mounts

              I see, these are network drives. So fstab won't work.

              Comment


                #8
                Re: fstab mounts

                if fstab won't work then is there anything that will. seems like a very simple issue. any other OS i have used can do this very easily. Not trying to sound like a windows fan but All i need to do on my windows 7 pc is check the reconnect at login box.

                Comment


                  #9
                  Re: fstab mounts

                  Assuming wireless is up (and I've never observed it to work on 100.0% of startups), all you need is a root shell script that says "mount -a".

                  Comment


                    #10
                    Re: fstab mounts

                    use the _netdev option this is specified to go back through once the network is up and operating to mount the filesystem.

                    This is used many places for nfs mounts that require the network to be active

                    Mark

                    Comment


                      #11
                      Re: fstab mounts

                      These are not nfs thought they are cifs. Is it possible to change them?

                      Comment


                        #12
                        Re: fstab mounts

                        Just made and added a script to my rc.local and got it to come up on boot

                        Comment


                          #13
                          Re: fstab mounts

                          Does the script actually mount the remote file systems, or does it merely run "mount -a"? The reason I ask is, that when I had this problem with some nfs shares that were not being mounted at boot because the remote system was not available, it really slowed down my boot time, because fstab was trying to mount them, and delayed things until it gave up and moved on. So if your script actually mounts the remote file systems directly, you could remove those entries from fstab and significantly speed up your boot time.

                          Comment


                            #14
                            Re: fstab mounts

                            These are not nfs thought they are cifs. Is it possible to change them?
                            If your server is linux the answer is yes, but this won't change the fact that your wifi needs to be connected before they can be mounted. I prefer nfs because it's faster and more stable and simpler to connect to IMO.

                            I see, these are network drives. So fstab won't work.
                            You need to mount the drives using their entry in /dev.
                            These comments are incorrect or at least incomplete. Network drives can be mounted via fstab as long as the network is up first. I mount my nfs shares via fstab and the boot process waits for them to come up. Your fstab entries look OK to me at first glance. I believe the issue is your wireless network does not come up until after log-in.

                            I'm not a wireless expert at all but see two possible solutions:
                            1.You could try and figure out how to connect wirelessly via a script that executes before the fstab file is executed.
                            2.You could remove the mount commands from fstab and issue them manually via a script after log in or automatically after wireless is up.

                            #2: It would be simple to have a desktop icon that executes a mount script. It's possible you could put a script in init.d and execute it via a /etc/rc2.d link that happens after wireless. I don't know if it's possible, but a script that ran after the wifi was up would solve it.

                            #1: I don't know if this is possible and I see several possible problems with it like what happens if the wireless doesn't connect?


                            Please Read Me

                            Comment


                              #15
                              Re: fstab mounts

                              Originally posted by rujelus22
                              These are not nfs thought they are cifs. Is it possible to change them?
                              _netdev means it is a network device and it will attempt to mount after the network is up and running. It is used also for ocfs2 filesystems that are clustered as the network needs to be up before the ocfs2 cluster stack can startup. It works fine with cifs filesystems using it for many productions servers that need access to M$ filesystems as we are a mixed shop......

                              Comment

                              Working...
                              X