linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Forcing the lvconvert copy to be on a different physical disk
@ 2013-07-01 10:48 Alessandro MACUZ
  2013-07-02 15:09 ` Mark H. Wood
  0 siblings, 1 reply; 3+ messages in thread
From: Alessandro MACUZ @ 2013-07-01 10:48 UTC (permalink / raw)
  To: LVM general discussion and development

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

Hi all,

in my company they want to use LVM to handle a transition period while
moving VM guests from local datastore to a NAS (via iSCSI)

An example with numbers is worth thousands of words.
The idea is to have one leg locally and one leg on the NAS, then we'll
remove the local leg and tha machine will run with the leg on the NAS.

So there are two MBR-partitioned vdisks, 10G each, and with one big LVM
partition (0x8e)

I have created one VG spanning both disks and one LV hosted on the local
disk.

How to tell lvconvert that the mirror, of the LV I want, must entirely be
hosted on the second disk?

Thanks,

Alex

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

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

* Re: [linux-lvm] Forcing the lvconvert copy to be on a different physical disk
  2013-07-01 10:48 [linux-lvm] Forcing the lvconvert copy to be on a different physical disk Alessandro MACUZ
@ 2013-07-02 15:09 ` Mark H. Wood
  2013-07-02 15:56   ` Alessandro MACUZ
  0 siblings, 1 reply; 3+ messages in thread
From: Mark H. Wood @ 2013-07-02 15:09 UTC (permalink / raw)
  To: linux-lvm

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

On Mon, Jul 01, 2013 at 12:48:14PM +0200, Alessandro MACUZ wrote:
> in my company they want to use LVM to handle a transition period while
> moving VM guests from local datastore to a NAS (via iSCSI)
> 
> An example with numbers is worth thousands of words.
> The idea is to have one leg locally and one leg on the NAS, then we'll
> remove the local leg and tha machine will run with the leg on the NAS.
> 
> So there are two MBR-partitioned vdisks, 10G each, and with one big LVM
> partition (0x8e)
> 
> I have created one VG spanning both disks and one LV hosted on the local
> disk.
> 
> How to tell lvconvert that the mirror, of the LV I want, must entirely be
> hosted on the second disk?

It looks as though you simply specify the PV from which you want to
allocate the new extents, after the LV you are mirroring.  That is, if
you have a logical volume "LV" on /dev/sda1 and you want to mirror it
onto /dev/sdb1:

  lvconvert -m1 LV /dev/sdb1

Later I think you would do likewise to remove the local image from
/dev/sda1, leaving the image on /dev/sdb1:

  lvconvert -m0 LV /dev/sda1

*I have not yet done this*.  Please try it out on a test machine
before risking production data.

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Machines should not be friendly.  Machines should be obedient.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [linux-lvm] Forcing the lvconvert copy to be on a different physical disk
  2013-07-02 15:09 ` Mark H. Wood
@ 2013-07-02 15:56   ` Alessandro MACUZ
  0 siblings, 0 replies; 3+ messages in thread
From: Alessandro MACUZ @ 2013-07-02 15:56 UTC (permalink / raw)
  To: LVM general discussion and development

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

>
> It looks as though you simply specify the PV from which you want to
> allocate the new extents, after the LV you are mirroring.  That is, if
> you have a logical volume "LV" on /dev/sda1 and you want to mirror it
> onto /dev/sdb1:
>
>   lvconvert -m1 LV /dev/sdb1
>
> Later I think you would do likewise to remove the local image from
> /dev/sda1, leaving the image on /dev/sdb1:
>
>   lvconvert -m0 LV /dev/sda1
>
> *I have not yet done this*.  Please try it out on a test machine
> before risking production data.


That's it Mark.

Thanks!

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

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

end of thread, other threads:[~2013-07-02 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-01 10:48 [linux-lvm] Forcing the lvconvert copy to be on a different physical disk Alessandro MACUZ
2013-07-02 15:09 ` Mark H. Wood
2013-07-02 15:56   ` Alessandro MACUZ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).