Is it possible to create LVM partitions for both SSD and SATA hard disks? I mean if there isn't any conflicts.
Asked
Active
Viewed 3,599 times
3 Answers
5
LVM doesn't care what the underlying block devices are so you can mix any physical devices, or even software raid devices and it just works.

StarNamer
- 3,162
-
3Can LVM arrange that data often accessed is put on SSD and data rarely accessed is in hard disk? – user4951 Jan 24 '13 at 10:14
-
As far as I know, no. LVM just treats a Volume Group as a contiguous block of space and doesn't care what the underlying physical devices are. – StarNamer Jan 25 '13 at 10:59
-
1@JimThio No, LVM tries to minimize "fragmentation", even on ssds (although in the case of the LVM it is not suboptimal, because there much fewer "files" (volumes) as in an FS and they change relatively seldom their size). But you can create cache logical volumes ( http://man7.org/linux/man-pages/man7/lvmcache.7.html ), which enables you to cache a slower HDD with a faster SSD. – peterh Aug 01 '15 at 01:30
4
I don't see any points on doing so, you want a Volume Group that contains both SATA and SSD, that's possible.
Just create multiple PVs, with pvcreate /dev/partition_name
And create a volume group that use those PVs, with vgcreate
And do the partition of that VG.

daisy
- 54,555
-
1How would TRIM be managed? Would the OS optimize io based on type of disk? Or is LVM blind to this? – Gabriel Fair Feb 17 '18 at 19:13