LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-07-2022, 02:09 PM   #1
xilex
LQ Newbie
 
Registered: Apr 2022
Posts: 1

Rep: Reputation: 0
Please help with resizing logical volume correctly


Hi all, I initially set up a Proxmox running inside ESXi with a small drive and would like to expand it now (64gb > 80gb). In ESXi, I increased the size of the hard drive for Proxmox. I'm not sure what to do inside Proxmox, however. I was reading a few threads online and ran a command (which I forgot), and it expanded it a little bit, but not what I expected. Someone instructed me to use a gparted live CD, so I used that and was able to expand the physical volume to 80GB.

Of note, I only have one VM running in Proxmox and current has 37GB hard drive size. It was 32GB and I increased the size to 37GB. But I would like to learn how to increase the size of /data/ (or pve-data) for more space for VMs. I have used ESXi mostly in the past, so the partition structure and commands in Proxmox are unfamiliar to me, and the LVM structure is unafaimilar. Thank you.

Code:
root@pve:~# lsblk
NAME                                              MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                                                 8:0    0   80G  0 disk 
├─sda1                                              8:1    0 1007K  0 part 
├─sda2                                              8:2    0  512M  0 part 
└─sda3                                              8:3    0 79.5G  0 part 
  ├─pve-swap                                      253:0    0    4G  0 lvm  [SWAP]
  ├─pve-root                                      253:1    0 15.8G  0 lvm  /
  ├─pve-data_tmeta                                253:2    0    1G  0 lvm  
  │ └─pve-data-tpool                              253:4    0 41.8G  0 lvm  
  │   ├─pve-data                                  253:5    0 41.8G  0 lvm  
  │   ├─pve-vm--100--disk--0                      253:6    0   37G  0 lvm  
  │   ├─pve-vm--100--disk--1                      253:7    0    4M  0 lvm  
  │   └─pve-vm--100--state--suspend--2021--03--21 253:8    0  8.5G  0 lvm  
  └─pve-data_tdata                                253:3    0 41.8G  0 lvm  
    └─pve-data-tpool                              253:4    0 41.8G  0 lvm  
      ├─pve-data                                  253:5    0 41.8G  0 lvm  
      ├─pve-vm--100--disk--0                      253:6    0   37G  0 lvm  
      ├─pve-vm--100--disk--1                      253:7    0    4M  0 lvm  
      └─pve-vm--100--state--suspend--2021--03--21 253:8    0  8.5G  0 lvm  
sr0                                                11:0    1 1024M  0 rom  
root@pve:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               pve
  PV Size               <79.50 GiB / not usable 1.98 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              20351
  Free PE               4096
  Allocated PE          16255
  PV UUID               eKtf2H-1zxT-PmVZ-Mq2F-HIQs-c3tv-IlxgLD
   
root@pve:~# lvscan
  ACTIVE            '/dev/pve/swap' [4.00 GiB] inherit
  ACTIVE            '/dev/pve/root' [15.75 GiB] inherit
  ACTIVE            '/dev/pve/data' [<41.75 GiB] inherit
  ACTIVE            '/dev/pve/vm-100-disk-0' [37.00 GiB] inherit
  ACTIVE            '/dev/pve/vm-100-disk-1' [4.00 MiB] inherit
  ACTIVE            '/dev/pve/vm-100-state-suspend-2021-03-21' [<8.49 GiB] inherit

root@pve:~# lvs
  LV                              VG  Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data                            pve twi-aotz-- <41.75g             85.47  3.34                            
  root                            pve -wi-ao----  15.75g                                                    
  swap                            pve -wi-ao----   4.00g                                                    
  vm-100-disk-0                   pve Vwi-a-tz--  37.00g data        96.43                                  
  vm-100-disk-1                   pve Vwi-a-tz--   4.00m data        3.12                                   
  vm-100-state-suspend-2021-03-21 pve Vwi-a-tz--  <8.49g data        0.00                 

root@pve:~# fdisk -l
Disk /dev/sda: 80 GiB, 85899345920 bytes, 167772160 sectors
Disk model: Virtual disk    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E1C1E873-0841-435E-B7F8-1BA20DF0BF28

Device       Start       End   Sectors  Size Type
/dev/sda1       34      2047      2014 1007K BIOS boot
/dev/sda2     2048   1050623   1048576  512M EFI System
/dev/sda3  1050624 167772126 166721503 79.5G Linux LVM




Disk /dev/mapper/pve-swap: 4 GiB, 4294967296 bytes, 8388608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/pve-root: 15.8 GiB, 16911433728 bytes, 33030144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/pve-vm--100--disk--0: 37 GiB, 39728447488 bytes, 77594624 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes
Disklabel type: gpt
Disk identifier: C65A35F5-9AA9-4E4C-9B82-1AB9F7E84198

Device                                  Start      End  Sectors  Size Type
/dev/mapper/pve-vm--100--disk--0-part1     40   409639   409600  200M EFI System
/dev/mapper/pve-vm--100--disk--0-part2 409640 77594583 77184944 36.8G unknown

Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.


Disk /dev/mapper/pve-vm--100--disk--1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes


Disk /dev/mapper/pve-vm--100--state--suspend--2021--03--21: 8.5 GiB, 9114222592 bytes, 17801216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes
 
Old 04-11-2022, 07:46 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,380
Blog Entries: 28

Rep: Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163
It's been a long time since I needed to mess with LVMs, but I found a tutorial at Red Hat that might be helpful.
 
  


Reply



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
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
LVM free space problem after resizing the logical volume wdorninger Linux - Enterprise 0 11-06-2009 07:00 AM
Resizing Logical Volume Partition BobNutfield Fedora 4 02-03-2008 05:56 PM
superblock error after resizing logical volume austin_it Linux - General 3 11-29-2007 03:56 AM
resizing a logical volume nicentral AIX 2 06-11-2005 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:08 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
Open Source Consulting | Domain Registration