Reinstall Linux with LVM partitions
Hello,
When Linux is installed with LVM partitions, if I want to reinstall Linux and need the information of a partition in the new installation, should the partitioning type in the new installation also be LVM? Thank you. |
You are doing a reinstall. Do you want to preserve one or more current file systems, or do a full reinstall?
A full reinstall gives you the option to reconfigure the storage to your liking and there is no reason to preserve the existing structure. If you want to preserve a current file system, you need to preserve AT LEAST the current structure as it contains or defines the current file system that you want to preserve. Actually my better advice would be to back up any file system you want to retain, and verify the backup. Then do that again on different media. This way, with two verified backups, you are assured that you can restore even if a backup device goes south on you. Then do a full install overwriting the old structure with whatever you have planned: then restore the backup so you have access to that data. Having those backups also protects you against the case that something goes bad during the install and ALL of your storage gets wiped! I have seen devices that have worked perfectly for years suddenly decide that maintenance day was the day to finally fail, and a backup protects you against that kind of thing. Get the backups first, then you can decide how to proceed from there at your leisure with less pressure. |
Indeed, one of the key advantages of LVM is that you don’t (!!) have to be concerned with the physical (drive and/or partition) arrangement, because “Linux file systems” never see it. They only see a “logical volume,” which lives in an endlessly-expandable “storage pool.” (Which can be re-configured “on the fly.” For instance, if that “failing drive” is generous enough to give you a little warning …)
When setting up your new environment, it can be “physically” configured any way you like. |
No, you can mix normal and LVM devices any way you want. Also, LVM volume is not a partition but more akin to loop device, but that's beside the point.
|
yes, LVM is not a partition type, but a way to manage partitions. You can install your OS with or without it.
|
as it name says. logical volume manager it's just helps to manage volumes
as Gemini AI says: Quote:
|
Hello,
Thanks for all the replies. Consider the following partitioning: Code:
# lsblk |
Just continue to use LVM. Eventually, you will be very glad you did.
|
Quote:
Quote:
|
Quote:
LVM is actually a physical storage, not virtual. It is a means of managing flexible storage without the limiting features of physical drives or partition sizes and adds the ability for storage in a single file system to span multiple physical drives seamlessly. I have been using LVM for many years, and I love the ability to add space and grow the file system seamlessly while the machine is in use. I use a raid array with LVM and have gradually grown from a measly 1 TB size to more than 10 TB on that raid array and never needed to be concerned about shutting down to do so. I have had drives fail and be replaced without problems with the raid, and I have had the file system grow as needed with more data storage, also without shutdown nor partitioning hassles. |
If you have, and will only ever have, a single physical drive that will never change then LVM works but provides little value. As soon as you are adding drives or moving storage (resizing partitions or file systems) then LVM is golden.
There is no reason to use it with ZFS or BTRFS, but if you are using EXT4 on RAID (physical or using MDADM) it can save you no end of complications. |
Quote:
Quote:
Quote:
|
Quote:
It is useful and powerful, and had you ever encountered a situation where it made the difference between a 12 hour outage maintenance and completing the change without outage on a Monday morning you would know that. That said, it is unclear if the situation justifies it for the OP. We have options now that make LVM less a requirement than an option. Also, his does not sound like a production environment and a short outage to make storage changes might be perfectly suitable for his operation. We cannot change that or determine that, we can only give information and allow the OP to make that judgement. More important here is that the OP wants to preserve some of the data. The best way, with or without LVM, is to back that data up. This also simplifies everything else the OP has planned. |
Quote:
|
Quote:
Quote:
|
All times are GMT -5. The time now is 04:36 AM. |