Announcement

Collapse
No announcement yet.

autofs weirdness - minor directory issue, but seeking understanding

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

    autofs weirdness - minor directory issue, but seeking understanding

    I've never set up autofs before but I'm trying to on my wife's laptop. Since it's mobile, I didn't want a fixed fstab mount and she'd never be happy manually mounting something.

    Here's what I've done:

    Installed autofs
    Created auto.master:
    Code:
    #
    +auto.master
    /shared /etc/auto.shared --timeout=300 --ghost
    Created auto.shared
    Code:
    * server://media/shared
    /shared is the folder I want to mount to and this works, but it appears as /shared/shared/<FILES> rather than /shared/<FILES>. I tried using "/" in auto.master instead of /shared, but that just does nothing, I tried "/mnt" instead of /shared thinking I would get "/mnt/shared/<FILES> and I do, but it over-mounts so all the other folders in /mnt are hidden.

    I can live with it, but I wondered if there was a way to make it do what I want.

    I guess it will be a moot point soon enough anyway as systemd has it's own automount service.

    Please Read Me

    #2
    Not knowing what you have already reviewed, have you see this? https://help.ubuntu.com/community/Autofs
    Windows no longer obstruct my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Yes, that's what I followed that got these results.

      Please Read Me

      Comment


        #4
        Originally posted by oshunluvr View Post
        I've never set up autofs before but I'm trying to on my wife's laptop. Since it's mobile, I didn't want a fixed fstab mount and she'd never be happy manually mounting something.

        Here's what I've done:

        Installed autofs
        Created auto.master:
        Code:
        #
        +auto.master
        [COLOR=#ff0000]/shared[/COLOR] /etc/auto.shared --timeout=300 --ghost
        Created auto.shared
        Code:
        * server://media[COLOR=#ff0000]/shared[/COLOR]
        /shared is the folder I want to mount to and this works, but it appears as /shared/shared/<FILES> rather than /shared/<FILES>. I tried using "/" in auto.master instead of /shared, but that just does nothing, I tried "/mnt" instead of /shared thinking I would get "/mnt/shared/<FILES> and I do, but it over-mounts so all the other folders in /mnt are hidden.

        I can live with it, but I wondered if there was a way to make it do what I want.

        I guess it will be a moot point soon enough anyway as systemd has it's own automount service.
        If ,,,I am understanding what I am reading .....it creates the mount point from the beginning part of "auto.master" (/shared,nfs,smb,ect) AND the last part of "auto.shared (/shared,server,data,) so in your case,,,,,,,,,, /shared/shared in auto.master use something distinctive /homeserver ,/srv whatever .

        VINNY
        i7 4core HT 8MB L3 2.9GHz
        16GB RAM
        Nvidia GTX 860M 4GB RAM 1152 cuda cores

        Comment


          #5
          Yeah, I guess. With an fstab mount, you get what you enter, with autofs you get that plus the last bit of the shared directory, apparently.

          The export is server://media/shared. I also had to mount it as nfsV3 since it failed when I tried nfsV4 option. However oddly - the sub export that only supposed to work with nfsV4 is still there. Weird.

          It would help a lot if there was ANY output from autofs. It just fails and no notice. Anyway - I adjusted my links to account for the extra /shared and it works like I want. I just thought it was unnecessary for the extra directory level to be there for no reason or benefit.

          Maybe if you had multiple shares mounted this way they collect under a single directory. OK I guess, but not very flexible.

          Please Read Me

          Comment


            #6
            why not use /nfs in auto.master then ?

            VINNY
            i7 4core HT 8MB L3 2.9GHz
            16GB RAM
            Nvidia GTX 860M 4GB RAM 1152 cuda cores

            Comment


              #7
              The name of the directory isn't really the issue, it just seems that the extra directory layer is unnecessary and restrictive.

              Please Read Me

              Comment

              Users Viewing This Topic

              Collapse

              There are 0 users viewing this topic.

              Working...
              X