change directory size

fropa

Member
Dec 12, 2017
14
1
8
33
I installed Promxmox 5.1-38 version. I have 2T hard drive. After installation it has 90G local (PATH /var/lib/vz ) and the rest of hard is local-lvm (LVM-thin). Now I want to increase local up to 300G and leave the rest for local-lvm.

I do the following steps :
#lvremove pve/data
#lvresize -l 50000 pve/root
#lvcreate -L 300G -n data pve
#lvconvert --type thin-pool pve/data
#lvextend -l +100%FREE pve/root

After that everything is ok in lvs command :
root@Proxmox:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-a-tz-- 299.80g 0.00 1.22
root pve -wi-ao---- 1.52t
swap pve -wi-ao---- 8.00g

But it's not ok from web. It changes only local-lvm size not local directory, that is still 90G.

How can I do that ?
 
  • Like
Reactions: divyanshu
As you've not used the "-r" option for lvresize, which resize the volume AND recursively the underlying filesystem, you know need to run resize2fs /dev/mapper/pve-data
 
Tried, get error :

root@Proxmox:~# resize2fs /dev/mapper/pve-data
resize2fs 1.43.4 (31-Jan-2017)
resize2fs: Bad magic number in super-block while trying to open /dev/mapper/pve-data
Couldn't find valid filesystem superblock.
 
On what device is your /var/lib/vz mounted on ? My PVE have been upgraded since 4.0 so it may be a different device naming on fresh install.
 
Please do not touch pve-data - The file system we talk about is on /dev/mapper/pve-root

It's not how I've understood the "problem":

I installed Promxmox 5.1-38 version. I have 2T hard drive. After installation it has 90G local (PATH /var/lib/vz ) [...] But it's not ok from web. It changes only local-lvm size not local directory, that is still 90G.

For me, he wants to increase the "local" storage from 90 to 300GB, which is mounted on /var/lib/vz (pve-data) and not / (pve-root).