Discussion:
[lopsa-tech] Linux LVM question
(too old to reply)
John Stoffel
2017-06-16 20:48:44 UTC
Permalink
Matt> Before I screw something up, I wanted to ask for help.

I'd also suggest you go post in the linux-lvm mailing list as well,
but you also need to provide more details here.

Matt> I did a suboptimal job of setting up a VM on VirtualBox quite a
Matt> while back. The main data volume is a single 2TB virtual disk
Matt> (sitting on a 4TB physical disk) that the VM sees as a
Matt> drive.

So what's wrong here? Can you be more explicit?

Matt> When I set up the filesystem on the VM, I did use LVM since I
Matt> expected it to grow (BackupPC running on it). What I want to do
Matt> is move that single virtual disk to smaller (512GB) virtual
Matt> disks. I'm concerned about how to move a larger PV to multiple
Matt> smaller PVs. On AIX, I know I wouldn't have any problems, but
Matt> I've never done something like this on Linux using the Linux
Matt> LVM. Lots of other things, but never migrating from a single
Matt> large PV to multiple smaller PVs.

Well, you should also post your pvs, vgs and lvs output so we can see
what you have. But... I think you should be able to do this. You can
setup a simple 8mb loopback device and then four 2mb devices and play
around with the setup and process in a safe environment.

But it's also not clear to me which level you're really talking about
here. Is the layering something like this?

4tb disk -> lvm -> 2tb -> VirtualBox -> VM -> OS

Or is the 2tb disk inside virtual box?

In anycase, you might have to setup 4 x 512mb volumes, then stripe
across them in RAID0, then mirror that to the 2tb volume. But I don't
want to make suggestions until I really understand what you're doing
here.

John
--
This list provided by the League of Professional System Administrators
http://lopsa.org/
---
You received this message because you are subscribed to the Google Groups "LOPSA Tech Discussion list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tech+***@lopsa.org.
To post to this group, send email to ***@lopsa.org.
To view this discussion on the web visit https://groups.google.com/a/lopsa.org/d/msgid/tech/22852.17452.502053.913563%40quad.stoffel.home.
Guus Snijders
2017-06-16 22:45:37 UTC
Permalink
Op 16 jun. 2017 21:10 schreef "Matt Lawrence" <***@technoronin.com>:

Before I screw something up, I wanted to ask for help.

I did a suboptimal job of setting up a VM on VirtualBox quite a while
back. The main data volume is a single 2TB virtual disk (sitting on a 4TB
physical disk) that the VM sees as a drive.

[...]

What I want to do is move that single virtual disk to smaller (512GB)
virtual disks. I'm concerned about how to move a larger PV to multiple
smaller PVs. On AIX, I know I wouldn't have any problems, but I've never
done something like this on Linux using the Linux LVM. Lots of other
things, but never migrating from a single large PV to multiple smaller PVs.

Suggestions? Thoughts? Dire warnings?


I haven't done it myself, but it /sounds/ as easy as:
pvcreate, vgextend and vgreduce.

A slightly better alternative could be to mirror first and then breaking
the mirror. Though I think that this method will have more impact on the
performance during the process (assuming the vm's stay active).
Because the current situation uses a single disk, that will be the
bottleneck during the mirroring. The first method will immediately spread
the (write) load across all discs.


Mvg, Guus Snijders
--
This list provided by the League of Professional System Administrators
http://lopsa.org/
---
You received this message because you are subscribed to the Google Groups "LOPSA Tech Discussion list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tech+***@lopsa.org.
To post to this group, send email to ***@lopsa.org.
To view this discussion on the web visit https://groups.google.com/a/lopsa.org/d/msgid/tech/CAHntV0BJscL6dYbt_z_D5SJjfoRLAJygxVPFn69jrAcyNZL%2Bcw%40mail.gmail.com.
Adam Tauno Williams
2017-06-17 14:03:58 UTC
Permalink
Post by John Stoffel
Before I screw something up, I wanted to ask for help.
Suggestions?  Thoughts?  Dire warnings?
pvcreate, vgextend and vgreduce.
pvcreate, vgextend, pvmove, vgreduce.

vgreduce can only remove an EMPTY pv.

I've done this numerous times.  If you have enough 'other' space in the
VG it will just work, or tell you no.
--
Adam Tauno Williams <mailto:***@whitemice.org> GPG D95ED383
OpenGroupware Developer <http://www.opengroupware.us/>
--
This list provided by the League of Professional System Administrators
http://lopsa.org/
---
You received this message because you are subscribed to the Google Groups "LOPSA Tech Discussion list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tech+***@lopsa.org.
To post to this group, send email to ***@lopsa.org.
To view this discussion on the web visit https://groups.google.com/a/lopsa.org/d/msgid/tech/1497708238.7509.1.camel%40opengroupware.us.
Continue reading on narkive:
Loading...