How can you umount `/home`?
When log in Lubuntu, I can't
$ sudo umount /home
umount: /home: target is busy.
where /home
itself is a mount point of a filesystem.
How can you umount /home
?
/
can't be umounted, because OS is running from it. Can /home
be easier to be umounted?
Thanks.
filesystems mount
add a comment |
When log in Lubuntu, I can't
$ sudo umount /home
umount: /home: target is busy.
where /home
itself is a mount point of a filesystem.
How can you umount /home
?
/
can't be umounted, because OS is running from it. Can /home
be easier to be umounted?
Thanks.
filesystems mount
Linux don't allow you to umount a mount point if there's still some living reference to it.
– 炸鱼薯条德里克
Feb 24 at 2:23
add a comment |
When log in Lubuntu, I can't
$ sudo umount /home
umount: /home: target is busy.
where /home
itself is a mount point of a filesystem.
How can you umount /home
?
/
can't be umounted, because OS is running from it. Can /home
be easier to be umounted?
Thanks.
filesystems mount
When log in Lubuntu, I can't
$ sudo umount /home
umount: /home: target is busy.
where /home
itself is a mount point of a filesystem.
How can you umount /home
?
/
can't be umounted, because OS is running from it. Can /home
be easier to be umounted?
Thanks.
filesystems mount
filesystems mount
edited Feb 23 at 23:57
Kusalananda
135k17255422
135k17255422
asked Feb 23 at 23:27
TimTim
27.7k78265483
27.7k78265483
Linux don't allow you to umount a mount point if there's still some living reference to it.
– 炸鱼薯条德里克
Feb 24 at 2:23
add a comment |
Linux don't allow you to umount a mount point if there's still some living reference to it.
– 炸鱼薯条德里克
Feb 24 at 2:23
Linux don't allow you to umount a mount point if there's still some living reference to it.
– 炸鱼薯条德里克
Feb 24 at 2:23
Linux don't allow you to umount a mount point if there's still some living reference to it.
– 炸鱼薯条德里克
Feb 24 at 2:23
add a comment |
1 Answer
1
active
oldest
votes
You can unmount /home
if it's an independent file system. The Target is busy
message means that there are either:
- files under
/home
that are still open - directories under
/home
that are the CWD of some process (this could be the shell from which you try to unmount/home
) - a filesystem mounted on a mount point under
/home
For 1) and 2), the lsof
command can help, but if you are using a GUI, you have very many files permanently open under /home/{your id}
so unmounting /home
is not going to be easy. If you log using a TTY instead of a GUI, you can better control what process are running with your id and what files are open.
Thanks. Do you think it is better to boot into a live Lubuntu so that the/home
on disk is not mounted by default?
– Tim
Feb 24 at 0:06
1
Yes, it could make things easier. But why do you want to unnount/home
?.
– xenoid
Feb 24 at 0:49
2
I agree that it’ll be difficult if your logged in (even at the text console) as a user, if your ~ is on /home, but I want to warn you that even if you manage to log in as root, you might encounter a situation where /home is unmountable. If you use systemd and you have any services that have ProtectHome=read-only, it will have a bind mount of home that will prevent /home from being uncounted. It won’t show it in lsof, since it is a kernel syscall.
– jsbillings
Feb 24 at 1:13
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f502594%2fhow-can-you-umount-home%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
You can unmount /home
if it's an independent file system. The Target is busy
message means that there are either:
- files under
/home
that are still open - directories under
/home
that are the CWD of some process (this could be the shell from which you try to unmount/home
) - a filesystem mounted on a mount point under
/home
For 1) and 2), the lsof
command can help, but if you are using a GUI, you have very many files permanently open under /home/{your id}
so unmounting /home
is not going to be easy. If you log using a TTY instead of a GUI, you can better control what process are running with your id and what files are open.
Thanks. Do you think it is better to boot into a live Lubuntu so that the/home
on disk is not mounted by default?
– Tim
Feb 24 at 0:06
1
Yes, it could make things easier. But why do you want to unnount/home
?.
– xenoid
Feb 24 at 0:49
2
I agree that it’ll be difficult if your logged in (even at the text console) as a user, if your ~ is on /home, but I want to warn you that even if you manage to log in as root, you might encounter a situation where /home is unmountable. If you use systemd and you have any services that have ProtectHome=read-only, it will have a bind mount of home that will prevent /home from being uncounted. It won’t show it in lsof, since it is a kernel syscall.
– jsbillings
Feb 24 at 1:13
add a comment |
You can unmount /home
if it's an independent file system. The Target is busy
message means that there are either:
- files under
/home
that are still open - directories under
/home
that are the CWD of some process (this could be the shell from which you try to unmount/home
) - a filesystem mounted on a mount point under
/home
For 1) and 2), the lsof
command can help, but if you are using a GUI, you have very many files permanently open under /home/{your id}
so unmounting /home
is not going to be easy. If you log using a TTY instead of a GUI, you can better control what process are running with your id and what files are open.
Thanks. Do you think it is better to boot into a live Lubuntu so that the/home
on disk is not mounted by default?
– Tim
Feb 24 at 0:06
1
Yes, it could make things easier. But why do you want to unnount/home
?.
– xenoid
Feb 24 at 0:49
2
I agree that it’ll be difficult if your logged in (even at the text console) as a user, if your ~ is on /home, but I want to warn you that even if you manage to log in as root, you might encounter a situation where /home is unmountable. If you use systemd and you have any services that have ProtectHome=read-only, it will have a bind mount of home that will prevent /home from being uncounted. It won’t show it in lsof, since it is a kernel syscall.
– jsbillings
Feb 24 at 1:13
add a comment |
You can unmount /home
if it's an independent file system. The Target is busy
message means that there are either:
- files under
/home
that are still open - directories under
/home
that are the CWD of some process (this could be the shell from which you try to unmount/home
) - a filesystem mounted on a mount point under
/home
For 1) and 2), the lsof
command can help, but if you are using a GUI, you have very many files permanently open under /home/{your id}
so unmounting /home
is not going to be easy. If you log using a TTY instead of a GUI, you can better control what process are running with your id and what files are open.
You can unmount /home
if it's an independent file system. The Target is busy
message means that there are either:
- files under
/home
that are still open - directories under
/home
that are the CWD of some process (this could be the shell from which you try to unmount/home
) - a filesystem mounted on a mount point under
/home
For 1) and 2), the lsof
command can help, but if you are using a GUI, you have very many files permanently open under /home/{your id}
so unmounting /home
is not going to be easy. If you log using a TTY instead of a GUI, you can better control what process are running with your id and what files are open.
answered Feb 23 at 23:45
xenoidxenoid
3,1651726
3,1651726
Thanks. Do you think it is better to boot into a live Lubuntu so that the/home
on disk is not mounted by default?
– Tim
Feb 24 at 0:06
1
Yes, it could make things easier. But why do you want to unnount/home
?.
– xenoid
Feb 24 at 0:49
2
I agree that it’ll be difficult if your logged in (even at the text console) as a user, if your ~ is on /home, but I want to warn you that even if you manage to log in as root, you might encounter a situation where /home is unmountable. If you use systemd and you have any services that have ProtectHome=read-only, it will have a bind mount of home that will prevent /home from being uncounted. It won’t show it in lsof, since it is a kernel syscall.
– jsbillings
Feb 24 at 1:13
add a comment |
Thanks. Do you think it is better to boot into a live Lubuntu so that the/home
on disk is not mounted by default?
– Tim
Feb 24 at 0:06
1
Yes, it could make things easier. But why do you want to unnount/home
?.
– xenoid
Feb 24 at 0:49
2
I agree that it’ll be difficult if your logged in (even at the text console) as a user, if your ~ is on /home, but I want to warn you that even if you manage to log in as root, you might encounter a situation where /home is unmountable. If you use systemd and you have any services that have ProtectHome=read-only, it will have a bind mount of home that will prevent /home from being uncounted. It won’t show it in lsof, since it is a kernel syscall.
– jsbillings
Feb 24 at 1:13
Thanks. Do you think it is better to boot into a live Lubuntu so that the
/home
on disk is not mounted by default?– Tim
Feb 24 at 0:06
Thanks. Do you think it is better to boot into a live Lubuntu so that the
/home
on disk is not mounted by default?– Tim
Feb 24 at 0:06
1
1
Yes, it could make things easier. But why do you want to unnount
/home
?.– xenoid
Feb 24 at 0:49
Yes, it could make things easier. But why do you want to unnount
/home
?.– xenoid
Feb 24 at 0:49
2
2
I agree that it’ll be difficult if your logged in (even at the text console) as a user, if your ~ is on /home, but I want to warn you that even if you manage to log in as root, you might encounter a situation where /home is unmountable. If you use systemd and you have any services that have ProtectHome=read-only, it will have a bind mount of home that will prevent /home from being uncounted. It won’t show it in lsof, since it is a kernel syscall.
– jsbillings
Feb 24 at 1:13
I agree that it’ll be difficult if your logged in (even at the text console) as a user, if your ~ is on /home, but I want to warn you that even if you manage to log in as root, you might encounter a situation where /home is unmountable. If you use systemd and you have any services that have ProtectHome=read-only, it will have a bind mount of home that will prevent /home from being uncounted. It won’t show it in lsof, since it is a kernel syscall.
– jsbillings
Feb 24 at 1:13
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f502594%2fhow-can-you-umount-home%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
Linux don't allow you to umount a mount point if there's still some living reference to it.
– 炸鱼薯条德里克
Feb 24 at 2:23