Discussion:
[linux-lvm] Question on mixing technologies
Georges Giralt
2017-05-12 16:21:28 UTC
Permalink
Hello guys,

I've an Ubuntu machine with two SATA mechanical drives on software raid 1.

This md is the sole PV of the LVM installation.

As the mainboard has been changed recently, it has an M.2 plug. And I'm
been offered a 128 GB M.2 NGFF card.

So far so good.

Question : Will I gain something adding the M.2 card as a second PV on
my LVM setup and moving the system LV to it ?

What are your experience on the subject ?

Many thanks in advance for your advice !
--
"If a man empties his purse into his head, no man can take it away from him.
An investment in knowledge always pays the best interest"


Benjamin Franklin.
Gionatan Danti
2017-05-13 12:16:18 UTC
Permalink
You basically have two possibilities:

1) move the root fs on the M.2 disk, which will give you much higher
system responsiveness compared to the mechanical disks; however, any
data/application installed on the HDD will be slow as always;

2) configure lvmcache [1] for using the M.2 disk as a read-only
(writethrough) caching device for the mechanical disks, which will give
you somewhat lesser system responsiveness but *any* cache-friendly
application will be accelerated from the M.2 disk.

[1] http://man7.org/linux/man-pages/man7/lvmcache.7.html

Regards.
Post by Georges Giralt
Hello guys,
I've an Ubuntu machine with two SATA mechanical drives on software raid 1.
This md is the sole PV of the LVM installation.
As the mainboard has been changed recently, it has an M.2 plug. And
I'm been offered a 128 GB M.2 NGFF card.
So far so good.
Question : Will I gain something adding the M.2 card as a second PV on
my LVM setup and moving the system LV to it ?
What are your experience on the subject ?
Many thanks in advance for your advice !
--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: ***@assyoma.it - ***@assyoma.it
GPG public key ID: FF5F32A8
Georges Giralt
2017-05-31 06:53:49 UTC
Permalink
Thank you, Gionatan for your answer.

I finally had time to test the first solution, having the root FS on the
M.2 card and everything else (including /var and /tmp) on the mechanical
drives.

The responsiveness of the machine is awesome and, for now, without any
glitch or problem. So I may retain this solution.

The only remaining question is how to trim the device as it is not
"mounted". Is there a special pvcreate or LVM option to have this device
trimmed when it should be ?

Have a nicce day !
Post by Gionatan Danti
1) move the root fs on the M.2 disk, which will give you much higher
system responsiveness compared to the mechanical disks; however, any
data/application installed on the HDD will be slow as always;
2) configure lvmcache [1] for using the M.2 disk as a read-only
(writethrough) caching device for the mechanical disks, which will
give you somewhat lesser system responsiveness but *any*
cache-friendly application will be accelerated from the M.2 disk.
[1] http://man7.org/linux/man-pages/man7/lvmcache.7.html
Regards.
Post by Georges Giralt
Hello guys,
I've an Ubuntu machine with two SATA mechanical drives on software raid 1.
This md is the sole PV of the LVM installation.
As the mainboard has been changed recently, it has an M.2 plug. And
I'm been offered a 128 GB M.2 NGFF card.
So far so good.
Question : Will I gain something adding the M.2 card as a second PV on
my LVM setup and moving the system LV to it ?
What are your experience on the subject ?
Many thanks in advance for your advice !
--
"If a man empties his purse into his head, no man can take it away from him.
An investment in knowledge always pays the best interest"


Benjamin Franklin.
Xen
2017-05-31 09:23:43 UTC
Permalink
Post by Georges Giralt
The only remaining question is how to trim the device as it is not
"mounted". Is there a special pvcreate or LVM option to have this
device trimmed when it should be ?
It is definitely mounted if your root is on it.

Regards.
Stuart Gathman
2017-06-01 00:31:23 UTC
Permalink
Post by Georges Giralt
I finally had time to test the first solution, having the root FS on
the M.2 card and everything else (including /var and /tmp) on the
mechanical drives.
The responsiveness of the machine is awesome and, for now, without any
glitch or problem. So I may retain this solution.
The only remaining question is how to trim the device as it is not
"mounted". Is there a special pvcreate or LVM option to have this
device trimmed when it should be ?
# fstrim /
Georges Giralt
2017-11-03 08:19:10 UTC
Permalink
Hello !

Here I'm again.

I've played a bit more with my setup.

I've changed two computers : a server having got a new mainboard with an
M.2 plug, In it I installed a NVME SSD card.

On this machine, I created a PV onto this device and added this PV to
the VG holding the system. I then did pvmove to place the lv containing
/ and /usr to the SSD. Perfect !

The server is really highly responsive and, as the /var and /tmp are
still on mechanical drives I hope the SSD will be long lived.

On my laptop, the SSD has been used for the / and /usr outside of LVM
(the laptop had already a GPT disk and I decided not to use LVM at all).

I can't compare the behavior because of the huge difference between the
two machines, but I'm really happy with both settings.

Thnks for your help.
Post by Stuart Gathman
Post by Georges Giralt
I finally had time to test the first solution, having the root FS on
the M.2 card and everything else (including /var and /tmp) on the
mechanical drives.
The responsiveness of the machine is awesome and, for now, without any
glitch or problem. So I may retain this solution.
The only remaining question is how to trim the device as it is not
"mounted". Is there a special pvcreate or LVM option to have this
device trimmed when it should be ?
# fstrim /
_______________________________________________
linux-lvm mailing list
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
--
"If a man empties his purse into his head, no man can take it away from him.
An investment in knowledge always pays the best interest"


Benjamin Franklin.
Continue reading on narkive:
Loading...