All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] LVM mirroring questions...
@ 2008-04-08  9:14 Jess Bromley
  2008-04-08 11:01 ` Marcin Kałuża
  2008-04-08 11:14 ` Stuart D. Gathman
  0 siblings, 2 replies; 11+ messages in thread
From: Jess Bromley @ 2008-04-08  9:14 UTC (permalink / raw)
  To: linux-lvm

Hi all,

I've been trying to find out about LVM mirroring, but it's hard to
find much information in the documentation.

Is mirroring considered stable/ready for production use yet?  "man
lvcreate" and "man lvconvert" suggest that the current stable versions
support creating mirrored volumes, but the HOWTO has nothing to say
about it.

On a more detailed note, what sort of size does the physical volume
for the disk log need to be in relation to the size of the logical
volume to be mirrored, and is there any way to specify which physical
volume will hold the disk log (either using lvconvert or lvcreate)?

I've got a situation where I want to mirror only a partition of a
physical disk on to that of another physical disk, not the whole disk;
so software/hardware RAID isn't an option.

Thanks for your help,
J Bromley

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

* RE: [linux-lvm] LVM mirroring questions...
@ 2008-04-08  9:55 Karl Wagner
  0 siblings, 0 replies; 11+ messages in thread
From: Karl Wagner @ 2008-04-08  9:55 UTC (permalink / raw)
  To: LVM general discussion and development

Hello.

Just wanted to point out quickly, although it doesn't actually answer
the question, linux software raid may be an option for you. Set both
partitions to Linux raid, then use mdadm to create a RAID 1 accross the
2 partitions.

I am currently running a similar setup, except I am using a raid5 across
4 partitions, with a raid1 and a raid10 earlier in the disk for OS, LVM
on the raid5, and an additional VG containing a mix of striped, linear
and mirrored volumes.

Mouse

-----Original Message-----
From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com]
On Behalf Of Jess Bromley
Sent: 08 April 2008 10:15
To: linux-lvm@redhat.com
Subject: [linux-lvm] LVM mirroring questions...

Hi all,

I've been trying to find out about LVM mirroring, but it's hard to
find much information in the documentation.

Is mirroring considered stable/ready for production use yet?  "man
lvcreate" and "man lvconvert" suggest that the current stable versions
support creating mirrored volumes, but the HOWTO has nothing to say
about it.

On a more detailed note, what sort of size does the physical volume
for the disk log need to be in relation to the size of the logical
volume to be mirrored, and is there any way to specify which physical
volume will hold the disk log (either using lvconvert or lvcreate)?

I've got a situation where I want to mirror only a partition of a
physical disk on to that of another physical disk, not the whole disk;
so software/hardware RAID isn't an option.

Thanks for your help,
J Bromley

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


 This has been checked by www.blackspider.com 


_________________________________________________________

Zetex Semiconductors - Solutions for an analog world.

http://www.zetex.com
http://www.zetex.cn

E-MAILS are susceptible to interference.  You should not assume that
the contents originated from the sender or the Zetex Group or that they 
have been accurately reproduced from their original form.
Zetex accepts no responsibility for information, errors or omissions in
this e-mail nor for its use or misuse nor for any act committed or
omitted in connection with this communication.
If in doubt, please verify the authenticity with the sender.
_________________________________________________________

 

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

* RE: [linux-lvm] LVM mirroring questions...
  2008-04-08  9:14 [linux-lvm] LVM mirroring questions Jess Bromley
@ 2008-04-08 11:01 ` Marcin Kałuża
  2008-04-08 11:14   ` Jess Bromley
  2008-04-29 10:17   ` Morten Torstensen
  2008-04-08 11:14 ` Stuart D. Gathman
  1 sibling, 2 replies; 11+ messages in thread
From: Marcin Kałuża @ 2008-04-08 11:01 UTC (permalink / raw)
  To: 'LVM general discussion and development'

Hello

Why software RAID is not an option? It works with partitions as well as with
whole disks (actually it doesn't care what it is working on as long as it's
a block device)

The amount of log data is small - on my test setup for creating 1GB mirrored
LV log fit into single 16MB PE - don't know how much of it was left freee
though. 
Everything is in mans - the HOWTO seems to be a little old

But if all you want to do is mirroring one partition, than just create a
partition of the same size (well, it can be bigger, but then the remaining
space is lost an unusable) on the other drive and create md over them.

Hope this helps
Martin

-----Original Message-----
From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com] On
Behalf Of Jess Bromley
Sent: Tuesday, April 08, 2008 11:15 AM
To: linux-lvm@redhat.com
Subject: [linux-lvm] LVM mirroring questions...

Hi all,

I've been trying to find out about LVM mirroring, but it's hard to
find much information in the documentation.

Is mirroring considered stable/ready for production use yet?  "man
lvcreate" and "man lvconvert" suggest that the current stable versions
support creating mirrored volumes, but the HOWTO has nothing to say
about it.

On a more detailed note, what sort of size does the physical volume
for the disk log need to be in relation to the size of the logical
volume to be mirrored, and is there any way to specify which physical
volume will hold the disk log (either using lvconvert or lvcreate)?

I've got a situation where I want to mirror only a partition of a
physical disk on to that of another physical disk, not the whole disk;
so software/hardware RAID isn't an option.

Thanks for your help,
J Bromley

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

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

* Re: [linux-lvm] LVM mirroring questions...
  2008-04-08  9:14 [linux-lvm] LVM mirroring questions Jess Bromley
  2008-04-08 11:01 ` Marcin Kałuża
@ 2008-04-08 11:14 ` Stuart D. Gathman
  1 sibling, 0 replies; 11+ messages in thread
From: Stuart D. Gathman @ 2008-04-08 11:14 UTC (permalink / raw)
  To: LVM general discussion and development

On Tue, 8 Apr 2008, Jess Bromley wrote:

> I've got a situation where I want to mirror only a partition of a
> physical disk on to that of another physical disk, not the whole disk;
> so software/hardware RAID isn't an option.

That is exactly what software RAID does for you - mirrors a partition.
LVM mirroring allows you to mirror a logical volume.

Here is an example status of partitions mirrored via software raid1:

$ cat /proc/mdstat
Personalities : [raid1] 
read_ahead 1024 sectors
md0 : active raid1 hda3[0] hdc3[1]
      530048 blocks [2/2] [UU]
      
md2 : active raid1 hda5[0] hdc2[1]
      18916032 blocks [2/2] [UU]
      
md1 : active raid1 hda2[0] hdc1[1]
      24000 blocks [2/2] [UU]
      
unused devices: <none>

You then make PVs on the mds if you want LVM.  For example (another system):

# pvs
  PV         VG      Fmt  Attr PSize   PFree  
  /dev/md2   rootvg  lvm2 a-    36.19G  15.69G
  /dev/md3   rootvg  lvm2 a-    55.88G   2.00G
  /dev/md4   rootvg  lvm2 a-    55.88G   6.50G
  /dev/md5   rootvg  lvm2 a-    83.81G  23.81G

-- 
	      Stuart D. Gathman <stuart@bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

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

* Re: [linux-lvm] LVM mirroring questions...
  2008-04-08 11:01 ` Marcin Kałuża
@ 2008-04-08 11:14   ` Jess Bromley
  2008-04-08 11:25     ` Stuart D. Gathman
  2008-04-29 10:17   ` Morten Torstensen
  1 sibling, 1 reply; 11+ messages in thread
From: Jess Bromley @ 2008-04-08 11:14 UTC (permalink / raw)
  To: LVM general discussion and development

Thanks Karl and Marcin, I hadn't realised software RAID worked on a
per partition basis.  I'm looking into it now.

If mirroring on LVM is stable though, it might still be preferrable as
then I only have to use one set of tools instead of two --- can anyone
comment on how stable they've found mirroring under LVM.

Also does the fact that software RAID doesn't use a disk log mean that
LVM is actually better/faster than RAID at correctly recovering from
crashes that leave the mirrored disks out of sync?

>  The amount of log data is small - on my test setup for creating 1GB mirrored
>  LV log fit into single 16MB PE - don't know how much of it was left freee
>  though.

Were you able to specify which PV the log was created on?

Thanks,
Jess

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

* Re: [linux-lvm] LVM mirroring questions...
  2008-04-08 11:14   ` Jess Bromley
@ 2008-04-08 11:25     ` Stuart D. Gathman
  2008-04-11 16:18       ` Luca Berra
  0 siblings, 1 reply; 11+ messages in thread
From: Stuart D. Gathman @ 2008-04-08 11:25 UTC (permalink / raw)
  To: LVM general discussion and development

On Tue, 8 Apr 2008, Jess Bromley wrote:

> Also does the fact that software RAID doesn't use a disk log mean that
> LVM is actually better/faster than RAID at correctly recovering from
> crashes that leave the mirrored disks out of sync?

The md driver doesn't track which blocks are out of sync.  It recovers
from a crash by copying the entire partition.  On recent versions, it
tracks how far it has gotten on the resync in the md superblock, so that it
doesn't have to start from scratch on a reboot.

The md driver keeps its superblock at the *end* of the partition.  This
means that you can mount any filesystem/pv as the raw partition.
This requires that LVM give md devices preference when scanning for
PVs to work correctly :-)

Mounting without md can be done deliberately (and carefully!) in
certain situations to work around other bugs.  For instance, if grub
won't work with md devices, just fail all but one of the mirrors of the
boot partition, mount /boot as normal parition.  Run grub-install.  Then
umount /boot, remount as md, and add back mirrors.

-- 
	      Stuart D. Gathman <stuart@bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

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

* Re: [linux-lvm] LVM mirroring questions...
  2008-04-08 11:25     ` Stuart D. Gathman
@ 2008-04-11 16:18       ` Luca Berra
  2008-04-15  7:51         ` Jayson Vantuyl
  0 siblings, 1 reply; 11+ messages in thread
From: Luca Berra @ 2008-04-11 16:18 UTC (permalink / raw)
  To: linux-lvm

On Tue, Apr 08, 2008 at 07:25:05AM -0400, Stuart D. Gathman wrote:
>On Tue, 8 Apr 2008, Jess Bromley wrote:
>
>> Also does the fact that software RAID doesn't use a disk log mean that
>> LVM is actually better/faster than RAID at correctly recovering from
>> crashes that leave the mirrored disks out of sync?
>
>The md driver doesn't track which blocks are out of sync.  It recovers
>from a crash by copying the entire partition.  On recent versions, it
>tracks how far it has gotten on the resync in the md superblock, so that it
>doesn't have to start from scratch on a reboot.

this is not entirely correct.
md has a bitmap feature that is used to track which blocks are out of
sync.

>The md driver keeps its superblock at the *end* of the partition.  This
>means that you can mount any filesystem/pv as the raw partition.
again, newer version of md allow to put the superblock at the beginning
of the device (or 4k from the beginning)

>This requires that LVM give md devices preference when scanning for
>PVs to work correctly :-)

this should be the default in lvm.

L.

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

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

* Re: [linux-lvm] LVM mirroring questions...
  2008-04-11 16:18       ` Luca Berra
@ 2008-04-15  7:51         ` Jayson Vantuyl
  0 siblings, 0 replies; 11+ messages in thread
From: Jayson Vantuyl @ 2008-04-15  7:51 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 521 bytes --]

On Apr 11, 2008, at 9:18 AM, Luca Berra wrote:
> this is not entirely correct.
> md has a bitmap feature that is used to track which blocks are out of
> sync.
For the record, this is called a "write-intent bitmap".  It's very  
handy, although to make it really perform you need to put it on a  
separate spindle from the data (which is supported).  Otherwise the  
extra seeks cause quite an impact on disk performance.



-- 
Jayson Vantuyl
Systems Architect
Engine Yard
jvantuyl@engineyard.com
1 866 518 9275 ext 204


[-- Attachment #2: Type: text/html, Size: 4698 bytes --]

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

* Re: [linux-lvm] LVM mirroring questions...
  2008-04-08 11:01 ` Marcin Kałuża
  2008-04-08 11:14   ` Jess Bromley
@ 2008-04-29 10:17   ` Morten Torstensen
  2008-04-29 14:01     ` Stuart D. Gathman
  1 sibling, 1 reply; 11+ messages in thread
From: Morten Torstensen @ 2008-04-29 10:17 UTC (permalink / raw)
  To: LVM general discussion and development

Marcin Ka�u�a wrote:
> Why software RAID is not an option? It works with partitions as well as with
> whole disks (actually it doesn't care what it is working on as long as it's
> a block device)

Because doing mirroring in the LVM is much easier as you don't have to 
set up the md layer. Simple LE to multiple PE mapping is easy to do and 
makes LVM mirroring easy and flexible.

//Morten

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

* Re: [linux-lvm] LVM mirroring questions...
  2008-04-29 10:17   ` Morten Torstensen
@ 2008-04-29 14:01     ` Stuart D. Gathman
  2008-04-29 14:24       ` Marek Podmaka
  0 siblings, 1 reply; 11+ messages in thread
From: Stuart D. Gathman @ 2008-04-29 14:01 UTC (permalink / raw)
  To: LVM general discussion and development

On Tue, 29 Apr 2008, Morten Torstensen wrote:

> Marcin Ka�u�a wrote:
> > Why software RAID is not an option? It works with partitions as well as with
> > whole disks (actually it doesn't care what it is working on as long as it's
> > a block device)
> 
> Because doing mirroring in the LVM is much easier as you don't have to 
> set up the md layer. Simple LE to multiple PE mapping is easy to do and 
> makes LVM mirroring easy and flexible.

Using md with LVM was a work around for LVM mirroring not being available /
reliable at first.  With LVM, you can mirror some LV and not others.
For instance, a /work LV used only for software builds might not get mirrored.
(If the underlying PV crashes, the build gets interrupted, but you just
start over after replacing the disk.)

With md, fully taking advantage of new disks added to the system often
requires repartitioning and solving knapsack problems (moving partitions
can take place online with live filesystem using md).  With LVM, 
many equal sized PE make this automatic.  (Although the write intent
table needs a 3rd drive.)

-- 
	      Stuart D. Gathman <stuart@bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

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

* Re: [linux-lvm] LVM mirroring questions...
  2008-04-29 14:01     ` Stuart D. Gathman
@ 2008-04-29 14:24       ` Marek Podmaka
  0 siblings, 0 replies; 11+ messages in thread
From: Marek Podmaka @ 2008-04-29 14:24 UTC (permalink / raw)
  To: LVM general discussion and development

Hello,

Tuesday, April 29, 2008, 16:01:53, Stuart D. Gathman wrote:

> With LVM, many equal sized PE make this automatic. (Although the
> write intent table needs a 3rd drive.)

I was wondering why this can't use LVM internal structures for storing
it (like for example on HP-UX). Having to use 3rd disk is not very
practical (as is not the requirement to re-sync whole LV in case of
disk failure when the LV is really big). I don't remember now if HP-UX
uses the headers of VG or LV to track these changes. But is there any
reason, why this couldn't use for example first LE of LV?


-- 
  bYE, Marki

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

end of thread, other threads:[~2008-04-29 14:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-08  9:14 [linux-lvm] LVM mirroring questions Jess Bromley
2008-04-08 11:01 ` Marcin Kałuża
2008-04-08 11:14   ` Jess Bromley
2008-04-08 11:25     ` Stuart D. Gathman
2008-04-11 16:18       ` Luca Berra
2008-04-15  7:51         ` Jayson Vantuyl
2008-04-29 10:17   ` Morten Torstensen
2008-04-29 14:01     ` Stuart D. Gathman
2008-04-29 14:24       ` Marek Podmaka
2008-04-08 11:14 ` Stuart D. Gathman
  -- strict thread matches above, loose matches on Subject: below --
2008-04-08  9:55 Karl Wagner

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.