Mounting /home on a different partition
I am using Ubutnu 18.04.
Currently, /home
is mounted on /
on an NVME disk according to df
command:
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p2 137G 113G 18G 87% /
...
The size of /dev/sda1
is 400GB which I want to use as my /home according to fdisk -l
:
Device Start End Sectors Size Type
/dev/sda1 1172275200 1953523711 781248512 372.5G Linux filesystem
Using the guides, I have to find the UUID of /dev/sda1
using blkid
/dev/sda1: UUID="3ce518e8-955d-4b26-9dde-c3819d5906d6" TYPE="ext4" PARTUUID="08f6658f-7432-4a48-bdbd-0ee8f16d9b91"
and define the appropriate entry in /etc/fstab
. So, the content of that is now
$ cat /etc/fstab
UUID=3ce518e8-955d-4b26-9dde-c3819d5906d6 /home ext4 defaults 0 2
UUID=918a1f7d-b27c-4b82-8a10-ba0d622a37dd / ext4 errors=remount-ro 0 1
UUID=BA35-0600 /boot/efi vfat umask=0077 0 1
UUID=36a37d03-0ba7-4196-83ed-876e2782297e none swap sw 0 0
After running sudo mount -a
, I see that my home folder becomes empty and all files are disappeared.
$ ls /home/mahmood/
$
My previous files are missing however, they exist. Since the usage of /
in df -h
has not been changed.
Any quick solution?
ubuntu partition
add a comment |
I am using Ubutnu 18.04.
Currently, /home
is mounted on /
on an NVME disk according to df
command:
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p2 137G 113G 18G 87% /
...
The size of /dev/sda1
is 400GB which I want to use as my /home according to fdisk -l
:
Device Start End Sectors Size Type
/dev/sda1 1172275200 1953523711 781248512 372.5G Linux filesystem
Using the guides, I have to find the UUID of /dev/sda1
using blkid
/dev/sda1: UUID="3ce518e8-955d-4b26-9dde-c3819d5906d6" TYPE="ext4" PARTUUID="08f6658f-7432-4a48-bdbd-0ee8f16d9b91"
and define the appropriate entry in /etc/fstab
. So, the content of that is now
$ cat /etc/fstab
UUID=3ce518e8-955d-4b26-9dde-c3819d5906d6 /home ext4 defaults 0 2
UUID=918a1f7d-b27c-4b82-8a10-ba0d622a37dd / ext4 errors=remount-ro 0 1
UUID=BA35-0600 /boot/efi vfat umask=0077 0 1
UUID=36a37d03-0ba7-4196-83ed-876e2782297e none swap sw 0 0
After running sudo mount -a
, I see that my home folder becomes empty and all files are disappeared.
$ ls /home/mahmood/
$
My previous files are missing however, they exist. Since the usage of /
in df -h
has not been changed.
Any quick solution?
ubuntu partition
add a comment |
I am using Ubutnu 18.04.
Currently, /home
is mounted on /
on an NVME disk according to df
command:
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p2 137G 113G 18G 87% /
...
The size of /dev/sda1
is 400GB which I want to use as my /home according to fdisk -l
:
Device Start End Sectors Size Type
/dev/sda1 1172275200 1953523711 781248512 372.5G Linux filesystem
Using the guides, I have to find the UUID of /dev/sda1
using blkid
/dev/sda1: UUID="3ce518e8-955d-4b26-9dde-c3819d5906d6" TYPE="ext4" PARTUUID="08f6658f-7432-4a48-bdbd-0ee8f16d9b91"
and define the appropriate entry in /etc/fstab
. So, the content of that is now
$ cat /etc/fstab
UUID=3ce518e8-955d-4b26-9dde-c3819d5906d6 /home ext4 defaults 0 2
UUID=918a1f7d-b27c-4b82-8a10-ba0d622a37dd / ext4 errors=remount-ro 0 1
UUID=BA35-0600 /boot/efi vfat umask=0077 0 1
UUID=36a37d03-0ba7-4196-83ed-876e2782297e none swap sw 0 0
After running sudo mount -a
, I see that my home folder becomes empty and all files are disappeared.
$ ls /home/mahmood/
$
My previous files are missing however, they exist. Since the usage of /
in df -h
has not been changed.
Any quick solution?
ubuntu partition
I am using Ubutnu 18.04.
Currently, /home
is mounted on /
on an NVME disk according to df
command:
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p2 137G 113G 18G 87% /
...
The size of /dev/sda1
is 400GB which I want to use as my /home according to fdisk -l
:
Device Start End Sectors Size Type
/dev/sda1 1172275200 1953523711 781248512 372.5G Linux filesystem
Using the guides, I have to find the UUID of /dev/sda1
using blkid
/dev/sda1: UUID="3ce518e8-955d-4b26-9dde-c3819d5906d6" TYPE="ext4" PARTUUID="08f6658f-7432-4a48-bdbd-0ee8f16d9b91"
and define the appropriate entry in /etc/fstab
. So, the content of that is now
$ cat /etc/fstab
UUID=3ce518e8-955d-4b26-9dde-c3819d5906d6 /home ext4 defaults 0 2
UUID=918a1f7d-b27c-4b82-8a10-ba0d622a37dd / ext4 errors=remount-ro 0 1
UUID=BA35-0600 /boot/efi vfat umask=0077 0 1
UUID=36a37d03-0ba7-4196-83ed-876e2782297e none swap sw 0 0
After running sudo mount -a
, I see that my home folder becomes empty and all files are disappeared.
$ ls /home/mahmood/
$
My previous files are missing however, they exist. Since the usage of /
in df -h
has not been changed.
Any quick solution?
ubuntu partition
ubuntu partition
edited 2 mins ago
GAD3R
25.4k1750106
25.4k1750106
asked 15 mins ago
mahmood
329720
329720
add a comment |
add a comment |
active
oldest
votes
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%2f491465%2fmounting-home-on-a-different-partition%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f491465%2fmounting-home-on-a-different-partition%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