Announcement

Collapse
No announcement yet.

fstab/mounting question

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

    fstab/mounting question

    Years ago, I mounted all my remote drives via lines such as this in fstab:

    Code:
    //compaq/compaqAll /mnt/compaqAll cifs username=[USERNAME],password=[PASSWORD],domain=workgroup    0    0
    where //compaq/compaqAll was the name of a networked share (computer name/share name, both as defined on the shared computer) and /mnt/compaqAll was the mount point on the local computer.

    I don't remember exactly when, but at some point along the way this method stopped working for me. I switched to fstab entries like:

    Code:
    //192.168.2.104/compaqAll /mnt/compaq cifs rw,username=[USERNAME],password=[PASSWORD],file_mode=0770,dir_mode=0770,auto 0 0
    where //192.168.2.104/compaqAll refers to the shared computer's IP address and share name.

    It works...except when my IP addresses change. Like when the power goes out, or the DSL modem gets rebooted. Then I have to sort out which computers now have which IP addresses and change all my fstabs.

    This is definitely NOT a big issue--or I would've spent some time before now looking for a solution. But it's an annoyance I'd like to get rid of. Does anyone know why my original syntax no longer works?

    I know I could set static IP addresses on each box, but I'd just like to know why the old syntax doesn't work.
    Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544


    #2
    Re: fstab/mounting question

    Since you're using DHCP (that's why the IP addresses change), you should properly define your host names and use those instead.

    As in:

    compaq://compaqAll /mnt/compaqAll blah,blah,blah.

    One question; all linux boxes or windows or mixed?

    Please Read Me

    Comment


      #3
      Re: fstab/mounting question

      Originally posted by oshunluvr
      Since you're using DHCP (that's why the IP addresses change), you should properly define your host names and use those instead.

      As in:

      compaq://compaqAll /mnt/compaqAll blah,blah,blah.
      *IF* I remember correctly--and that's up in the air!--I did try that at some point but without success. I'll try it again, though, and report back on its status.

      One question; all linux boxes or windows or mixed?
      This is a windows-free household! Even my 80+ year old mom--whose knack for screwing up her desktop led to that great collaborative effort you were a part of--switched to Linux after I moved back here. Even my smartphone is Linux (Android).
      Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

      Comment


        #4
        Re: fstab/mounting question

        Originally posted by DoYouKubuntu
        Originally posted by oshunluvr
        Since you're using DHCP (that's why the IP addresses change), you should properly define your host names and use those instead.

        As in:

        compaq://compaqAll /mnt/compaqAll blah,blah,blah.
        *IF* I remember correctly--and that's up in the air!--I did try that at some point but without success. I'll try it again, though, and report back on its status.
        Okay, just tried the above and it yielded Unable to find suitable address. for each computer referenced that way.
        Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

        Comment


          #5
          Re: fstab/mounting question

          Try this in a terminal

          nmap -sP 192.168.2.*

          It should report hostnames and associated IP's.

          I asked the linux vs. winblows question because you're using samba rather than NFS.

          I use both but there are a few "guest" machines that aren't linux.

          IMO, NFS is easier to manage and more stable - but that's not the answer to your question.

          Please Read Me

          Comment


            #6
            Re: fstab/mounting question

            Originally posted by oshunluvr
            Try this in a terminal

            nmap -sP 192.168.2.*

            It should report hostnames and associated IP's.
            Here's the output:
            Code:
            $ nmap -sP 192.168.2.*
            
            Starting Nmap 5.21 ( [url]http://nmap.org[/url] ) at 2011-09-26 22:23 PDT
            Nmap scan report for 192.168.2.1
            Host is up (0.0061s latency).
            Nmap scan report for 192.168.2.100
            Host is up (0.013s latency).
            Nmap scan report for 192.168.2.101
            Host is up (0.0025s latency).
            Nmap scan report for 192.168.2.104
            Host is up (0.0029s latency).
            Nmap scan report for 192.168.2.105
            Host is up (0.0098s latency).
            Nmap scan report for 192.168.2.112
            Host is up (0.00015s latency).
            Nmap done: 256 IP addresses (6 hosts up) scanned in 2.91 seconds
            I asked the linux vs. winblows question because you're using samba rather than NFS.
            It's a holdover from when I used to have a mix of Linux and windoze boxes; once I got my mom off M$, I just didn't see the point of changing anything since it worked fine the way it was. I frequently say that I'm "too lazy" to do XYZ, but in fact I have limited energy due to health issues, so if something's working I tend to leave well enough alone!
            Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

            Comment


              #7
              Re: fstab/mounting question

              No host names is your problem. My nmap looks like:


              Starting Nmap 5.21 ( http://nmap.org ) at 2011-09-26 21:28 PDT
              Nmap scan report for myrouter.home (192.168.1.1)
              Host is up (0.00064s latency).
              Nmap scan report for VOIP.home (192.168.1.3)
              Host is up (0.0026s latency).
              Nmap scan report for 192.168.1.5
              Host is up (0.0017s latency).
              Nmap scan report for lisas-laptop.home (192.168.1.9)
              Host is up (0.0074s latency).
              Nmap scan report for new-host.home (192.168.1.10)
              Host is up (0.0069s latency).
              Nmap scan report for lilys-laptop.home (192.168.1.11)
              Host is up (0.014s latency).
              Nmap scan report for NP-K0A0DR008303.home (192.168.1.12)
              Host is up (0.011s latency).
              Nmap scan report for computer-4.home (192.168.1.25)
              Host is up (0.0043s latency).
              Nmap scan report for tvix (192.168.1.199)
              Host is up (0.000026s latency).
              Nmap scan report for server (192.168.1.250)
              Host is up (0.00027s latency).
              Nmap done: 256 IP addresses (10 hosts up) scanned in 2.63 seconds

              Please Read Me

              Comment


                #8
                Re: fstab/mounting question

                What are your DNS settings on your router (and is your router designated as a DNS server on the clients?)

                Originally posted by DoYouKubuntu
                I know I could set static IP addresses on each box, but I'd just like to know why the old syntax doesn't work.
                You could also check your router settings for "persistent DHCP addresses" that would force your DHCP server to always lease out the same IP to the same devices...sort of "best-of-both-worlds" on dynamic/static addresses. Having "static" IPs usually make a variety of network management tasks simpler.

                Comment

                Working...
                X