LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 02-18-2021, 06:55 AM   #1
efe373
LQ Newbie
 
Registered: Feb 2021
Posts: 5

Rep: Reputation: Disabled
Removal of Logical Volumes


Hello everyone,

I got a CentOS 8 computer in my workplace. It has 2 disks, 1 TB HDD and 512 GB SSD. However, these two disks are combined as a logical volume unfortunately... So, I do not have control over my disks. Therefore, I have decided to remove this logical volume, separate these two volumes and use them freely. However, I am very new to Linux systems. How can I do what I wanted? Here is the volumes using lvdisplay command:

Code:
[root@localhost /]# lvdisplay -v /dev/cl
  WARNING: Couldn't find device with uuid lE2U0K-Kcay-KVXJ-Luar-h0e7-PaqS-embgAe.
  WARNING: VG cl is missing PV lE2U0K-Kcay-KVXJ-Luar-h0e7-PaqS-embgAe (last written to /dev/sda1).
  WARNING: Couldn't find all devices for LV cl/home while checking used and assumed devices.
  --- Logical volume ---
  LV Path                /dev/cl/swap
  LV Name                swap
  VG Name                cl
  LV UUID                PpHVit-uTPP-1fdC-5Fxt-DLu3-JneD-3pW1N4
  LV Write Access        read/write
  LV Creation host, time localhost, 2021-01-27 16:04:28 +0300
  LV Status              available
  # open                 2
  LV Size                4.00 GiB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:1
   
  --- Logical volume ---
  LV Path                /dev/cl/home
  LV Name                home
  VG Name                cl
  LV UUID                A3XLtf-IV5i-1cE9-223B-5j9I-1k3O-s8272C
  LV Write Access        read/write
  LV Creation host, time localhost, 2021-01-27 16:04:28 +0300
  LV Status              available
  # open                 1
  LV Size                <1.30 TiB
  Current LE             340594
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:2
   
  --- Logical volume ---
  LV Path                /dev/cl/root
  LV Name                root
  VG Name                cl
  LV UUID                VWr53b-d2QR-5vFz-WY4g-BFOP-RKaR-8HvBll
  LV Write Access        read/write
  LV Creation host, time localhost, 2021-01-27 16:04:33 +0300
  LV Status              available
  # open                 1
  LV Size                70.00 GiB
  Current LE             17920
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:0

Thanks for support.

Efe

Last edited by efe373; 02-19-2021 at 04:52 AM.
 
Old 02-18-2021, 06:57 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Did you inherit the system in this state, or have you been attempting to "fix" this yourself already ?. If the latter what did you do ?. Let's see this
Code:
lsblk -f
[code] ... [/code] tags maintain layout in output as well as commands.
 
Old 02-19-2021, 01:48 AM   #3
efe373
LQ Newbie
 
Registered: Feb 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Did you inherit the system in this state, or have you been attempting to "fix" this yourself already ?. If the latter what did you do ?. Let's see this
Code:
lsblk -f
[code] ... [/code] tags maintain layout in output as well as commands.
Actually the answer is both. This machine came to me yesterday morning, and I have tried to "fix" it all day. Because I am a beginner I have the courage of ignorance, I tried to format the 1 TB HDD, but as you can guess it is failed due to system file in use. However, this morning I couldn't boot the machine even with the rescue kernel. Also, I have learned that the wrong version of the CentOS is installed. Therefore, I have decided to install the required version of CentOS myself. I also couldn't run the command you mentioned, sorry about that. Thanks for all help.
 
Old 02-19-2021, 04:35 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
What do you mean by "using disks freely"? What does LVM prevent you from doing? LVM makes your storage space usage very flexible and easy to manage compared to disks or disk partitions.

LVM reports a missing disk (and svg00 is trying to help you addressing this problem). If it were not missing, you would have to check if all filesystems fit one of the disks, perform a pvmove to "free" the other disk from LVM extents, then remove the "free" disk from the volume group with vgreduce. To remove LVM entirely, however, the best solution is to reinstall. Perhaps that is the best solution anyway, given the missing disk.
 
Old 02-19-2021, 04:50 AM   #5
efe373
LQ Newbie
 
Registered: Feb 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
What do you mean by "using disks freely"? What does LVM prevent you from doing? LVM makes your storage space usage very flexible and easy to manage compared to disks or disk partitions.

LVM reports a missing disk (and svg00 is trying to help you addressing this problem). If it were not missing, you would have to check if all filesystems fit one of the disks, perform a pvmove to "free" the other disk from LVM extents, then remove the "free" disk from the volume group with vgreduce. To remove LVM entirely, however, the best solution is to reinstall. Perhaps that is the best solution anyway, given the missing disk.
SSD and HDD are combined together to form LVM. Let's say I want to install a program that should run fast, then I should install it into SSD. But, SSD and HDD are merged as a LVM, how can I specify the installation location as SSD in this case? Doesn't LVM retain me from installing it "freely" to the intended location?
 
Old 02-19-2021, 10:10 AM   #6
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Program will not run faster from SSD, it may load (start) faster. Because programs do not run from drives, they run from RAM. If you look at computing history - this was the very reason why RAM was invented.
 
Old 02-19-2021, 11:51 AM   #7
efe373
LQ Newbie
 
Registered: Feb 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Program will not run faster from SSD, it may load (start) faster. Because programs do not run from drives, they run from RAM. If you look at computing history - this was the very reason why RAM was invented.
Yes, true.
 
Old 02-19-2021, 01:20 PM   #8
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by efe373 View Post
SSD and HDD are combined together to form LVM. Let's say I want to install a program that should run fast, then I should install it into SSD. But, SSD and HDD are merged as a LVM, how can I specify the installation location as SSD in this case? Doesn't LVM retain me from installing it "freely" to the intended location?
The two disks are "merged" in a volume group, but you can ask LVM to create a logical volume on a specific physical volume (i.e. disk or partition). You can even move an existing logical volume to a different physical volume, for example after adding a new fast disk to the volume group.

Last edited by berndbausch; 02-19-2021 at 01:23 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ? about "marking for removal" or "marking for complete removal" in synaptic pkg mgr Gregg Bell Linux - Newbie 5 03-06-2014 07:27 AM
Synaptic: "removal" vs. "complete removal" newbiesforever Linux - Software 2 08-24-2008 08:31 PM
I did not know about logical volumes gezi Linux - Newbie 5 04-27-2005 09:26 AM
FC3 slow boot: scans logical volumes..? tardigrade Fedora 1 04-03-2005 01:45 AM
how to read the output of df -k and about logical volumes commands jdara1 Linux - Software 3 05-23-2003 12:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 11:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration