On 1/9/19 1:22 PM, basti wrote:
Hello, I have create a software raid level 1 with mdadm.
One drive is a "classic" HDD. The 2'nd drive is a SSD with option
"write-mostly".
Over the raid I have create and LVM with all the partitions
(root,swap and qemu/KVM VM's).
When I understand mdadm the hole space is marked as used. So my
question is how useful is fstrim on /dev/mdx and would it relay trim
the SSD?
Best Regards,
On 1/9/19 3:51 PM, Pascal Hambourg wrote:
Why did you flag the SSD as write-mostly ? I would have expected the
opposite.
+1 RTFM mdadm(8), --write-mostly would make more sense on the HDD.
But, one SSD and one HDD in an MD mirror seems strange. If mirroring is
not required, I would:
1. Partition the SSD with boot, swap, root, and VM partitions. Give
each VM a small virtual drive image file for its system drive.
2. Put one large partition on the HDD. Give each VM a virtual drive
image file, sized as required, for its data drive.
If you can install an additional SSD, mirror the two SSD's. Similarly
so for an additional HDD.
In any case:
1. Try to characterize your I/O workload -- synchronous vs.
asynchronous, read vs. write, sequential vs. random, small vs. large.
2. Configure things to use asynchronous I/O, where possible.
3. Install plenty of RAM.
4. Try multiple configurations and benchmark each, preferably with
realistic workloads.
David