Remount shared folder: alternative to mount -a












0















Some shared folders unexpectedly get unmounted sometimes, therefore I've scheduled a mount -a with the purpose of remountig only those shared folders that got unmounted in the meantime.



In the manual, however, I read:




Note that it is a bad practice to use mount -a for fstab checking.

The recommended solution is findmnt --verify.




It is my understanding that findmnt --verify checks all mounted filesystems, and does not perform any further action. I would like to only check cifs mounts and remount them if any error is encountered.



What is the preferred way to accomplish this?





Edit:



Thanks to Soren A for pointing out how to filter only cifs filesystems: findmnt -t cifs --verify.



Update:



I added a line in my /etc/fstab and findmnt --verify did not detect it as being unmounted. It thus seems ineffective at detecting unmounted entries in /etc/fstab. Maybe I just mistook fstab checking for checking whether all entries in fstab are correctly mounted instead of just verify /etc/fstab parsability and usability.










share|improve this question




















  • 1





    Look at man findmnt ... it seems that -t or --types list takes a comma seperated list of filesystem types.

    – Soren A
    Jan 2 at 11:23
















0















Some shared folders unexpectedly get unmounted sometimes, therefore I've scheduled a mount -a with the purpose of remountig only those shared folders that got unmounted in the meantime.



In the manual, however, I read:




Note that it is a bad practice to use mount -a for fstab checking.

The recommended solution is findmnt --verify.




It is my understanding that findmnt --verify checks all mounted filesystems, and does not perform any further action. I would like to only check cifs mounts and remount them if any error is encountered.



What is the preferred way to accomplish this?





Edit:



Thanks to Soren A for pointing out how to filter only cifs filesystems: findmnt -t cifs --verify.



Update:



I added a line in my /etc/fstab and findmnt --verify did not detect it as being unmounted. It thus seems ineffective at detecting unmounted entries in /etc/fstab. Maybe I just mistook fstab checking for checking whether all entries in fstab are correctly mounted instead of just verify /etc/fstab parsability and usability.










share|improve this question




















  • 1





    Look at man findmnt ... it seems that -t or --types list takes a comma seperated list of filesystem types.

    – Soren A
    Jan 2 at 11:23














0












0








0








Some shared folders unexpectedly get unmounted sometimes, therefore I've scheduled a mount -a with the purpose of remountig only those shared folders that got unmounted in the meantime.



In the manual, however, I read:




Note that it is a bad practice to use mount -a for fstab checking.

The recommended solution is findmnt --verify.




It is my understanding that findmnt --verify checks all mounted filesystems, and does not perform any further action. I would like to only check cifs mounts and remount them if any error is encountered.



What is the preferred way to accomplish this?





Edit:



Thanks to Soren A for pointing out how to filter only cifs filesystems: findmnt -t cifs --verify.



Update:



I added a line in my /etc/fstab and findmnt --verify did not detect it as being unmounted. It thus seems ineffective at detecting unmounted entries in /etc/fstab. Maybe I just mistook fstab checking for checking whether all entries in fstab are correctly mounted instead of just verify /etc/fstab parsability and usability.










share|improve this question
















Some shared folders unexpectedly get unmounted sometimes, therefore I've scheduled a mount -a with the purpose of remountig only those shared folders that got unmounted in the meantime.



In the manual, however, I read:




Note that it is a bad practice to use mount -a for fstab checking.

The recommended solution is findmnt --verify.




It is my understanding that findmnt --verify checks all mounted filesystems, and does not perform any further action. I would like to only check cifs mounts and remount them if any error is encountered.



What is the preferred way to accomplish this?





Edit:



Thanks to Soren A for pointing out how to filter only cifs filesystems: findmnt -t cifs --verify.



Update:



I added a line in my /etc/fstab and findmnt --verify did not detect it as being unmounted. It thus seems ineffective at detecting unmounted entries in /etc/fstab. Maybe I just mistook fstab checking for checking whether all entries in fstab are correctly mounted instead of just verify /etc/fstab parsability and usability.







mount samba fstab






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 2 at 13:39







simlev

















asked Jan 2 at 11:11









simlevsimlev

1732212




1732212








  • 1





    Look at man findmnt ... it seems that -t or --types list takes a comma seperated list of filesystem types.

    – Soren A
    Jan 2 at 11:23














  • 1





    Look at man findmnt ... it seems that -t or --types list takes a comma seperated list of filesystem types.

    – Soren A
    Jan 2 at 11:23








1




1





Look at man findmnt ... it seems that -t or --types list takes a comma seperated list of filesystem types.

– Soren A
Jan 2 at 11:23





Look at man findmnt ... it seems that -t or --types list takes a comma seperated list of filesystem types.

– Soren A
Jan 2 at 11:23










1 Answer
1






active

oldest

votes


















0














It seems I have misunderstood the meaning of the mount manual:




it is a bad practice to use mount -a for fstab checking.




Maybe because this is what I was looking for, I took it to mean: checking whether all entries in fstab are correctly mounted.



Instead, the findmnt manual says:




-x, --verify

Check mount table content. The default is to verify /etc/fstab parsability and usability.




So, it seems findmnt --verify is just meant to check the correctness of /etc/fstab, regardless of the current state of mounted filesystems.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106243%2fremount-shared-folder-alternative-to-mount-a%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    It seems I have misunderstood the meaning of the mount manual:




    it is a bad practice to use mount -a for fstab checking.




    Maybe because this is what I was looking for, I took it to mean: checking whether all entries in fstab are correctly mounted.



    Instead, the findmnt manual says:




    -x, --verify

    Check mount table content. The default is to verify /etc/fstab parsability and usability.




    So, it seems findmnt --verify is just meant to check the correctness of /etc/fstab, regardless of the current state of mounted filesystems.






    share|improve this answer




























      0














      It seems I have misunderstood the meaning of the mount manual:




      it is a bad practice to use mount -a for fstab checking.




      Maybe because this is what I was looking for, I took it to mean: checking whether all entries in fstab are correctly mounted.



      Instead, the findmnt manual says:




      -x, --verify

      Check mount table content. The default is to verify /etc/fstab parsability and usability.




      So, it seems findmnt --verify is just meant to check the correctness of /etc/fstab, regardless of the current state of mounted filesystems.






      share|improve this answer


























        0












        0








        0







        It seems I have misunderstood the meaning of the mount manual:




        it is a bad practice to use mount -a for fstab checking.




        Maybe because this is what I was looking for, I took it to mean: checking whether all entries in fstab are correctly mounted.



        Instead, the findmnt manual says:




        -x, --verify

        Check mount table content. The default is to verify /etc/fstab parsability and usability.




        So, it seems findmnt --verify is just meant to check the correctness of /etc/fstab, regardless of the current state of mounted filesystems.






        share|improve this answer













        It seems I have misunderstood the meaning of the mount manual:




        it is a bad practice to use mount -a for fstab checking.




        Maybe because this is what I was looking for, I took it to mean: checking whether all entries in fstab are correctly mounted.



        Instead, the findmnt manual says:




        -x, --verify

        Check mount table content. The default is to verify /etc/fstab parsability and usability.




        So, it seems findmnt --verify is just meant to check the correctness of /etc/fstab, regardless of the current state of mounted filesystems.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 2 at 13:58









        simlevsimlev

        1732212




        1732212






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106243%2fremount-shared-folder-alternative-to-mount-a%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

            ComboBox Display Member on multiple fields

            Is it possible to collect Nectar points via Trainline?