Re: [lvm] Howto resize LVM on GPT partition.



First you'll need to resize the partition, and after you'll need to
resize the filesystem you're currently using. LVM is made to be
resized; I wouldn't worry about that part. The part you have to watch
out for is resizing the filesystem. What FS are you using? If its ext2
you're going to run into some issues. Ext3 can be done live, as can
ext4 and XFS.

On Tue, May 10, 2011 at 6:40 PM, Geofrey Rainey
<Geofrey.Rainey@xxxxxxxxxx> wrote:
I've done 1. before and it works okay. Like you say, it's just a little
scary modifying the partition table, but it works. I'd back up your data
first though.

-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx
[mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Soeren Grunewald
Sent: Wednesday, 11 May 2011 2:43 a.m.
To: General Red Hat Linux discussion list
Subject: [lvm] Howto resize LVM on GPT partition.

Hi All,

We had a RHEL5.6 server which was installed with default settings on a
HW raid system. The raid was originally setup as raid1 with 2x2TB. Soon
we run out of storage, so we migrate to raid5. Now we have ~4TB, but
can't access the storage, because MBR supports only partitions up to
2TB.

So I've converted the MBR to GPT and fixed grub to boot again. That was
quite easy (following http://www.rodsbooks.com/gdisk/mbr2gpt.html).

But now i need to resize the physical LVM partition. And this is
something which makes me nervous.

Normally i would use fdisk to delete part2 and recreate it. Using parted

and resize command does not work because it is a LVM partition. and
mkpart does not know LVM as partition type too.

Finally i can use pvresize, but i have no idea if pvresize is working
correctly with GPT partitions and/or partitions size > 2TB.

In the end i have 2 options.
 1) try pvresize and pray
    - the way it should be, but scary
 2) create a new LVM partition and add it to the volume group.
    - uncool

So has anyone here done something before or any other ideas/comments?

Below some print outs which might be helpful.

parted:

Model: AMCC 9690SA-4I DISK (scsi)
Disk /dev/sda: 4000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name                Flags
 1      32.3kB  107MB   107MB   ext3         Linux/Windows data
 2      107MB   2000GB  2000GB               Linux LVM           lvm

pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               1.82 TB / not usable 225.00 KB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              59601
  Free PE               1
  Allocated PE          59600
  PV UUID               C0dkqJ-QObR-qx8I-EQZh-LV65-w2Df-nFJhw

lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                lBPFKP-OYX9-rPVU-f2RN-iO4q-Z9LP-RyFbUs
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.81 TB
  Current LE             59351
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol01
  VG Name                VolGroup00
  LV UUID                1uJ9kD-l9WD-gEjQ-grAz-uppa-Un3d-HijG6w
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                7.78 GB
  Current LE             249
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1


--
Kind regards,
Soeren

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
==========================================================
For more information on the Television New Zealand Group, visit us
online at tvnz.co.nz
==========================================================
CAUTION:  This e-mail and any attachment(s) contain information that
is intended to be read only by the named recipient(s).  This information
is not to be used or stored by any other person and/or organisation.


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

Relevant Pages

  • Re: Very BAD preupgrade experience.
    ... doesn't resize lvm, so that would be another problem. ... Problem is that the /boot is a separate regular partition. ... and then moving the physical partition. ...
    (Fedora)
  • Re: shrink logical volume group allowing size increase of boot partition
    ... To do this I'll need to resize my root partition which is LVM. ... Shrink a Logical volume - the one taking up ...
    (Fedora)
  • Re: What are the advantages of LVM?
    ... but that's not the case - you'll be able to resize ... I couldn't resize the / partition (which is what I thought ... actually have gained with LVM: I thought it was supposed to allow more ... Trouble is that you need to unmount the filesystem to resize it (at ...
    (Ubuntu)
  • Re: LVM resizing root partition quiestion
    ... > I ran the lvm lvscan, then lvm vgchange -ay, and then did the resize ... You say you did "the resize command"; ... You need to reduce the size of the filesystem before you ... I want to be able to backup the root partition of this machine as ...
    (Fedora)
  • When LVM Goes Bad
    ... I believe LVM is the default on Fedora partitioning now, at least I didn't love it that much that I would have selected it, and it is on all my boxes now. ... However LVM makes less sense on, say, a laptop which has and will only ever have a single 2.5" HDD for storage that is permanently available with the laptop. ... The resulting symptom was that the partition contents were no longer recognized as containing a logical volume or a volume group, nor pvscan, although pvdisplay could see it was a physical volume if pointed directly at the partition. ... Whether this explained the loss of LVMness or a subsequent logical brain damage that happened elsewhere did it I don't know. ...
    (Fedora)