Trying to extend pve-data on 'local' but don't understand the message returned

Gringo.Frenzy

New Member
Sep 11, 2013
5
0
1
Hi all, I've added a second physical hdd to my proxmox server and I'm trying to use it to extend the existing 'local' storage device.
(e.g. I do not want to add a second storage device/node, just extend what is already there using LVM).

This is my current setup.
/dev/sdb is the new hdd.

Code:
root@proxmox:~# lsblk
NAME                MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                   8:0    0 298.1G  0 disk
├─sda1                8:1    0     1M  0 part
├─sda2                8:2    0   510M  0 part /boot
└─sda3                8:3    0 297.6G  0 part
  ├─pve-root (dm-0) 253:0    0  74.5G  0 lvm  /
  ├─pve-swap (dm-1) 253:1    0     4G  0 lvm  [SWAP]
  └─pve-data (dm-2) 253:2    0 203.1G  0 lvm  /var/lib/vz
sdb                   8:16   0 465.8G  0 disk
└─sdb1                8:17   0 465.8G  0 part


I have performed the following steps, which all worked:

I have extended the 'pve' Volume Group using vgextend, but as you can see from the below, I don't think it is making use of the additional 465G space that has been added...

Code:
root@proxmox:~# vgextend pve /dev/sdb1
root@proxmox:~# vgdisplay
  --- Volume group ---
  VG Name               pve
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  7
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               763.35 GiB
  PE Size               4.00 MiB
  Total PE              195417
  Alloc PE / Size       72088 / 281.59 GiB
  Free  PE / Size       123329 / 481.75 GiB
  VG UUID               eUcGyo-8sNf-xBAE-BMJP-p3Rp-cOJo-8Okx1O

I did some searching on here and I found some responses saying that you need to also extend the pve-data LVM device using resize2fs.
So, I tried this, but I get the following message:

Code:
root@proxmox:~# resize2fs /dev/mapper/pve-data
resize2fs 1.42.5 (29-Jul-2012)
The filesystem is already 53239808 blocks long.  Nothing to do!

And after running it, I used the
Code:
df -h /var/lib/vz
command to check the new size and it's still only using 200G instead of the ~650G available to it.

Code:
root@proxmox:~# df -h /var/lib/vz
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/pve-data  200G  6.6G  194G   4% /var/lib/vz

Can anyone explain why resize2fs isn't working for me? Thanks!

I do not have any data on the new disk, so happy to delete partitions etc.....whatever is necessary!
 
Hello Gringo.Frenzy

Using the sequence (note the line in red!)

Code:
vgextend pve /dev/sdb1

[COLOR=#ff0000]lvextend -L +480G /dev/pve/data[/COLOR]

resize2fs /dev/mapper/pve-data

it should work

kind regards

Mr.Holmes
 

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!