* [gentoo-user] Moving LVMs around
@ 2007-12-05 15:24 Mick
2007-12-05 15:45 ` Albert Hopkins
0 siblings, 1 reply; 6+ messages in thread
From: Mick @ 2007-12-05 15:24 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 426 bytes --]
Hi All,
Could you please hold my hand sorting some LVMs - I have no experience on this
and would not like to mess it up:
I have create a PV which currently contains /dev/sda5. I have also created a
new PV which contains /dev/sdc1. I want to move /dev/sda5 (11.9G)
to /dev/sdc1 (150G) and then remove /dev/sda5 from this OS and later on from
this machine. How should/could I go about it?
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] Moving LVMs around
2007-12-05 15:24 [gentoo-user] Moving LVMs around Mick
@ 2007-12-05 15:45 ` Albert Hopkins
2007-12-05 16:28 ` Mick
0 siblings, 1 reply; 6+ messages in thread
From: Albert Hopkins @ 2007-12-05 15:45 UTC (permalink / raw
To: gentoo-user
On Wed, 2007-12-05 at 15:24 +0000, Mick wrote:
> Hi All,
>
> Could you please hold my hand sorting some LVMs - I have no experience on this
> and would not like to mess it up:
>
> I have create a PV which currently contains /dev/sda5. I have also created a
> new PV which contains /dev/sdc1. I want to move /dev/sda5 (11.9G)
> to /dev/sdc1 (150G) and then remove /dev/sda5 from this OS and later on from
> this machine. How should/could I go about it?
1. Back up your data!
2. Add /dev/sdc1 to the same VG as /dev/sda5 (vgextend)
3. pvmove -v /dev/sda5 /dev/sdc1
4. Wait a really long time
5. Verify nothing is on sda5 (pvdisplay /dev/sda5)
6. Deallocate sda5 (pvchange -x n /dev/sda5)
7. Remove sda5 from the VG (pvremove)
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] Moving LVMs around
2007-12-05 15:45 ` Albert Hopkins
@ 2007-12-05 16:28 ` Mick
2007-12-05 16:54 ` Neil Bothwick
0 siblings, 1 reply; 6+ messages in thread
From: Mick @ 2007-12-05 16:28 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]
On Wednesday 05 December 2007, Albert Hopkins wrote:
> On Wed, 2007-12-05 at 15:24 +0000, Mick wrote:
> > Hi All,
> >
> > Could you please hold my hand sorting some LVMs - I have no experience on
> > this and would not like to mess it up:
> >
> > I have create a PV which currently contains /dev/sda5. I have also
> > created a new PV which contains /dev/sdc1. I want to move /dev/sda5
> > (11.9G) to /dev/sdc1 (150G) and then remove /dev/sda5 from this OS and
> > later on from this machine. How should/could I go about it?
>
> 1. Back up your data!
> 2. Add /dev/sdc1 to the same VG as /dev/sda5 (vgextend)
> 3. pvmove -v /dev/sda5 /dev/sdc1
> 4. Wait a really long time
> 5. Verify nothing is on sda5 (pvdisplay /dev/sda5)
> 6. Deallocate sda5 (pvchange -x n /dev/sda5)
> 7. Remove sda5 from the VG (pvremove)
Life saver!
Question re. step 2: Does /dev/sdc1 *have* to be added (vgextend) to the same
VG_old as /dev/sda5, or could it be added (vgcreate) to a new VG_new?
Thanks!
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] Moving LVMs around
2007-12-05 16:28 ` Mick
@ 2007-12-05 16:54 ` Neil Bothwick
2007-12-05 21:31 ` Mick
0 siblings, 1 reply; 6+ messages in thread
From: Neil Bothwick @ 2007-12-05 16:54 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 650 bytes --]
On Wed, 5 Dec 2007 16:28:27 +0000, Mick wrote:
> Question re. step 2: Does /dev/sdc1 *have* to be added (vgextend) to
> the same VG_old as /dev/sda5, or could it be added (vgcreate) to a new
> VG_new?
It has to be added to do a pvmove. If you want to create a new volume
group, you may as well create it and use rsync to copy the contents of
the old LVs over. If the only reason for the change is to have a
different name, use vgrename either before or after the move. You can't
run vgrename on an in-use VG, so boot into single user mode or from a
live CD.
--
Neil Bothwick
What was the greatest thing BEFORE sliced bread?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] Moving LVMs around
2007-12-05 16:54 ` Neil Bothwick
@ 2007-12-05 21:31 ` Mick
2007-12-05 23:51 ` Neil Bothwick
0 siblings, 1 reply; 6+ messages in thread
From: Mick @ 2007-12-05 21:31 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 799 bytes --]
On Wednesday 05 December 2007, Neil Bothwick wrote:
> On Wed, 5 Dec 2007 16:28:27 +0000, Mick wrote:
> > Question re. step 2: Does /dev/sdc1 *have* to be added (vgextend) to
> > the same VG_old as /dev/sda5, or could it be added (vgcreate) to a new
> > VG_new?
>
> It has to be added to do a pvmove. If you want to create a new volume
> group, you may as well create it and use rsync to copy the contents of
> the old LVs over. If the only reason for the change is to have a
> different name, use vgrename either before or after the move. You can't
> run vgrename on an in-use VG, so boot into single user mode or from a
> live CD.
Thanks Neil,
This is a data partition, so if I unmount it I guess I can vgrename it? Do I
need to run vgchange -a n first?
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] Moving LVMs around
2007-12-05 21:31 ` Mick
@ 2007-12-05 23:51 ` Neil Bothwick
0 siblings, 0 replies; 6+ messages in thread
From: Neil Bothwick @ 2007-12-05 23:51 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 350 bytes --]
On Wed, 5 Dec 2007 21:31:35 +0000, Mick wrote:
> This is a data partition, so if I unmount it I guess I can vgrename
> it? Do I need to run vgchange -a n first?
It wouldn't hurt. I've only done this with VGs that contain system
partitions, so I always used a live CD to do it.
--
Neil Bothwick
In the begining, there was nothing.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-12-06 0:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05 15:24 [gentoo-user] Moving LVMs around Mick
2007-12-05 15:45 ` Albert Hopkins
2007-12-05 16:28 ` Mick
2007-12-05 16:54 ` Neil Bothwick
2007-12-05 21:31 ` Mick
2007-12-05 23:51 ` Neil Bothwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox