All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heinz J . Mauelshagen" <mauelshagen@sistina.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] lvm mirroring
Date: Tue Feb 25 09:32:01 2003	[thread overview]
Message-ID: <20030225162655.D832@sistina.com> (raw)
In-Reply-To: <02ee01c2dadc$7e7ff310$020010ac@romio>; from romio@netvision.net.il on Sun, Feb 23, 2003 at 03:40:06AM +0200

On Sun, Feb 23, 2003 at 03:40:06AM +0200, Roman Gavrilov wrote:
> Hello,
> 
> I have 2 physical discs.
> I have 4 partitions on the first disk. 
> I created a volume group "lvmhd" from all of the partitions and later created logical volumes.
> 
> this is the result from the vgdisplay
> --- Volume group ---
> VG Name               lvmhd
> VG Access             read/write
> VG Status             available/resizable
> VG #                  0
> MAX LV                256
> Cur LV                3
> Open LV               3
> MAX LV Size           2 TB
> Max PV                256
> Cur PV                4
> Act PV                4
> VG Size               35.59 GB
> PE Size               32 MB
> Total PE              1139
> Alloc PE / Size       1131 / 35.34 GB
> Free  PE / Size       8 / 256 MB
> VG UUID               xqamqE-9gSs-Xy3O-2tVQ-wYzy-Cp3u-0Wivbd
> 
> and those are the logical volumes
> /dev/lvmhd/lvm_usr    3.0G  980M  1.8G  35% /usr
> /dev/lvmhd/lvm_var    4.9G   65M  4.6G   2% /var
> /dev/lvmhd/lvm_home    27G   33M   25G   1% /home
> 
> later I mirrored the first disk to the second disk with dd if=/dev/hda of=/dev/hdb so if the first disk breaks I can remove it and replace it with the second disk and get the server up in minutes.

This is a copy, no mirror.

> 
> Now I want to be able to use the second disk while I am running from the first. But the volume groups are the same and I am afraid that if I will recreate the logical volumes I'll ruin some thing on the second disk.
> Is there anything I can do about it so I could use the second disk for backups but still have the same architecture as the primary disk ?

With LVM1 rename /dev/hdb to /dev/myhdb, with LVM2 you could change
the device name filter in a configfile.

> is there any way to mount those logical volumes which are mirrors of the primary disk ?
> for example I can do 
> pvdisplay /dev/hdb3 (this is the slave disk which is the mirror of the primary and its not mounted)
> --- Physical volume ---
> PV Name               /dev/hdb3
> VG Name               lvmhd
> PV Size               13.67 GB [28676025 secs] / NOT usable 32.19 MB [LVM: 129 KB]
> PV#                   1
> PV Status             available
> Allocatable           yes (but full)
> Cur LV                3
> PE Size (KByte)       32768
> Total PE              436
> Free PE               0
> Allocated PE          436
> PV UUID               5XenPH-2NLb-cmN0-qEBb-QGuJ-zWxv-otMr7i
> 
> thanks

You would need to change the LVM metadata to do this.

The correct way to have a copy of your VG would have been
to create a second VG which must have a different name from the first one
with PV hdb in it, create all the LVs you have in "lvmhd", which can have the
same names as in "lvmhd" and dd the LVs over.

I presume your VG "lvmhd" takes no writes during the copy.

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  reply	other threads:[~2003-02-25  9:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-22 10:41 [linux-lvm] lvm mirroring Roman Gavrilov
2003-02-25  9:32 ` Heinz J . Mauelshagen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-03-06 17:34 [linux-lvm] LVM Mirroring Senthil Kumar
2009-04-22  8:34 ` Marian Csontos
2009-04-22 10:18   ` Bryn M. Reeves
2009-02-04 18:42 [linux-lvm] LVM mirroring Prateek Donni
2009-02-06 13:51 ` Curtis Doty
2000-01-21 14:32 [linux-lvm] lvm mirroring Sebastian Tomac
2000-01-21 15:01 ` Heinz J. Mauelshagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030225162655.D832@sistina.com \
    --to=mauelshagen@sistina.com \
    --cc=linux-lvm@sistina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.