Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was assigned a revision server with centos 7 and when I checked it, I have seen that they have created three logical volumes and each volume has directories with files. When checking the requirements, they told me that they had created them by mistake and they do not want the logical volumes. Now they want you to delete all the logical volumes and leave the directories and the content. Is it possible to do it without having to reinstall the operating system again?
Hi, I want to delete all the LMVs and move them to the directories with the files to a USB without destroying the system and then recover the space by uploading the directories but without volumes in the recovered space
Sure you can. Back it all up, delete the lvs, vgs, pvs to recover the space, then recreate the directories with the correct permissions and restore.
Then wait for things to fill up and start planning to use LVM to avoid the space issues in future.
Or tell them they obviously should stay out of admin work, and let you do your job. Simply resize the LVM components if space is actually needed for filesystems outside of LVM. Or plan to move all that stuff under LVM for simpler management ...
There is no method to convert LVM back to normal partitions. As stated you need to backup everything and also right down the UUIDs from the output of the blkid command.
Using a live or rescue mode cd/usb delete the LVM partition and recreate /(root) and swap and /lab partitions using the UUIDs from above. Restore your backup and then I believe you will need to reinstall grub. Depending on the effort it takes to setup the server it might be easier to reinstall without LVM and the restore your backups.
There is no method to convert LVM back to normal partitions.
For simple LVs with no special options (no mirroring, thin pool, etc) confined to a single PV and never changed from their initial creation, it's really just a matter of creating partition table entries for the regions where the filesystems are stored. But this involves some low-level fiddling and falls in the category of, "If you have to ask, you really shouldn't be attempting it."
Note that your boot files and /etc/fstab may contain references to the current VGs and LVs, and you will have to fix those regardless of how you go about the disk reconfiguration.
Last edited by rknichols; 10-03-2018 at 10:51 AM.
Reason: Add "Note that ..."
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.