LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-12-2008, 06:15 PM   #1
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,599

Rep: Reputation: 142Reputation: 142
Multiboot + RAID +LVM


Hi there,

I am about to set up a new machine supposed to become a multimedia server, MIDI recording studio, and office desktop machine, all in one. For data safety I want to use RAID-1 for the two SATA discs, for flexibility LVM and for various reasons I want to put two 64-bit systems (Slamd64 and OpenSuSE) on that machine, sharing the same /home.

As I don't have any experience with this or similar scenarios, I read all and everything that seemed relevant about RAID and LVM, in the last few days. Yet, I have still some questions, which I hope someone here can answer.

I am currently of a partitioning/logical volume schema as follows:


/dev/hda1 /boot (what about multiboot???)
/dev/hda2 swap
/dev/hda3 (extended)
/dev/hda5 /disk/vg00/system /
/dev/hda6 /disk/vg00/home /home
/dev/hda7 /disk/vg01/snapshot /snapshot1
/dev/hdb7 /disk/vg01/snapshot /snapshot2



My questions:

First of all: Is sharing /home between two systems, of which only one runs at a given point in time, really a good idea?

Secondly, how would I set up RAID-1 for a multiboot system? Would I need two /boot partitions/mount points? But how would they be differentiated, then? Or would there just be one /boot, with all kernels and initrd's and so on in it?

Thirdly, why should I create 'normal' partitions? If I understood correctly what I have read, it is possible for a logical volume to span arbitrary parts of partitions. Eg, /disk1/vg00/lv1 could span /usr/local and one third of /opt, while /disk1/vg00/lv2 could span /var and the other two thirds of /opt. If this is possible, wouldn't /boot and swap and / be all I need? Because I could split the system part / and the user data part /home on the logical level, at any time. Thus it would be possible to have two logical volumes associated with a single partition. One LV would represent the mount point / and the other one /home. Is this correct?

Finally, I am interested in the snapshot functionality of LVM 2. Is it possible for the snapshot to span two partitions, distributed over two different harddiscs? This would be a LVM used in striped mode, then, which is said to be quite fast, right?
Eg:

/dev/hda has a partition with a mount point /snapshot1
/dev/hdb has a partition with a mount point /snapshot2

The other partitions are as above parts of a RAID-1 device. Is it possible to create a "striped" snapshot of RAID-1 device parts under LVM control, eg / and /home, then, spanning /snapshot1 and /snapshot2 (similar to RAID-0)?

Thanks for your help in advance!

gargamel
 
Old 02-12-2008, 06:49 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Quote:
Originally Posted by gargamel View Post
First of all: Is sharing /home between two systems, of which only one runs at a given point in time, really a good idea?
Aside from being a little screwy that you want 2 linux distros, this is fine.

Quote:
Secondly, how would I set up RAID-1 for a multiboot system? Would I need two /boot partitions/mount points? But how would they be differentiated, then? Or would there just be one /boot, with all kernels and initrd's and so on in it?
you would need 2 /boot and 2 / partitions as openSuse and Slam64 probably don't share the same libs, config schemas, etc etc etc. You can share the same /home if you prefer, though you will need to ensure that UID/GIDs are the same on both OS's.

Quote:
Thirdly, why should I create 'normal' partitions? If I understood correctly what I have read, it is possible for a logical volume to span arbitrary parts of partitions. Eg, /disk1/vg00/lv1 could span /usr/local and one third of /opt, while /disk1/vg00/lv2 could span /var and the other two thirds of /opt. If this is possible, wouldn't /boot and swap and / be all I need? Because I could split the system part / and the user data part /home on the logical level, at any time. Thus it would be possible to have two logical volumes associated with a single partition. One LV would represent the mount point / and the other one /home. Is this correct?
hmm.. yes, all you need for one os, really is /. Lots of people split /boot into a separate patition for a number of reasons which is not the point of this discussion, so I'll skip it. Splitting into even more paritions is really only good for fault tolerance, but is usually more complex than it is helpful.
to answer your q about splitting lvms, yes it's possible for your data to be split up over multiple disks in a variety of ways. You don't know how it's split up, only LVM does. To you, it looks like you have one big disk, and just like on any single disk, you have no idea where the data actually lives on that disk.

That said, for multi-boot, you'll need 2 /boot and 2 /. There may be ways to get around this (maybe one /boot, but 2 /), but you're asking for trouble.

Quote:
Finally, I am interested in the snapshot functionality of LVM 2. Is it possible for the snapshot to span two partitions, distributed over two different harddiscs? This would be a LVM used in striped mode, then, which is said to be quite fast, right?
I, personally, don't know about lvm2.

My $.02:

Raid1 is nice. If you want redundancy, use it.

LVM is almost always overkill for a home system. I say "almost always" referring to the fact that 98% of people will not exploit the usefulness of LVM and therefore, will have an added layer of unnecessary complexity - a layer which can fail & cause you to lose data.

I say ditch the LVM, go with a single RAID1 on a good (read expensive - nothing from Promise) hardware RAID controller for redundancy & be done with it. Get a nice, external drive(s) and do a nightly backup. Maybe think about consolidating to one distro, though I'm sure there are reasons for wanting to run 2 (inquiring minds want to know?).
 
Old 02-13-2008, 01:30 PM   #3
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,599

Original Poster
Rep: Reputation: 142Reputation: 142
Thanks, BrianK, very helpful!

To answer your question about my motivation to install two Linuces and to use LVM:

I am considering to consolidate all my data on my new machine, with its two 400 GB discs. I want to use that machine for just about everything I do now on three different machines. My existing machines run 32-bit versions of the OS's mentioned, ie Slackware 12.0 (of which Slamd64 is an unofficial 64-bit port) and OpenSuSE 10.3.
Somehow among all the distros I tried these are the only two I wasn't able to get rid of, and I would have a hard time to throw one away, as I like both of them so much and use them for different things.
OpenSuSE make things easy, and is my preference for all the 'fancy' stuff, like multimedia applications and so on. Slackware (and Slamd64) on the other hand is so beautifully simple and consistent in its design, so slim, fast and stable, that it has become my main distro. But it is archaic in some respects, so that I always use SuSE's SaX to create my xorg.conf, which I then copy over to Slackware.

However, you are of course right: I actually want to consolidate to one system. Only, so far I have been unable to decide to which one.

Here LVM enters the scene: It would allow me to set up a multiboot configuration, migrate all my data to one system, drop the other one and make the now free space for /boot and / available to the remaining system.
Why don't I just copy all my data to one system? Because they use different encodings, by default. Therefore I have data encoded with ISO-8859-something, UTF-8 and (Windows) codepage 852. I want to safely migrate my files to one encoding on one system, and the multiboot install would allow me to do this step by step over time.

Another reason why I consider using LVM is that I want to use the new machine as a (multi-)media server, with the content of lots of audio CDs on it. I expect that I will have to buy additional discs in the foreseeable future. LVM would make it easy then to enhance my 'partitions' without moving files around a lot.

Thanks again!

gargamel
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shared Partition Multiboot LVM Kryptos Linux - Newbie 1 11-18-2007 11:54 AM
software raid 5 + LVM and other raid questions slackman Slackware 5 05-09-2007 02:58 PM
Lvm + Raid username17 Linux - Hardware 4 02-21-2007 12:02 PM
multiboot on soft RAID gargamel Linux - General 0 05-23-2004 01:56 AM
XP/Multiboot, RAID (80GBx2) & DVI - anyone? robyn Linux - Newbie 3 11-30-2002 10:06 AM


All times are GMT -5. The time now is 09:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration