Raid 1 is simply giving you
redundancy. When, not if, it breaks, theoretically both shouldn't
fail. I have heard of instances where masses of drives in a dc
all purchased the same time began all failing, taking out clusters
as more than 1 disk was dying without any hot standby, etc.
LVM is giving you flexibility. I don't fully preprovision all the
space on the disk, but I do give it to lvm in the form of a
physical volume. I then create raid, var, var/log, usr, home,
whatever at a certain size. If I outgrow one, I do an lvextend,
add data, resize2fs to grow the ext partition, and done. Usually
I end up only growing home, var, or my ext0 that I use for a dump
of vm images and my opt directory symlinks there.
Shouldn't matter as long as they're comparable, ie. both like
samsung 840's.
Here's what my config looks like in use:
mb@hostname ~ $ lsblk
NAME MAJ:MIN RM SIZE RO TYPE
MOUNTPOINT
sda 8:0 0 477G 0 disk
├─sda1 8:1 0 250M 0 part
│ └─md127 9:127 0 249.8M 0 raid1
/boot
└─sda2 8:2 0 476.7G 0 part
└─md126 9:126 0 476.6G 0 raid1
└─spv0 (dm-0) 252:0 0 476.6G 0 crypt
├─hostname--vg0-root0 (dm-1) 252:1 0 3G 0 lvm /
├─hostname--vg0-swap0 (dm-2) 252:2 0 3G 0 lvm
[SWAP]
├─hostname--vg0-usr0 (dm-3) 252:3 0 9G 0 lvm
/usr
├─hostname--vg0-var0 (dm-4) 252:4 0 3G 0 lvm
/var
├─hostname--vg0-varlog0 (dm-5) 252:5 0 1G 0 lvm
/var/log
├─hostname--vg0-home0 (dm-6) 252:6 0 64G 0 lvm
/home
└─hostname--vg0-ext0 (dm-7) 252:7 0 128G 0 lvm
/mnt/ext0
sdb 8:16 0 477G 0 disk
├─sdb1 8:17 0 250M 0 part
│ └─md127 9:127 0 249.8M 0 raid1
/boot
└─sdb2 8:18 0 476.7G 0 part
└─md126 9:126 0 476.6G 0 raid1
└─spv0 (dm-0) 252:0 0 476.6G 0 crypt
├─hostname--vg0-root0 (dm-1) 252:1 0 3G 0 lvm /
├─hostname--vg0-swap0 (dm-2) 252:2 0 3G 0 lvm
[SWAP]
├─hostname--vg0-usr0 (dm-3) 252:3 0 9G 0 lvm
/usr
├─hostname--vg0-var0 (dm-4) 252:4 0 3G 0 lvm
/var
├─hostname--vg0-varlog0 (dm-5) 252:5 0 1G 0 lvm
/var/log
├─hostname--vg0-home0 (dm-6) 252:6 0 64G 0 lvm
/home
└─hostname--vg0-ext0 (dm-7) 252:7 0 128G 0 lvm
/mnt/ext0
-mb
On 09/04/2014 10:19 AM, Mark Phillips wrote:
Michael,
Thanks again for your comments, they are very helpful. I
have been googling RAID1 and LVM and finding lots of good
information.
I really like your idea of a RAID1 for the two SSDs. Does
it matter if one is msata and one is not?
I am trying to decide on the merits of using LVM with the
RAID1, since I only have 1 disk and I normally don't partition
it so I don't have to worry about running our of space until
the disk is almost full. Could you explain to me the benefit
of using LVM + RAID1 for these two drives? How would you
partition the drives? My current drive has about 420 GB of
data in /home, about 9GB in /opt, and some misc stuff in /var,
all of which I need to transfer that to the new system.
Thanks,
Mark
P.S. One benefit of using both LVM and RAID1 is learning
something new! ;)