All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] software mirroring
@ 2002-09-06  8:51 Scott Savarese
  2002-09-06 15:12 ` José Luis Domingo López
  0 siblings, 1 reply; 17+ messages in thread
From: Scott Savarese @ 2002-09-06  8:51 UTC (permalink / raw)
  To: linux-lvm

I am trying to set up mirroring on my system with LVM. Is there a command
to do it in LVM, or do I need the raidtools as well?

The ultimate goal is a completely mirrored harddrive so that I if my boot
drive fails (on that disk are /, swap, and /boot) I can swap the two
drives and reboot.

Or is it preferered to create LV's with LVM, and then run RAID ontop of
the LVM disks? (and then mirror /boot seperately).

Thanks,
Scott

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
  2002-09-06  8:51 [linux-lvm] software mirroring Scott Savarese
@ 2002-09-06 15:12 ` José Luis Domingo López
  2002-09-07  9:35   ` Scott Savarese
  0 siblings, 1 reply; 17+ messages in thread
From: José Luis Domingo López @ 2002-09-06 15:12 UTC (permalink / raw)
  To: linux-lvm

On Friday, 06 September 2002, at 09:51:00 -0400,
Scott Savarese wrote:

> I am trying to set up mirroring on my system with LVM. Is there a command
> to do it in LVM, or do I need the raidtools as well?
> 
The best configuration would be a LVM setup on top of some kind (RAID1
for mirroring) of software or hardware RAID. This way you get the
benefits of both RAID (redundancy) and LVM (space management and
snapshots among others).

> The ultimate goal is a completely mirrored harddrive so that I if my boot
> drive fails (on that disk are /, swap, and /boot) I can swap the two
> drives and reboot.
> 
If one physical drive fails in a RAID1 configuration you shouldn't need
to reboot the box, and the failure would go mostly unnoticed to you.

> Or is it preferered to create LV's with LVM, and then run RAID ontop of
> the LVM disks? (and then mirror /boot seperately).
> 
Better the other way: RAID on top of physical disks (to get protection
against a disk failure) and above RAID (be it sotf or hard) LVM (the
inner layer gives you RAID1 capabilities, and LVM works as usual).

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436     Debian Linux Woody (Linux 2.4.19-pre6aa1)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
  2002-09-06 15:12 ` José Luis Domingo López
@ 2002-09-07  9:35   ` Scott Savarese
  2002-09-07 15:42     ` José Luis Domingo López
  0 siblings, 1 reply; 17+ messages in thread
From: Scott Savarese @ 2002-09-07  9:35 UTC (permalink / raw)
  To: linux-lvm; +Cc: linux-lvm

José Luis Domingo López said:
>> Or is it preferered to create LV's with LVM, and then run RAID ontop
>> of the LVM disks? (and then mirror /boot seperately).
>>
> Better the other way: RAID on top of physical disks (to get protection
> against a disk failure) and above RAID (be it sotf or hard) LVM (the
> inner layer gives you RAID1 capabilities, and LVM works as usual).

Is there any sort of procedure written on how to do this on a system with
only two disks? If I mirror the disks, then I now have 1 logical disk, in
which case I can't install LVM on top.

Thanks,
Scott

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
  2002-09-07  9:35   ` Scott Savarese
@ 2002-09-07 15:42     ` José Luis Domingo López
  2002-09-10  7:10       ` Jon Bendtsen
  0 siblings, 1 reply; 17+ messages in thread
From: José Luis Domingo López @ 2002-09-07 15:42 UTC (permalink / raw)
  To: linux-lvm; +Cc: Scott Savarese

On Saturday, 07 September 2002, at 10:34:40 -0400,
Scott Savarese wrote:

> > Better the other way: RAID on top of physical disks (to get protection
> > against a disk failure) and above RAID (be it sotf or hard) LVM (the
> > inner layer gives you RAID1 capabilities, and LVM works as usual).
> 
> Is there any sort of procedure written on how to do this on a system with
> only two disks? If I mirror the disks, then I now have 1 logical disk, in
> which case I can't install LVM on top.
> 
There shouldn't be any problems at all, except for bootup: it can be
tricky (complex, prone to error or simply impossible, I don't know ;) 
to get a box boot off a LV on top of a software RAID1. But technically,
it should be as simple as creating a partition on each disk, creating
the RAID1 from them, initialize /dev/md0 as a PV for use with LVM,
create a VG consisting of just this PV, and finally create as many LV as
you need (size permitting).

I have not had the chance to try it by myself, due to lack of hardware,
but should work. Maybe the hard part is to do it at install time and get
the system to boot from a LV created this way.

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436     Debian Linux Woody (Linux 2.4.19-pre6aa1)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
@ 2002-09-09  8:41 Scott Savarese
  2002-09-09  9:02 ` Steven Lembark
  2002-09-09 10:38 ` Luca Berra
  0 siblings, 2 replies; 17+ messages in thread
From: Scott Savarese @ 2002-09-09  8:41 UTC (permalink / raw)
  To: linux-lvm

José Luis Domingo López said:
> There shouldn't be any problems at all, except for bootup: it can be
> tricky (complex, prone to error or simply impossible, I don't know ;)
> to get a box boot off a LV on top of a software RAID1. But
> technically, it should be as simple as creating a partition on each
> disk, creating the RAID1 from them, initialize /dev/md0 as a PV for
> use with LVM, create a VG consisting of just this PV, and finally
> create as many LV as you need (size permitting).
>
> I have not had the chance to try it by myself, due to lack of
> hardware, but should work. Maybe the hard part is to do it at install
> time and get the system to boot from a LV created this way.

Bootup is definantly the issue right now... I created two raid1 sets
/dev/md0 and /dev/md1 on my second hard drive telling it that my first
harddrive was failed (so it wouldn't use it and break it). The first
will hold my /boot and the second (for now) will hold my /. I then
installed LVM onto my /dev/md1 and copied the filesystems over to the
appropriate locations. However after I configure lilo and fstab I have
issues. Depending on my lilo.conf I get either
L 80 80 80 ...
or
LI

Is there a proper way to boot up?
Thanks,
Scott

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
  2002-09-09  8:41 Scott Savarese
@ 2002-09-09  9:02 ` Steven Lembark
  2002-09-09 10:38 ` Luca Berra
  1 sibling, 0 replies; 17+ messages in thread
From: Steven Lembark @ 2002-09-09  9:02 UTC (permalink / raw)
  To: linux-lvm

> /dev/md0 and /dev/md1 on my second hard drive telling it that my first
> harddrive was failed (so it wouldn't use it and break it). The first
> will hold my /boot and the second (for now) will hold my /. I then
> installed LVM onto my /dev/md1 and copied the filesystems over to the
> appropriate locations. However after I configure lilo and fstab I have
> issues. Depending on my lilo.conf I get either
> L 80 80 80 ...
> or
> LI

You will save yourself a lot of trouble if you
stick with hardware raid for the boot volume (i.e.,
the bios only sees a single device) and avoid LVM
altogeter for the root volume (assuming you put
/boot on /). Main reason is that if anything does
go wrong with LVM it's a pain to fix without LVM.

Until the X86 BIOS gets brains (and pigs floss...)
just use a simple partition for the root voume and
perhaps a second partition with a stand-alone rescue
system on the other drive. If you install LVM into
the root volume (e.g., /lvm) then yuo can at least
boot single-user and fix things.


--
Steven Lembark                               2930 W. Palmer
Workhorse Computing                       Chicago, IL 60647
                                            +1 800 762 1582

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
  2002-09-09  8:41 Scott Savarese
  2002-09-09  9:02 ` Steven Lembark
@ 2002-09-09 10:38 ` Luca Berra
       [not found]   ` <3338.24.46.54.254.1031594005.squirrel@mail.scottsavarese.com>
  1 sibling, 1 reply; 17+ messages in thread
From: Luca Berra @ 2002-09-09 10:38 UTC (permalink / raw)
  To: linux-lvm

Scott Savarese wrote:
> Bootup is definantly the issue right now... I created two raid1 sets
> /dev/md0 and /dev/md1 on my second hard drive telling it that my first
> harddrive was failed (so it wouldn't use it and break it). The first
> will hold my /boot and the second (for now) will hold my /. I then
> installed LVM onto my /dev/md1 and copied the filesystems over to the
> appropriate locations. However after I configure lilo and fstab I have
> issues. Depending on my lilo.conf I get either
> L 80 80 80 ...
> or
> LI

please provide:
lilo version
lilo.conf
contents of partition tables on both drives

L.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
       [not found]   ` <3338.24.46.54.254.1031594005.squirrel@mail.scottsavarese.com>
@ 2002-09-10  5:33     ` Luca Berra
       [not found]       ` <1412.24.46.54.254.1031663551.squirrel@mail.scottsavarese.com>
  0 siblings, 1 reply; 17+ messages in thread
From: Luca Berra @ 2002-09-10  5:33 UTC (permalink / raw)
  To: Scott Savarese; +Cc: linux-lvm

On Mon, Sep 09, 2002 at 01:53:25PM -0400, Scott Savarese wrote:
>OK... My lilo version is 22.2.
good
>/dev/hdc is:
>Disk /dev/hdc: 255 heads, 63 sectors, 12161 cylinders
>Units = cylinders of 16065 * 512 bytes
>
>   Device Boot    Start       End    Blocks   Id  System
>/dev/hdc1   *         1       131   1052226   fd  Linux raid autodetect
>/dev/hdc2           132     12161  96630975   8e  Linux LVM
>
(irrelevant to your issue atm)
is hdc2 part of md1? if so it should be type fd
(irrelevant to your issue atm)
>This is the harddrive I am doing all the work on.
>
>/dev/hda is the same harddrive configured with one partition the entire
>length of the disk of type 83 (linux). Right now that disk works. I'll add
>it to my mirrors after I am sure this works with one disk. I would like to
>get this to work on /dev/hdc first. Once that works, I'll mirror the disks
>to /dev/hda and then reset lilo and my bios to boot off /dev/hda.
ok, let's start hoping that your bios handles booting from secondary
master mapping it to drive 0x80, and does not screw things more than
needed.

>My lilo.conf looks like the following:
-------------------
>disk = /dev/md1
>sectors = 63
>heads = 255
>cylinders = 12161
>partition = /dev/md0
>start = 63
-------------------
the above should not be needed with lilo 22.2, it should be able to
detect geometry for raid arrays correctly

>boot = /dev/hdc
ok here is the main problem you are telling it to boot from
drive 0x82, then you change the bios and it becomes 0x80
so it tries to load from an inexistent disk

now is time for black magic
correct thing to do is putting a valid *STANDARD* mbr on disk hdc
hdc1 is already active and that is good
then use in lilo:

boot = /dev/md0

which would tell lilo to put its boot sector at the beginning of hdc1
and its mirrored copy.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
  2002-09-07 15:42     ` José Luis Domingo López
@ 2002-09-10  7:10       ` Jon Bendtsen
  2002-09-10  8:40         ` Scott Savarese
  0 siblings, 1 reply; 17+ messages in thread
From: Jon Bendtsen @ 2002-09-10  7:10 UTC (permalink / raw)
  To: linux-lvm

José Luis Domingo López wrote:
> 
> On Saturday, 07 September 2002, at 10:34:40 -0400,
> Scott Savarese wrote:

> There shouldn't be any problems at all, except for bootup: it can be
> tricky (complex, prone to error or simply impossible, I don't know ;)
> to get a box boot off a LV on top of a software RAID1. But technically,
> it should be as simple as creating a partition on each disk, creating
> the RAID1 from them, initialize /dev/md0 as a PV for use with LVM,
> create a VG consisting of just this PV, and finally create as many LV as
> you need (size permitting).

Thats the way to do it.

 
> I have not had the chance to try it by myself, due to lack of hardware,
> but should work. Maybe the hard part is to do it at install time and get
> the system to boot from a LV created this way.

I have tried it, and it works fine.




JonB

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
  2002-09-10  7:10       ` Jon Bendtsen
@ 2002-09-10  8:40         ` Scott Savarese
  0 siblings, 0 replies; 17+ messages in thread
From: Scott Savarese @ 2002-09-10  8:40 UTC (permalink / raw)
  To: linux-lvm; +Cc: jon+lvm

Jon Bendtsen said:
> I have tried it, and it works fine.

OK...I need massive help... I have 2 drives hda and hdc. hda contains 1
partition, the original installation. hdc has two partitions. One for
/boot and one for / (and all subdirectories). I then created to raid1's
with hdc as the primary drive and hda as a "failed-disk". This way I can
always boot off of hda in case it doesn't work. /dev/md0 sits on hdc1 and
contains /boot and /dev/md1 sits on hdc2.

I then pvcreated /dev/md1 and created a root LV and then copied my
installation. I modified lilo.conf and fstab and ran lilo (I'll include my
lilo.conf at the end).

My theory is that I can change my BIOS setting to boot off /dev/hdc and
then once I am sure it works, change hda entries in my raiddtab to
"raid-disk" and hot add them. Rerun lilo and then I should be able to boot
off of hda.In theory.

I can run lilo. It understands my raid disks (lilo is version 22.2, my
kernel 2.4.18 and I am using lvm 1.0.5). However once I reboot and switch
the BIOS, I now get L 80 80 80...when I try and boot of /dev/hdc. It still
works fine booting off of hda.

Can you help?
Thanks,
Scott

HERE is my lilo.conf for the raid

boot = /dev/md0
delay = 50
vga = normal
lba32
image = /boot/vmlinuz
  root = /dev/rootvg/root
  label = linux
  initrd = /boot/initrd-lvm-2.4.18.gz
  ramdisk = 8192
  read-only

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
       [not found]       ` <1412.24.46.54.254.1031663551.squirrel@mail.scottsavarese.com>
@ 2002-09-11  1:48         ` Luca Berra
  0 siblings, 0 replies; 17+ messages in thread
From: Luca Berra @ 2002-09-11  1:48 UTC (permalink / raw)
  To: linux-lvm; +Cc: Scott Savarese

On Tue, Sep 10, 2002 at 09:12:31AM -0400, Scott Savarese wrote:
>> which would tell lilo to put its boot sector at the beginning of hdc1
>> and its mirrored copy.
>
>I made the change but the black magic isn't working...I am getting L 80
>80... again.
>
L 80 means that LILO loaded the boot sector, but a disk not ready error
prevented it from finding the second stage boot loader (/boot/boot.b)

looks like it is looking on the wrong drive...

are you 100% positive that you have replaced lilo with a standard dos
mbr on hdc?

another option is to use:
disk = /dev/hdc
  bios = 0x80

boot = /dev/hdc

in your lilo.conf, but this does not work seamlessly with raid
and you need two lilo.conf (one for hda and one for hdc)

L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
       [not found]   ` <2951.24.46.54.254.1031678903.squirrel@mail.scottsavarese.com>
@ 2002-09-11  3:03     ` jon+lvm
  2002-09-13  8:30       ` Scott Savarese
  0 siblings, 1 reply; 17+ messages in thread
From: jon+lvm @ 2002-09-11  3:03 UTC (permalink / raw)
  To: Scott Savarese; +Cc: jon+lvm, linux-lvm

On Tue, Sep 10, 2002 at 01:28:23PM -0400, Scott Savarese wrote:
> Jon Bendtsen said:
> 
> > Do it from the hda boot prompt
> 
> Yeah...That worked....I then was able to boot into my /dev/hdc. However, I
> then completed the mirror to /dev/hda reran lilo and rebooted. Now it
> gives L 40 40 40 which is a Seek Failure (no solution given). Which means,
> that since I have no clean copy of data I need to start all over again.

Well, it MIGHT be an idea to take a backup first...
Anyway, since the data is still there, you should be able to use a
rescue floppy and get it started.

 
JonB

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
  2002-09-11  3:03     ` jon+lvm
@ 2002-09-13  8:30       ` Scott Savarese
  2002-09-13  8:46         ` Steven Lembark
  2002-09-13 11:16         ` Luca Berra
  0 siblings, 2 replies; 17+ messages in thread
From: Scott Savarese @ 2002-09-13  8:30 UTC (permalink / raw)
  To: linux-lvm

OK...I finally got it to work...However I couldn't put the / or /boot
partitions under LVM control which would have been perfect... So I created
a
4 Gb / partition which contains /boot as well, and set lilo to boot off of
that. Everything else will be under LVM control...

I'll keep working on a way to do it with my old box :)...

Is there a howto out there on how to combine raid and lvm? Is there a need
to write one?

Thanks for everyone's help. It is much appreciated.

Scott

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
  2002-09-13  8:30       ` Scott Savarese
@ 2002-09-13  8:46         ` Steven Lembark
  2002-09-13 11:08           ` Scott Savarese
  2002-09-13 11:16         ` Luca Berra
  1 sibling, 1 reply; 17+ messages in thread
From: Steven Lembark @ 2002-09-13  8:46 UTC (permalink / raw)
  To: linux-lvm


> OK...I finally got it to work...However I couldn't put the / or /boot
> partitions under LVM control which would have been perfect... So I created
> a
> 4 Gb / partition which contains /boot as well, and set lilo to boot off of
> that. Everything else will be under LVM control...
>
> I'll keep working on a way to do it with my old box :)...
>
> Is there a howto out there on how to combine raid and lvm? Is there a need
> to write one?

You only need about 128 MB for a working root partition,
the rest (including /usr) can be LVM.


--
Steven Lembark                               2930 W. Palmer
Workhorse Computing                       Chicago, IL 60647
                                            +1 800 762 1582

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
  2002-09-13  8:46         ` Steven Lembark
@ 2002-09-13 11:08           ` Scott Savarese
  0 siblings, 0 replies; 17+ messages in thread
From: Scott Savarese @ 2002-09-13 11:08 UTC (permalink / raw)
  To: linux-lvm

Yeah, but I wanted to account for future growth of /etc /sbin /lib over
the next several years and I have a strong tendancy to severely overdo my
estimates. :) At least I won't have to redo it for a while...

Scott




Steven Lembark said:
>
>
>> OK...I finally got it to work...However I couldn't put the / or /boot
>> partitions under LVM control which would have been perfect... So I
>> created a
>> 4 Gb / partition which contains /boot as well, and set lilo to boot
>> off of that. Everything else will be under LVM control...
>>
>> I'll keep working on a way to do it with my old box :)...
>>
>> Is there a howto out there on how to combine raid and lvm? Is there a
>> need to write one?
>
> You only need about 128 MB for a working root partition,
> the rest (including /usr) can be LVM.
>
>
> --
> Steven Lembark                               2930 W. Palmer
> Workhorse Computing                       Chicago, IL 60647
>                                             +1 800 762 1582
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
  2002-09-13  8:30       ` Scott Savarese
  2002-09-13  8:46         ` Steven Lembark
@ 2002-09-13 11:16         ` Luca Berra
  2002-09-13 11:46           ` Scott Savarese
  1 sibling, 1 reply; 17+ messages in thread
From: Luca Berra @ 2002-09-13 11:16 UTC (permalink / raw)
  To: linux-lvm

Scott Savarese wrote:
> OK...I finally got it to work...However I couldn't put the / or /boot
> partitions under LVM control which would have been perfect... So I created
> a
> 4 Gb / partition which contains /boot as well, and set lilo to boot off of
> that. Everything else will be under LVM control...

which problems did you find in putting / (or /boot) on LVM over MD?
(btw i am running such a setup)

> Is there a howto out there on how to combine raid and lvm? Is there a need
not that i know of
> to write one?
probably yes

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [linux-lvm] software mirroring
  2002-09-13 11:16         ` Luca Berra
@ 2002-09-13 11:46           ` Scott Savarese
  0 siblings, 0 replies; 17+ messages in thread
From: Scott Savarese @ 2002-09-13 11:46 UTC (permalink / raw)
  To: linux-lvm

Luca Berra said:
> which problems did you find in putting / (or /boot) on LVM over MD? (btw
> i am running such a setup)

Lilo has been completely unable to figure out where my root and boot
partitions are. No matter how I was setting up lilo.conf, it wouldn't find
the lvm root partition. I would get L 80 80 80... or L 40 40 40. Sadly, I
never kept a log of exactly what I did (it would have been helpful). I
have a feeling it was more a problem with setting up the raid and getting
lilo to understand where everything is as opposed to an issue with lvm.

>
>> Is there a howto out there on how to combine raid and lvm? Is there a
>> need
> not that i know of
>> to write one?
> probably yes

Once I figure it all out I'll try and write one...

Scott

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2002-09-13 11:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-06  8:51 [linux-lvm] software mirroring Scott Savarese
2002-09-06 15:12 ` José Luis Domingo López
2002-09-07  9:35   ` Scott Savarese
2002-09-07 15:42     ` José Luis Domingo López
2002-09-10  7:10       ` Jon Bendtsen
2002-09-10  8:40         ` Scott Savarese
  -- strict thread matches above, loose matches on Subject: below --
2002-09-09  8:41 Scott Savarese
2002-09-09  9:02 ` Steven Lembark
2002-09-09 10:38 ` Luca Berra
     [not found]   ` <3338.24.46.54.254.1031594005.squirrel@mail.scottsavarese.com>
2002-09-10  5:33     ` Luca Berra
     [not found]       ` <1412.24.46.54.254.1031663551.squirrel@mail.scottsavarese.com>
2002-09-11  1:48         ` Luca Berra
     [not found] <2100.24.46.54.254.1031670341.squirrel@mail.scottsavarese.com>
     [not found] ` <3D7E0CC0.D7B06D44@silicide.dk>
     [not found]   ` <2951.24.46.54.254.1031678903.squirrel@mail.scottsavarese.com>
2002-09-11  3:03     ` jon+lvm
2002-09-13  8:30       ` Scott Savarese
2002-09-13  8:46         ` Steven Lembark
2002-09-13 11:08           ` Scott Savarese
2002-09-13 11:16         ` Luca Berra
2002-09-13 11:46           ` Scott Savarese

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.