LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-09-2014, 12:08 PM   #1
donty
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Rep: Reputation: 0
Need to grow an LV on LVM2 on KVM instance using storage on an array via iSCSI +LVM


Hi all

OK, head is slowly getting around to working out what the right question is!

I have a KVM instance using LVM and has a small LV of 16GB that I want to grow.

The LV itself is in a VG that is built from a partition on a 20GB disk that has a 255MB boot, 19GB extended partition holding 19GB logical partition. The 19GB partition (sda5) is what makes the VG that is then split into a 2GB+ swap and the 16GB+LV that I want to grow.

Now, the 20GB disk in the KVM instance is in fact an LV on a much larger storage array. I have increased this LV to 170GB and on the KVM host lvdisplay shows the LV as 170GB with LE 43522.

First issue: The VM is not seeing this size increase even after a reboot.

Is the LV and therefore VMs disk actually 170GB? How would I check further? As this is a raw block device expanding the FS doesnt really make sense, so have I missed something?

It may be that I am approaching this all wrong and I should simply add another virtual disk and add it to the VG and then resize the LV to fit it? As a thought experiment I thought it might be useful to help me understand LVM more if I did it the 'harder' route as it would force some more knowledge in!

Any LVM2 gurus out there to give me a pointer?

Second issue: Once I get that down, the next thing I want to try is the same but with a LUKS encrypted partition on the VM from the option on a std Ubuntu install and then grow the LUKS partition in a similar way to this issue. Adding drives to such a VG and trying to grow the LV and LUKS partition dont seem to work for me, even when I simplify it by using a bigger physical drive after DDing to it.

Thanks for reading through this! all help gratefully received :-)

D
 
Old 05-09-2014, 12:37 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,673
Blog Entries: 15

Rep: Reputation: 1580Reputation: 1580Reputation: 1580Reputation: 1580Reputation: 1580Reputation: 1580Reputation: 1580Reputation: 1580Reputation: 1580Reputation: 1580Reputation: 1580
When you increase space in a Physical Volume (PV) you've put in a Volume Group (VG) you can use "pvresize" to tell the PV to see the new underlying space.

The wrinkle here is that the PV in your case is a "partition" as you've described. You may need to use fdisk or parted to first increase the size of the partition to see the new space (even though the "disk" being "partitioned" is actually an LV itself).

The following link was useful to us back in February when we were doing something similar with our MS Hyper-V cluster. (Don't ask why we're doing Hyper-V instead of KVM - not my decision). Although it talks about multipath and SAN you can ignore that as the other concepts are the same:

http://earlruby.org/2010/10/increasi...out-rebooting/
 
Old 05-09-2014, 02:44 PM   #3
donty
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Original Poster
Rep: Reputation: 0
OK, thanks very much for that, got some progress.

I have now got the VM seeing the new size vda at 170GB+ and got parted to increase the extended partition to 170GB+ but the logical partition stays stubbornly at 20GB and therefore I cant resize the VG or therefore the LV.

Are there any tools to resize a VG based on an extended partition?, in that as partitions can be PVs and the PV is a logical partition that now sits on a larger extended partition how do I get it to grow the logical partition across that and the VG to see that?

Trying hard to keep the partitions, LVs logical partitions and volume groups accurate!

Any more good tips?

Thanks

D
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Setup clustered LVM as shared VM storage for KVM LXer Syndicated Linux News 0 02-20-2014 06:11 PM
LXer: Set up RH VirtIO SCSI driver on Windows XP KVM at KVM-QEMU Instance on F14 LXer Syndicated Linux News 14 01-09-2011 12:21 PM
LXer: Install Oracle 11gR2 on SL6 KVM at KVM-QEMU Instance on SL 6 (alpha 3) LXer Syndicated Linux News 2 01-01-2011 06:42 AM
problem to access iscsi storage with lvm dougbourne Linux - Server 0 07-21-2008 01:22 PM
LVM and multiple iSCSI disks performance of LVM xxx_anuj_xxx Linux - Server 4 05-01-2008 12:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration