Can LVM help to separate `/home` and `/` in the same partition for protecting one from the other?












1















I installed Lubuntu without partitioning my hard drive. Now there is one partition for UEFI, and one partition for anything else on the hard drive, wherein there is a swap file half size of my RAM.





  1. I heard that it is important to separate /home and / into different partitions? For example, for protection of the data in /home, in case something goes wrong in /. Correct?



    If yes, can LVM help to separate the current /home and / on my disk for that purpose, given that /home and / are in the same partition right now?



  2. I also consider if it is worth to create a swap partition twice size as my RAM, for suspending Lubuntu purpose. Can LVM also help to create a swap partition on top of the partition?



I haven't used LVM before, so just want to know if LVM can help to solve the above two problems without the hassle of repartitioning the hard drive? Or do I have to repartition my hard drive into a partition for / and a partition for /home, most likely by reinstalling Lubuntu?



Thanks.



$ sudo parted -l
[sudo] password for t:
Model: ATA TOSHIBA MQ01ABF0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 500GB 500GB ext4


$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.7G 0 1.7G 0% /dev
tmpfs 340M 1.3M 338M 1% /run
/dev/sda2 457G 6.5G 428G 2% /
tmpfs 1.7G 0 1.7G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.7G 0 1.7G 0% /sys/fs/cgroup
/dev/sda1 511M 6.1M 505M 2% /boot/efi
tmpfs 340M 20K 340M 1% /run/user/1000









share|improve this question

























  • There's all sorts of discussion about this very subject, and most of it gets marked as "primarily opinion based" I ran for a long time with just a single partition - it works well. I now keep "/home" in a separate partition, because I can tell Ubuntu to erase "/" and reinstall, without affected the files in "/home". You should consider a backup plan (regular backups) to protect the data in "/home".

    – Charles Green
    Feb 21 at 0:07











  • I am asking about if LVM can help to solve my problem. But your comment doesn't even mention LVM. How is that opinion based? Please retract your close vote if it was you. Thank you!

    – Tim
    Feb 21 at 0:14








  • 1





    LVM can help, but it's not required for what you are trying to do. But the big part of your question seems to be "Is it important to separate /home and / into different partitions? For example, for protection of the data in /home, in case something goes wrong in /?"

    – Charles Green
    Feb 21 at 0:17











  • Please try to re-understand my post. I have already installed everything into a single partition, now I want to protect / and /home from each other, can LVM help or do I need to repartition the hard drive into a partition for / and a partition for /home (most likely by reinstalling Lubuntu)?

    – Tim
    Feb 21 at 0:18








  • 1





    You don't have a lot of data on your system yet, it will probably be easier to re-install - You can add LVM at that point if you decide you need it. LVM can manage all of this for you, but it may be like driving a dump truck, when you need a pickup truck.

    – Charles Green
    Feb 21 at 0:29
















1















I installed Lubuntu without partitioning my hard drive. Now there is one partition for UEFI, and one partition for anything else on the hard drive, wherein there is a swap file half size of my RAM.





  1. I heard that it is important to separate /home and / into different partitions? For example, for protection of the data in /home, in case something goes wrong in /. Correct?



    If yes, can LVM help to separate the current /home and / on my disk for that purpose, given that /home and / are in the same partition right now?



  2. I also consider if it is worth to create a swap partition twice size as my RAM, for suspending Lubuntu purpose. Can LVM also help to create a swap partition on top of the partition?



I haven't used LVM before, so just want to know if LVM can help to solve the above two problems without the hassle of repartitioning the hard drive? Or do I have to repartition my hard drive into a partition for / and a partition for /home, most likely by reinstalling Lubuntu?



Thanks.



$ sudo parted -l
[sudo] password for t:
Model: ATA TOSHIBA MQ01ABF0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 500GB 500GB ext4


$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.7G 0 1.7G 0% /dev
tmpfs 340M 1.3M 338M 1% /run
/dev/sda2 457G 6.5G 428G 2% /
tmpfs 1.7G 0 1.7G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.7G 0 1.7G 0% /sys/fs/cgroup
/dev/sda1 511M 6.1M 505M 2% /boot/efi
tmpfs 340M 20K 340M 1% /run/user/1000









share|improve this question

























  • There's all sorts of discussion about this very subject, and most of it gets marked as "primarily opinion based" I ran for a long time with just a single partition - it works well. I now keep "/home" in a separate partition, because I can tell Ubuntu to erase "/" and reinstall, without affected the files in "/home". You should consider a backup plan (regular backups) to protect the data in "/home".

    – Charles Green
    Feb 21 at 0:07











  • I am asking about if LVM can help to solve my problem. But your comment doesn't even mention LVM. How is that opinion based? Please retract your close vote if it was you. Thank you!

    – Tim
    Feb 21 at 0:14








  • 1





    LVM can help, but it's not required for what you are trying to do. But the big part of your question seems to be "Is it important to separate /home and / into different partitions? For example, for protection of the data in /home, in case something goes wrong in /?"

    – Charles Green
    Feb 21 at 0:17











  • Please try to re-understand my post. I have already installed everything into a single partition, now I want to protect / and /home from each other, can LVM help or do I need to repartition the hard drive into a partition for / and a partition for /home (most likely by reinstalling Lubuntu)?

    – Tim
    Feb 21 at 0:18








  • 1





    You don't have a lot of data on your system yet, it will probably be easier to re-install - You can add LVM at that point if you decide you need it. LVM can manage all of this for you, but it may be like driving a dump truck, when you need a pickup truck.

    – Charles Green
    Feb 21 at 0:29














1












1








1








I installed Lubuntu without partitioning my hard drive. Now there is one partition for UEFI, and one partition for anything else on the hard drive, wherein there is a swap file half size of my RAM.





  1. I heard that it is important to separate /home and / into different partitions? For example, for protection of the data in /home, in case something goes wrong in /. Correct?



    If yes, can LVM help to separate the current /home and / on my disk for that purpose, given that /home and / are in the same partition right now?



  2. I also consider if it is worth to create a swap partition twice size as my RAM, for suspending Lubuntu purpose. Can LVM also help to create a swap partition on top of the partition?



I haven't used LVM before, so just want to know if LVM can help to solve the above two problems without the hassle of repartitioning the hard drive? Or do I have to repartition my hard drive into a partition for / and a partition for /home, most likely by reinstalling Lubuntu?



Thanks.



$ sudo parted -l
[sudo] password for t:
Model: ATA TOSHIBA MQ01ABF0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 500GB 500GB ext4


$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.7G 0 1.7G 0% /dev
tmpfs 340M 1.3M 338M 1% /run
/dev/sda2 457G 6.5G 428G 2% /
tmpfs 1.7G 0 1.7G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.7G 0 1.7G 0% /sys/fs/cgroup
/dev/sda1 511M 6.1M 505M 2% /boot/efi
tmpfs 340M 20K 340M 1% /run/user/1000









share|improve this question
















I installed Lubuntu without partitioning my hard drive. Now there is one partition for UEFI, and one partition for anything else on the hard drive, wherein there is a swap file half size of my RAM.





  1. I heard that it is important to separate /home and / into different partitions? For example, for protection of the data in /home, in case something goes wrong in /. Correct?



    If yes, can LVM help to separate the current /home and / on my disk for that purpose, given that /home and / are in the same partition right now?



  2. I also consider if it is worth to create a swap partition twice size as my RAM, for suspending Lubuntu purpose. Can LVM also help to create a swap partition on top of the partition?



I haven't used LVM before, so just want to know if LVM can help to solve the above two problems without the hassle of repartitioning the hard drive? Or do I have to repartition my hard drive into a partition for / and a partition for /home, most likely by reinstalling Lubuntu?



Thanks.



$ sudo parted -l
[sudo] password for t:
Model: ATA TOSHIBA MQ01ABF0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 500GB 500GB ext4


$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.7G 0 1.7G 0% /dev
tmpfs 340M 1.3M 338M 1% /run
/dev/sda2 457G 6.5G 428G 2% /
tmpfs 1.7G 0 1.7G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.7G 0 1.7G 0% /sys/fs/cgroup
/dev/sda1 511M 6.1M 505M 2% /boot/efi
tmpfs 340M 20K 340M 1% /run/user/1000






partitioning lvm






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 21 at 0:21







Tim

















asked Feb 20 at 23:46









TimTim

8,25043105178




8,25043105178













  • There's all sorts of discussion about this very subject, and most of it gets marked as "primarily opinion based" I ran for a long time with just a single partition - it works well. I now keep "/home" in a separate partition, because I can tell Ubuntu to erase "/" and reinstall, without affected the files in "/home". You should consider a backup plan (regular backups) to protect the data in "/home".

    – Charles Green
    Feb 21 at 0:07











  • I am asking about if LVM can help to solve my problem. But your comment doesn't even mention LVM. How is that opinion based? Please retract your close vote if it was you. Thank you!

    – Tim
    Feb 21 at 0:14








  • 1





    LVM can help, but it's not required for what you are trying to do. But the big part of your question seems to be "Is it important to separate /home and / into different partitions? For example, for protection of the data in /home, in case something goes wrong in /?"

    – Charles Green
    Feb 21 at 0:17











  • Please try to re-understand my post. I have already installed everything into a single partition, now I want to protect / and /home from each other, can LVM help or do I need to repartition the hard drive into a partition for / and a partition for /home (most likely by reinstalling Lubuntu)?

    – Tim
    Feb 21 at 0:18








  • 1





    You don't have a lot of data on your system yet, it will probably be easier to re-install - You can add LVM at that point if you decide you need it. LVM can manage all of this for you, but it may be like driving a dump truck, when you need a pickup truck.

    – Charles Green
    Feb 21 at 0:29



















  • There's all sorts of discussion about this very subject, and most of it gets marked as "primarily opinion based" I ran for a long time with just a single partition - it works well. I now keep "/home" in a separate partition, because I can tell Ubuntu to erase "/" and reinstall, without affected the files in "/home". You should consider a backup plan (regular backups) to protect the data in "/home".

    – Charles Green
    Feb 21 at 0:07











  • I am asking about if LVM can help to solve my problem. But your comment doesn't even mention LVM. How is that opinion based? Please retract your close vote if it was you. Thank you!

    – Tim
    Feb 21 at 0:14








  • 1





    LVM can help, but it's not required for what you are trying to do. But the big part of your question seems to be "Is it important to separate /home and / into different partitions? For example, for protection of the data in /home, in case something goes wrong in /?"

    – Charles Green
    Feb 21 at 0:17











  • Please try to re-understand my post. I have already installed everything into a single partition, now I want to protect / and /home from each other, can LVM help or do I need to repartition the hard drive into a partition for / and a partition for /home (most likely by reinstalling Lubuntu)?

    – Tim
    Feb 21 at 0:18








  • 1





    You don't have a lot of data on your system yet, it will probably be easier to re-install - You can add LVM at that point if you decide you need it. LVM can manage all of this for you, but it may be like driving a dump truck, when you need a pickup truck.

    – Charles Green
    Feb 21 at 0:29

















There's all sorts of discussion about this very subject, and most of it gets marked as "primarily opinion based" I ran for a long time with just a single partition - it works well. I now keep "/home" in a separate partition, because I can tell Ubuntu to erase "/" and reinstall, without affected the files in "/home". You should consider a backup plan (regular backups) to protect the data in "/home".

– Charles Green
Feb 21 at 0:07





There's all sorts of discussion about this very subject, and most of it gets marked as "primarily opinion based" I ran for a long time with just a single partition - it works well. I now keep "/home" in a separate partition, because I can tell Ubuntu to erase "/" and reinstall, without affected the files in "/home". You should consider a backup plan (regular backups) to protect the data in "/home".

– Charles Green
Feb 21 at 0:07













I am asking about if LVM can help to solve my problem. But your comment doesn't even mention LVM. How is that opinion based? Please retract your close vote if it was you. Thank you!

– Tim
Feb 21 at 0:14







I am asking about if LVM can help to solve my problem. But your comment doesn't even mention LVM. How is that opinion based? Please retract your close vote if it was you. Thank you!

– Tim
Feb 21 at 0:14






1




1





LVM can help, but it's not required for what you are trying to do. But the big part of your question seems to be "Is it important to separate /home and / into different partitions? For example, for protection of the data in /home, in case something goes wrong in /?"

– Charles Green
Feb 21 at 0:17





LVM can help, but it's not required for what you are trying to do. But the big part of your question seems to be "Is it important to separate /home and / into different partitions? For example, for protection of the data in /home, in case something goes wrong in /?"

– Charles Green
Feb 21 at 0:17













Please try to re-understand my post. I have already installed everything into a single partition, now I want to protect / and /home from each other, can LVM help or do I need to repartition the hard drive into a partition for / and a partition for /home (most likely by reinstalling Lubuntu)?

– Tim
Feb 21 at 0:18







Please try to re-understand my post. I have already installed everything into a single partition, now I want to protect / and /home from each other, can LVM help or do I need to repartition the hard drive into a partition for / and a partition for /home (most likely by reinstalling Lubuntu)?

– Tim
Feb 21 at 0:18






1




1





You don't have a lot of data on your system yet, it will probably be easier to re-install - You can add LVM at that point if you decide you need it. LVM can manage all of this for you, but it may be like driving a dump truck, when you need a pickup truck.

– Charles Green
Feb 21 at 0:29





You don't have a lot of data on your system yet, it will probably be easier to re-install - You can add LVM at that point if you decide you need it. LVM can manage all of this for you, but it may be like driving a dump truck, when you need a pickup truck.

– Charles Green
Feb 21 at 0:29










0






active

oldest

votes












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%2f1119975%2fcan-lvm-help-to-separate-home-and-in-the-same-partition-for-protecting-on%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















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%2f1119975%2fcan-lvm-help-to-separate-home-and-in-the-same-partition-for-protecting-on%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

How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

is 'sed' thread safe

How to make a Squid Proxy server?