Remount shared folder: alternative to mount -a
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
add a comment |
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
1
Look atman findmnt
... it seems that -t or --types list takes a comma seperated list of filesystem types.
– Soren A
Jan 2 at 11:23
add a comment |
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
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
mount samba fstab
edited Jan 2 at 13:39
simlev
asked Jan 2 at 11:11
simlevsimlev
1732212
1732212
1
Look atman findmnt
... it seems that -t or --types list takes a comma seperated list of filesystem types.
– Soren A
Jan 2 at 11:23
add a comment |
1
Look atman 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
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Jan 2 at 13:58
simlevsimlev
1732212
1732212
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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