resize lvm group on iscsi device

Oer2001

Member
Jul 12, 2011
43
0
6
Hello,

I installed some VMs on a lvm device (iscsi target).
Now the device is full (200GB), so I resize the iscsi target to 250GB.
But proxmox only shows 200GB in the storage manager.
How can I resize the lvm device to 250GB??

Thank you for help.

Regards,
Erik
 
Hello Dietmar,

yes I know the tools, but I dont no how to use it.

fdisk -l

Disk /dev/sdc: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

lvm: 200GB

What to do now??

Thank you for help,
Regards,
Erik
 
dietmar, that isn't very helpful. Try this:

Resizing Disk on ProxMox

1. First log into FreeNAS and resize the underlying iSCSI file: 10.130.1.1

Services -> ISCSI -> Extents -> SERVERNAME

Set the Extent Size to the appropriate value (64GB in my case).

2. Next log into the ProxMox server running the disk and go figure out where the iSCSCI volume is physically mounted.

Code:
pvdisplay

3. Now that you know where the volume is mounted ( /dev/sdc in my case ), go ahead and resize the physical volume to fill the disk.

Code:
pvresize /dev/sdc

4. Now that you’ve resized the physical volume, you need to resize logical volume.

These are stored under /dev/SERVER_LVM_NAME/vm-MACHINENUM-disk-NUM

So, for me: /dev/UniFi_LVM/vm-102-disk-1

Code:
lvresize –l +100%FREE /dev/UniFi_LVM/vm-102-disk-1

5. So now the LVM on the ProxMox box is resized, but for Ubuntu 12.04 and other modern Linux systems, your virtual disk runs on an LVM that is run on top of a virtual disk that is running on top of the ProxMox LVM (I know, right?)

6. To resize the disk for the host OS, I ended up booting into Knoppix. From there I was able to display the virtual disks:

Code:
vgdisplay

I then used gparted to enlarge the extended partition on which the LVM is hosted.

Then I created a new partition inside the extended partion, but didn’t format it.

Closing gparted, I use pvcreate to create a physical volume on the new partition.

Since my current LVM partition was /dev/vda5, I created /dev/vda6 in the new space.

pvcreate /dev/vda6
7. Now I add the new physical volume to the volume group:

Code:
vgextend VOLUMEGROUPNAME /dev/vda6

8. Finally, I boot back into the host OS and expand the ext4 file system to fill up the remaining space.

Code:
resize2fs –p /dev/mapper/unifi-root
 

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!