[opensuse] Right (safe!) way to grow a VolumeGroup AND its parent partition?
Hi, I've successfully resized (grow & decrease) LVMs within a given Volume Group numerous times. Now I'd like to resize a Volume Group AND its parent partition, and am unclear as to the right/safe method. I have: /dev/sda 500 GB "/boot" /dev/sda1 200 MB LinuxNative, Ext4 (unallocated space) 100 GB /dev/sda3 200 GB LinuxLVM VG0 200 GB "/" (root) LV_A 50 GB Ext4 "/home" LV_B 100 GB Ext4 I'd like to (1) grow /dev/sda3 at the "front end" to use up the available 100 GB (2) grow the VG0 to use 100% of the now-larger /dev/sda3 Since "/" is ON the target partition, I've tried booting from the Opensuse 11.2 Live KDE CD and using its Partition Manager, but it tells me that /dev/sda4 is "in use", and unavailable for edit/resize. Before I go trying more brute-force methods, and subsequently losing my data, I thought I'd ask -- what's the RIGHT way to get this expansion done? Thanks, BenDJ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 12/27/2009 01:20 AM, Ben DJ pecked at the keyboard and wrote:
Hi,
I've successfully resized (grow & decrease) LVMs within a given Volume Group numerous times.
Now I'd like to resize a Volume Group AND its parent partition, and am unclear as to the right/safe method.
I have:
/dev/sda 500 GB "/boot" /dev/sda1 200 MB LinuxNative, Ext4 (unallocated space) 100 GB /dev/sda3 200 GB LinuxLVM VG0 200 GB "/" (root) LV_A 50 GB Ext4 "/home" LV_B 100 GB Ext4
I'd like to
(1) grow /dev/sda3 at the "front end" to use up the available 100 GB (2) grow the VG0 to use 100% of the now-larger /dev/sda3
Since "/" is ON the target partition, I've tried booting from the Opensuse 11.2 Live KDE CD and using its Partition Manager, but it tells me that /dev/sda4 is "in use", and unavailable for edit/resize.
Before I go trying more brute-force methods, and subsequently losing my data, I thought I'd ask -- what's the RIGHT way to get this expansion done?
Thanks,
BenDJ
Create a partition with the unused space and add it to VG0 then you will be able to grow your LV with the unused space. That is how logical volumes are supposed to work. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, 2009-12-26 at 22:20 -0800, Ben DJ wrote:
I have:
/dev/sda 500 GB "/boot" /dev/sda1 200 MB LinuxNative, Ext4 (unallocated space) 100 GB /dev/sda3 200 GB LinuxLVM VG0 200 GB "/" (root) LV_A 50 GB Ext4 "/home" LV_B 100 GB Ext4
I'd like to
(1) grow /dev/sda3 at the "front end" to use up the available 100 GB (2) grow the VG0 to use 100% of the now-larger /dev/sda3
Ken gave you the answer. Yast/System/Partition/Hard Disks there you add the partition, then go t Volume manger and add it to the volume. Now you can resize any of the logical volumes. The LVM is great. Of course if you want to redo your whole physical partition setup you have to back up the partitions, reformat the disk and reinstall (tar or cpio are good tools for backup) but using the LVM there is no purpose in doing it. -=terry=- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi, On Sun, Dec 27, 2009 at 5:14 AM, Ken Schneider - openSUSE <suse-list3@bout-tyme.net> wrote: On Sun, Dec 27, 2009 at 6:21 AM, Teruel de Campo MD <chusty@attglobal.net> wrote:
there you add the partition, then go t Volume manger and add it to the volume. Now you can resize any of the logical volumes.
The LVM is great. Of course if you want to redo your whole physical partition setup you have to back up the partitions, reformat the disk and reinstall (tar or cpio are good tools for backup) but using the LVM there is no purpose in doing it.
Thanks. It hadn't dawned on me to ADD a new partition -- I kept trying to grow the existing one :-/ Re: "no purpose in doing it" ... I understand your suggestion works. Is the multipartition VolumeGroup in any way less stable/ideal/etc? Also, once that partition is added to the VG, can LVs, new or existing, bridge across its boundaries, or must an LV be limited in size to within the contiguous boundary, i.e. <= 100 GB? BenDJ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 12/27/2009 12:27 PM, Ben DJ pecked at the keyboard and wrote:
Hi,
On Sun, Dec 27, 2009 at 5:14 AM, Ken Schneider - openSUSE <suse-list3@bout-tyme.net> wrote: On Sun, Dec 27, 2009 at 6:21 AM, Teruel de Campo MD <chusty@attglobal.net> wrote:
there you add the partition, then go t Volume manger and add it to the volume. Now you can resize any of the logical volumes.
The LVM is great. Of course if you want to redo your whole physical partition setup you have to back up the partitions, reformat the disk and reinstall (tar or cpio are good tools for backup) but using the LVM there is no purpose in doing it.
Thanks. It hadn't dawned on me to ADD a new partition -- I kept trying to grow the existing one :-/
Re: "no purpose in doing it" ... I understand your suggestion works. Is the multipartition VolumeGroup in any way less stable/ideal/etc?
Also, once that partition is added to the VG, can LVs, new or existing, bridge across its boundaries, or must an LV be limited in size to within the contiguous boundary, i.e. <= 100 GB?
BenDJ
Not at all, you can even add another disk and add only a portion of it the the VG before expanding the LV. That is one of the reasons for why it was invented back when disks where small and the need for space for a ever larger growing database was needed. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi, On Sun, Dec 27, 2009 at 9:47 AM, Ken Schneider - openSUSE <suse-list3@bout-tyme.net> wrote:
Also, once that partition is added to the VG, can LVs, new or existing, bridge across its boundaries, or must an LV be limited in size to within the contiguous boundary, i.e. <= 100 GB?
BenDJ
Not at all, you can even add another disk and add only a portion of it the the VG before expanding the LV. That is one of the reasons for why it was invented back when disks where small and the need for space for a ever larger growing database was needed.
Thanks for explaining! Very useful indeed :-) BenDJ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Ken Schneider - openSUSE said the following on 12/27/2009 12:47 PM:
Not at all, you can even add another disk and add only a portion of it the the VG before expanding the LV. That is one of the reasons for why it was invented back when disks where small and the need for space for a ever larger growing database was needed.
In fact you can add another physical disk to your VG0, do a PVmove (aka migrate) to move all the extents to the new drive, then lvremove them from the first drive so all the LVM is on the new drive, and then you can play with the partitioning of the old drive with all your data safely on the new drive. And of course you could move it back afterwards :-) But then it may make more sense to do do something like striping ... LVM is very flexible :-) -- A military operation involves deception. Even though you are competent, appear to be incompetent. Though effective, appear to be ineffective. Sun-tzu, The Art of War. Strategic Assessments -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sun, 2009-12-27 at 09:27 -0800, Ben DJ wrote:
Is the multipartition VolumeGroup in any way less stable/ideal/etc?
Not really. If you run an LVM using multiple disks if one disk goes bad you loose the data but of course is unlikely but I always have backups. We are talking of probabilities if you use physical partition and the disk goes bad you will loose the data if you do not have a backup. For cases where you can not afford any downtime you can have a raid and an lvm on the top. I do not have personal experience with this setup. I have been using LVM for many years, it was the way OS/2 handle storage, when I migrated to linux (suse 9.0 64) it was hard to understand that I had to go back to the "old" way or physical partitions. -=terry=- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Anton Aylward
-
Ben DJ
-
Ken Schneider - openSUSE
-
Teruel de Campo MD