You are not logged in.

#1 2015-04-09 13:17:22

malymichu
Member
Registered: 2015-04-09
Posts: 2

LVM configuration for multiple distros

Hi,
I bought new laptop and I would like to start using encrypted LVM now.
That's what I would like to get:
1. Debian and Arch linux distros
2. Each OS should have own /var and /home partitions
3. Space for shared files
3. Encryption for all partitions, beside /boot of course

Now I have problems:
1. In laptop I have two phisical disks: 128GB SSD and 500GB HDD. - LVM dont care about speed of discs.
2. Using multiple LVM grous i would have to enter multiple passwords.
3. Im afraid, that some problems with sharing files may occur across my partitions (Arch with Debian, Arch and Debian with partition for shared files on HDD).

In my head all of this look like that:
-- SSD disk
/boot
-- 1 LVM group --
/ Debian
/home for Debian
/var for Debian
-- 2 LVM group --
/ Arch linux
/home for Arch linux
/var for Arch linux
-- 3 LVM group
/swap for hibernation

-- HDD disk
-- 4 LVM group
/shared_files
/backups
/virtual_machines

Any ideas how it should look in real world?

Offline

#2 2015-04-09 13:32:52

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: LVM configuration for multiple distros

When you have multiple PVs in a VG, you can specify one during LV creation and the LV will be 'placed there' if enough space is available. So I'd recommend just one VG spanning both disks.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2015-04-09 17:04:19

malymichu
Member
Registered: 2015-04-09
Posts: 2

Re: LVM configuration for multiple distros

One VG spanning both disks make everything much easier.
But how do I place my LV? While creating LVs I will have to count sectors and tell each LVs where to start and end. Right? In VG frontier between PV don't exist, or wont be pointed so I could place my LVs according to it. Or maybe there is easier way to place some LV on first PVs, and some LVs on second PVs?
Maybe I should create two VG. One for each PV. Next create LVs – some in group on SSD, other in group placed in HDD. After that I can merge two VG what should give me LVs places precisely where I would like to.

Offline

#4 2015-04-09 18:28:28

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: LVM configuration for multiple distros

But how do I place my LV?

Easy, just add the path to the physical volume to the end of the lvcreate command eg.:

lvcreate -L 10G -n archroot my_vg /dev/sda2

There are also a couple ways to tell exactly how the space on each PV is used so you can confirm it worked.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

Board footer

Powered by FluxBB