ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Shares Not Mounting on Reboot

    IT Discussion
    cron linux cron job
    4
    20
    3.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • thanksajdotcomT
      thanksajdotcom
      last edited by thanksajdotcom

      I have an issue where I have setup a cron job to mount three shares on every reboot. This is done via a shell script and a cron job that starts with @reboot.

      @reboot /home/user/scripts/aj-mount-goflex
      

      The script works because if I run it manually it executes without issue. The issue I'm having is that if I reboot my cloud Plex server, without these shares mounted, there is no content. Not sure why it's not working but wasn't sure where to check. I've had this issue in the past and it was an fstab issue but I'm not sure if that's where it is this time.

      Thanks,
      A.J.

      EDIT: The issue with fstab was it was trying to run the script and the same things were in fstab. I have confirmed that the shares are not listed in fstab on this server.

      1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller
        last edited by

        Why are they in Cron rather than in fstab?

        thanksajdotcomT 1 Reply Last reply Reply Quote 0
        • thanksajdotcomT
          thanksajdotcom @scottalanmiller
          last edited by

          @scottalanmiller said:

          Why are they in Cron rather than in fstab?

          I've had issues with fstab in the past. I found it worked better with a shell script and a cron job but maybe I need to try fstab again.

          1 Reply Last reply Reply Quote 0
          • Reid CooperR
            Reid Cooper
            last edited by

            I would think that fstab would be the more normal way. You say that you have had issues in the past, what kinds of issues? Did they fail to mount or attempt to mount before the Samba services were available?

            1 Reply Last reply Reply Quote 1
            • scottalanmillerS
              scottalanmiller
              last edited by

              I haven't worked with Plex, but what does Plex do by default?

              1 Reply Last reply Reply Quote 1
              • thanksajdotcomT
                thanksajdotcom
                last edited by

                Ok, so the issue I had before with fstab is that it was trying to mount the partition, which is mapped over Pertino, before the Pertino interface was up, I believe. I have edited my /etc/fstab file and then setup a cron job to tap into it.

                @reboot mount -a
                

                This seems to have taken care of the issue and it's working now. Kind of a h4x0r way to do it, but as long as it works.

                1 Reply Last reply Reply Quote 0
                • thanksajdotcomT
                  thanksajdotcom
                  last edited by

                  Plex and the mounting of the file shares are totally separate. Plex accesses the shares but has nothing to do with the mounting process.

                  1 Reply Last reply Reply Quote 0
                  • thanksajdotcomT
                    thanksajdotcom
                    last edited by

                    Ok, so a new issue I'm having on another server...

                    I think it has something to do with the escape character...

                    //172.16.255.6/GoFlex\ Home\ Personal   /media/goflex_dallas    auto    defaults,credentials=/home/aj/.smbcredentials   0       0
                    //172.16.255.5/GoFlex\ Home\ Personal   /media/goflex_landcare  auto    defaults,credentials=/home/aj/.smbcredentials   0       0
                    //172.16.255.6/GoFlex\ Home\ Personal   /srv/samba/share/goflex_dallas  auto    defaults,credentials=/home/aj/.smbcredentials   0       0
                    //172.16.255.5/GoFlex\ Home\ Personal   /srv/samba/share/goflex_landcare        auto    defaults,credentials=/home/aj/.smbcredentials   0       0
                    

                    However, this is how it looks...

                    upload-03bef81b-2cea-42f0-a75c-1b815ac85d80

                    It's saying there is a syntax error at auto, but I know that's right. The whole command is right. The only difference between this and my other Plex server is the escape character for the space in the share name, which I can't change...

                    1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller
                      last edited by

                      You are definitely missing the the quotes on some of those.

                      thanksajdotcomT 1 Reply Last reply Reply Quote 0
                      • thanksajdotcomT
                        thanksajdotcom @scottalanmiller
                        last edited by

                        @scottalanmiller said:

                        You are definitely missing the the quotes on some of those.

                        Where? and what kind of quotes?

                        coliverC 1 Reply Last reply Reply Quote 0
                        • coliverC
                          coliver @thanksajdotcom
                          last edited by

                          @thanksajdotcom said:

                          @scottalanmiller said:

                          You are definitely missing the the quotes on some of those.

                          Where? and what kind of quotes?

                          Shouldn't it look something like this?

                          //172.16.255.6/"GoFlex Home Personal"
                          
                          thanksajdotcomT 1 Reply Last reply Reply Quote 1
                          • thanksajdotcomT
                            thanksajdotcom @coliver
                            last edited by

                            @coliver said:

                            @thanksajdotcom said:

                            @scottalanmiller said:

                            You are definitely missing the the quotes on some of those.

                            Where? and what kind of quotes?

                            Shouldn't it look something like this?

                            //172.16.255.6/"GoFlex Home Personal"
                            

                            That's still saying it's wrong too.

                            scottalanmillerS coliverC 2 Replies Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller @thanksajdotcom
                              last edited by

                              @thanksajdotcom said:

                              That's still saying it's wrong too.

                              Good start, at least.

                              1 Reply Last reply Reply Quote 0
                              • coliverC
                                coliver @thanksajdotcom
                                last edited by

                                @thanksajdotcom said:

                                @coliver said:

                                @thanksajdotcom said:

                                @scottalanmiller said:

                                You are definitely missing the the quotes on some of those.

                                Where? and what kind of quotes?

                                Shouldn't it look something like this?

                                //172.16.255.6/"GoFlex Home Personal"
                                

                                That's still saying it's wrong too.

                                The other thing you can do is this:

                                "//172.16.255.6/GoFlex Home Personal"
                                

                                But you shouldn't need to. Is there any other in-depth logs for this? Or does it just not work?

                                thanksajdotcomT 1 Reply Last reply Reply Quote 0
                                • thanksajdotcomT
                                  thanksajdotcom @coliver
                                  last edited by

                                  @coliver said:

                                  @thanksajdotcom said:

                                  @coliver said:

                                  @thanksajdotcom said:

                                  @scottalanmiller said:

                                  You are definitely missing the the quotes on some of those.

                                  Where? and what kind of quotes?

                                  Shouldn't it look something like this?

                                  //172.16.255.6/"GoFlex Home Personal"
                                  

                                  That's still saying it's wrong too.

                                  The other thing you can do is this:

                                  "//172.16.255.6/GoFlex Home Personal"
                                  

                                  But you shouldn't need to. Is there any other in-depth logs for this? Or does it just not work?

                                  Tried that too. That is not working either, and it's showing as a syntax error. It just doesn't work.

                                  1 Reply Last reply Reply Quote 0
                                  • thanksajdotcomT
                                    thanksajdotcom
                                    last edited by

                                    This did it.
                                    http://www.simpit.com/wordpress/?p=626

                                    The syntax is:

                                    //172.16.255.6/GoFlex\040Home\040Personal
                                    
                                    1 Reply Last reply Reply Quote 1
                                    • thanksajdotcomT
                                      thanksajdotcom
                                      last edited by

                                      Beautiful! Everything works as it should now!

                                      1 Reply Last reply Reply Quote 1
                                      • thanksajdotcomT
                                        thanksajdotcom
                                        last edited by

                                        The issue was the spaces. Even with the escape character, it was not liking the space. Thus you use the escape character backslash and then 040 to symbolize a space.

                                        1 Reply Last reply Reply Quote 0
                                        • Reid CooperR
                                          Reid Cooper
                                          last edited by

                                          That's interesting. Quotes without the escapes should make that unnecessary. Interesting way to fix it, though.

                                          thanksajdotcomT 1 Reply Last reply Reply Quote 1
                                          • thanksajdotcomT
                                            thanksajdotcom @Reid Cooper
                                            last edited by

                                            @Reid-Cooper said:

                                            That's interesting. Quotes without the escapes should make that unnecessary. Interesting way to fix it, though.

                                            Yeah, the quotes was still showing it as a syntax error.

                                            1 Reply Last reply Reply Quote 0
                                            • 1 / 1
                                            • First post
                                              Last post