Linux LVM users
 help / color / mirror / Atom feed
From: "Bryn M. Reeves" <bmr@redhat.com>
To: maillists@conactive.com,
	LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] shift PV from disk to raid device?
Date: Tue, 09 Dec 2008 18:06:24 +0000	[thread overview]
Message-ID: <493EB3A0.6020306@redhat.com> (raw)
In-Reply-To: <VA.000034f2.04473327@news.conactive.com>

Kai Schaetzl wrote:
> Stuart D. Gathman wrote on Tue, 9 Dec 2008 11:54:08 -0500 (EST):
> 
> Hallo, thanks for the suggestions. I'll try to follow that logically and with 
> possible commands, see below with comments/questions.
> 
>> 1) remove sda from md2 array
> 
> mdadm /dev/md2 --fail /dev/sda3 --remove /dev/sda3
> 
>> 2) use dd or pvremove to clear PV info in md2.  This should not
>>    affect sda since sda is removed from md2
> 
> md2 shouldn't have PV info. do you mean sdb3? (this would destroy my data on 
> sdb3 then), so:

Are you sure? If the MD array is a straightforward RAID1 mirror of two 
SD devices then the PV data should also be visible on the MD device - 
see my other post.

> vgchange dom0 -an (deactivate the LVs on sdb3)
> pvremove /dev/sdb3 ?
> After this point a pvdisplay should show /dev/sda3 as the active PV for dom0.
> (At the moment I get: "using /dev/sdb3 not /dev/sda3")
> 
>> 3) pvcreate md2 as a new PV and add to volume group
> 
> pvcreate /dev/md2
> I fear I will get "device busy", not? (just a feeling from recent experience 
> with juggling with md and lvm that are on top of each other)
> vgextend dom0 /dev/md2
> (dom0 then consists of sda3 and md2)

If there are still active LVs (or if the LVM2 tools recognise md2 as a 
PV) then you will get an error here - either that the device could not 
be opened exclusively (LVs present) or that you can't initialise the new 
PV without '-ff' as it is already part of a volume group.

Regards,
Bryn.

  reply	other threads:[~2008-12-09 18:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 23:41 [linux-lvm] shift PV from disk to raid device? Kai Schaetzl
2008-12-09 10:30 ` Bryn M. Reeves
2008-12-09 13:09   ` Kai Schaetzl
2008-12-09 14:24     ` Bryn M. Reeves
2008-12-09 17:22       ` Kai Schaetzl
2008-12-09 16:54   ` Stuart D. Gathman
2008-12-09 16:56     ` Stuart D. Gathman
2008-12-09 17:36     ` Bryn M. Reeves
2008-12-09 18:16       ` Kai Schaetzl
2008-12-09 18:32       ` Kai Schaetzl
2008-12-09 18:03     ` Kai Schaetzl
2008-12-09 18:06       ` Bryn M. Reeves [this message]
2008-12-09 18:20         ` Kai Schaetzl
2008-12-09 18:38           ` Stuart D. Gathman
2008-12-09 19:42             ` Kai Schaetzl
2008-12-09 19:56               ` Doug Ledford
2008-12-09 20:15                 ` Kai Schaetzl
2008-12-09 20:22                   ` Doug Ledford
2008-12-09 21:03                   ` Stuart D. Gathman
2008-12-09 21:22                     ` Doug Ledford
2008-12-09 20:38                 ` Kai Schaetzl
2008-12-09 20:51                   ` Doug Ledford
2008-12-09 21:04                   ` Stuart D. Gathman
2008-12-09 20:49                 ` Kai Schaetzl
2008-12-09 20:56                   ` Doug Ledford
2008-12-10  0:31               ` Kai Schaetzl

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=493EB3A0.6020306@redhat.com \
    --to=bmr@redhat.com \
    --cc=linux-lvm@redhat.com \
    --cc=maillists@conactive.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox