FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 05-10-2011, 02:43 PM
Soeren Grunewald
 
Default 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@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 05-10-2011, 02:43 PM
Soeren Grunewald
 
Default 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@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 05-10-2011, 10:40 PM
"Geofrey Rainey"
 
Default Howto resize LVM on GPT partition.

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@redhat.com
[mailto:redhat-list-bounces@redhat.com] 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@redhat.com?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@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 05-11-2011, 12:09 AM
Matty Sarro
 
Default 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@tvnz.co.nz> 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@redhat.com
> [mailto:redhat-list-bounces@redhat.com] 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@redhat.com?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@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 05-11-2011, 08:05 AM
Nigel Wade
 
Default Howto resize LVM on GPT partition.

On 10/05/11 15:43, Soeren Grunewald wrote:
> 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
>

Why don't you just take the easy option of creating another 2TB
partition, then pvcreate and add it to the same VG? That's what LVM is
for, after all. Then you can extend the LV to use the increased space in
the VG.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 05-11-2011, 04:56 PM
Soeren Grunewald
 
Default Howto resize LVM on GPT partition.

Nigel Wade wrote:

Why don't you just take the easy option of creating another 2TB
partition, then pvcreate and add it to the same VG? That's what LVM is
for, after all. Then you can extend the LV to use the increased space in
the VG.


In general i would agree with you, thats what LVM is for. But it is
ugly, when i use LVM to combine 2 partitions on the same physical
storage which lay directly together. If it where 2 physical disk i would
do it without thinking about. But it is the same disk.


So it is nothing technical, it is that i just don't like this way.
--
Kind regards,
Soeren

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

Thread Tools




All times are GMT. The time now is 09:46 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org