Jarry wrote:
Hi,
I'm going to re-install gentoo on a small hobby-server and because
I need both redundancy and flexibility, I thought in addition to
raid1 (2x 160GB ata-disk) this time I would also use lvm2:
/dev/md0 /boot (~50MB)
/dev/md1 / (2GB)
/dev/md2 <swap> (2GB)
/dev/md3 lvm2 (rest for /var /tmp /usr /opt /chroot /home)
That's how I typically setup my small office servers. I create about 6
LVM volumes during the initial installation. The downside is that it
makes recovery more difficult (additional volumes that have to be
mounted). I've also done a server where I made the root volume larger
(16-24GB) and didn't bother with LVM2 during the initial install.
I also have a server where I did something slightly trickier with
RAID1/LVM2:
hda1+hdc1 -> /dev/md0 /boot (~128MB)
hda2+hdc2 -> /dev/md1 (swap) (2GB)
hda3+hdc3 -> /dev/md2 / (root) (16GB)
hda4 -> /music (rest of disk), non-redundant
hdc4 -> /musicbackup (rest of disk, non-redundant)
Every few days (whenever I add new music), I update the contents of
/musicbackup with what is stored on /music, then unmount /musicbackup
again. So, accidental deletions in my /music folder become easy to
recover from. And I don't care if my music is offline for a few
hours/days before I can swap in a new drive.
Is this generaly advisable solution (lvm2 over raid1), or is there
some risk in using raid1 together with lvm2 ?
The only issue I've heard *rumor* of is that 2.6.14 kernels may not be
playing nicely with LVM2. (I'm using 2.6.13 on my servers at the
moment.) One of these days, I'll update to 2.6.14 and find out for sure.
One more question concerning partition type:
If I want to use raid1, I have to set all those 2x4 (hda+hdc) primary
partitions as type fd (raid autodetect). Is it not problem later for
lvm2 when preparing and creating volume-group? Because lvm-guide says
something about setting partition type to 8e (linux lvm), which I can
not do, if I want to use raid1...
All partitions end up as "fd", because the raid arrays need to be built
prior to LVM2 getting a look at them.
--
gentoo-user@gentoo.org mailing list