Resizing LVM group on top of ISCSI

Nhoague

Renowned Member
Sep 29, 2012
90
4
73
45
Colorado, USA
Hello. I have a problem that I can not find the answer for in the forums.

I have a Nimble storage array that uses thin allocation. I setup a ISCSI volume for 2 TB originally. Then I added the ISCSI target and then setup LVM group using the ISCSI as the base storage. Works great! I have 5 guests running in that LVM group and performance is nice and fast.

However, now I need to add 1 TB to the volume group. In the Nimble I resized the volume to 3 TB. One host in my 4 host cluster sees the ISCSI LUN as 3 TB, but none of them see the LVM as 3 TB.

I have read about resizing partitions and such, but I'm (to be honest) scared to do that, and I need to minimize downtime as much as possible.

Ideas? Shouldn't the hosts just "see" the new size of the LVM as they do with RBD?

This is what my vgdisplay shows for that LVM group.

--- Volume group ---
VG Name DLT-SERVERS
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 12
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 7
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 2.00 TiB
PE Size 4.00 MiB
Total PE 524287
Alloc PE / Size 520192 / 1.98 TiB
Free PE / Size 4095 / 16.00 GiB
VG UUID FnY8Uw-Zi9S-JioS-NL7L-xTRq-kBdy-S1QSSR

It also doesnt show any extra FREE size. That should read 1 TB?

Thanks!
 
Assuming the OS is notified by changes to the disk (For /dev/sda -> echo 1 > /sys/block/sda/device/rescan)
then the following should do what you want:

1) pvresize DLT-SERVERS
2)
lvresize DLT-SERVERS/[your volume]
3) resize2fs [your volume]
 
Perfect! I built this in my lab, setup a few windows 7 guests, then resized an iscsi and ran the pvresive /dev/sdd (that was the device lvm lived on) and it resized instantly. Not a glitch in the guests!

Thanks for your info!
 
Sorry to bump this thread, but I am trying to resize another LVM now over ISCSI and having a different set of problems. Here is what I am doing.

1) Resize the ICSCI volume in Nimble from 1.0TB - 1.25TB
2) pvdisplay

--- Physical volume ---
PV Name /dev/sdo
VG Name MIS-SERVERS-LVM
PV Size 1024.00 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 262143
Free PE 13311
Allocated PE 248832
PV UUID f0dBBH-huOI-raTh-HaRO-XzU4-FEXT-OfLchw

3) First of all, the PV size should read 1.25TB, why is it not?
4) Then I run "pvresize /dev/sdo" and here is where I think my problems come.

Found duplicate PV gduMqd0lBR6UetAmiQQzqDN96CWSI0az: using /dev/sdj not /dev/sdh
Found duplicate PV 5EbEzhUW8mfqj9JlbEGfebmiRrnlnKdC: using /dev/sdaa not /dev/sdx
Found duplicate PV f0dBBHhuOIraThHaROXzU4FEXTOfLchw: using /dev/sdl not /dev/sdo
Found duplicate PV aTfjCq3kD1dGQB6fVKc9K27urTZGiyOJ: using /dev/sdae not /dev/sdab
Found duplicate PV iZ1J2yRdlv2aLgpmXJk3XSQ2EiYShPG9: using /dev/sdau not /dev/sdat
Found duplicate PV lTpyH00h0vhVyKwdM1IODO4eJiruMRKw: using /dev/sdp not /dev/sds
Physical volume "/dev/sdl" changed
1 physical volume(s) resized / 0 physical volume(s) not resized


What is also interesting is that the PV Name is different among all my hosts, is that going to be a problem?
And why all the duplicates?

And lastly, the volume doesnt ever get resized even though this says 1 pv resized, which I think is because it isn't seeing the new size.

Ideas? And thanks!
 
BUMP.

Can anyone explain why I have so many duplicate PV? I am running into this problem again where I need to resize the PV but these duplicates aren't allowing it to work.

Thanks!

EDIT:

I tried to find the duplicate entries and even did commands like "pvresize /dev/sdo /dev/sdn" since sdo and sdn were saying each other was the duplicate. PVresize would show 1 PV resized, but pvdisplay still showed the wrong size. So I did a "pvresize --setphysicalvolumesize 3.50t /dev/sdo" and it worked!

PV said overriding real size, but since this size does match what the iscsi volume size is, do you think I have anything to worry about?
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!