LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-20-2019, 07:07 AM   #1
FranekW
Member
 
Registered: Apr 2017
Distribution: Manjaro and Ubuntu
Posts: 30

Rep: Reputation: Disabled
Rearrangin partitions with LVM for another distro


Hi,

I have currently Windows 7 and CenOS 7 installed. They are fairly split half by half. Windows is on the first two primary partitions, CentOS'es `/boot` is mounted to the third primary partition. CentOS other folders `/`. `/home`, etc. are simply on a the fifth partition which in turn is on the extended partition (4th). Also, CentOS uses LVM. Essentially there are 5 partictions but 4th is extended and 5th is inside the extended one.

I would like to get rid of Windows and use that half space somehow clever with another linux distro. I am thinking either Fedora, Ubuntu. This is the plan to:

* change CentOS'es boot partition to have 1GB and move it to the beginning of disk
* create another boot partition for the other Linux distribution; another 1GB
* resize alredy created 5th partition to use remaining space

Because both systems will be Linux I was also thinking to rearrange LVM so that I would have:
* two separate partitions for /root folders which linux distributions would use
* have a partition for /home which would be shared between distributions.

I think CenOS is installed on XFS. I am not sure how to proceed after removing windows. Are there any programs than can move / resize partitions without losing data?

Thanks.
 
Old 02-20-2019, 07:21 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,154

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
I would suggest you think some more:
- what is the point of increasing the CentOS /boot partition ?.
- LVM is designed to give you flexibility without the need to resize partitions .
- LVM doesn't use partitions for filesystems, it uses lvs. Be careful with nomenclature.
- sharing home is iffy when different version of the same program (say firefox) are accessing it. Better to share a say /data partition for things like Documents, Pictures, Downloads. {u,g}id mismatch is also a potential problem.

Post the following output
Code:
df -hT
lsblk -f
sudo parted /dev/sda "print free"
 
Old 02-20-2019, 08:11 AM   #3
FranekW
Member
 
Registered: Apr 2017
Distribution: Manjaro and Ubuntu
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
- what is the point of increasing the CentOS /boot partition ?.
To keep a greater number of previous kernels, which sometimes may be life saving. That's what I have been reading

Quote:
Originally Posted by syg00 View Post
- LVM is designed to give you flexibility without the need to resize partitions.
Yes, I know but if I have free space after removing windows, I'd like to fill that space somehow. I thought I might add another physical volume to the group and then rearrange logical volumes. I don't know if I can mix things in primary and extended partitions.

Quote:
Originally Posted by syg00 View Post
- LVM doesn't use partitions for filesystems, it uses lvs. Be careful with nomenclature.
- sharing home is iffy when different version of the same program (say firefox) are accessing it. Better to share a say /data partition for things like Documents, Pictures, Downloads. {u,g}id mismatch is also a potential problem.
Ok. That's the thing I did not know. Thanks.

Last edited by FranekW; 02-21-2019 at 07:19 AM.
 
Old 02-21-2019, 04:28 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,154

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
3 kernels should be plenty. On my test system I keep 8, but that includes my personal build kernels.
As for the space you free up by deleting Windows, simply make a pv on all that space - add that pv to your vg, then you can use it all as you wish.. Makes no difference if it's primary or logical partition once you do the pvcreate.

Basically the less you go moving stuff around unnecessarily, the less opportunity for you to screw things up.
Be warned by one who knows ...

Last edited by syg00; 02-21-2019 at 04:30 AM. Reason: Basically ...
 
Old 02-21-2019, 07:38 AM   #5
FranekW
Member
 
Registered: Apr 2017
Distribution: Manjaro and Ubuntu
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Basically the less you go moving stuff around unnecessarily, the less opportunity for you to screw things up.
Be warned by one who knows ...
I was hoping for that easy solution! As long as I can use free space and add it to the already existing vg, I am going to just create another pv. How hard is it to rearrange an existing lv and add new ones? This may need shrinking and adding lvs. Shall I do it as root?

EDIT. Is it possible that two distributions can sue the same LVM?

Last edited by FranekW; 02-21-2019 at 07:43 AM.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM Partitions are equals to OS partitions? xeon123 Linux - Newbie 1 05-26-2011 06:45 PM
How to multiboot distros from LVM and/or Non-LVM partitions? kennybobby Fedora 2 12-07-2010 06:58 AM
LXer: Back Up (And Restore) LVM Partitions With LVM Snapshots LXer Syndicated Linux News 0 04-17-2007 11:16 AM
how do I add partitions to drives that have Logical Volume (LVM) partitions? The MJ Linux - Software 5 08-17-2006 06:15 PM
Partitions, partitions, partitions..... Clueless in VA Linux - Newbie 7 08-08-2001 03:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:06 PM.

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