New drive added 1TB to 2TB

myozone

Member
Dec 4, 2021
15
0
6
59
I'm about to get a new NVME M.2 2TB SSD for my Proxmox 7.4-17 I currently have a 1TB SATA SSD and have Proxmox and VM's on the 1TB drive.
When I installed Proxmox I used

Code:
Commands for single drive storage:
-----------------
lvremove /dev/pve/data
lvresize -l +100%FREE /dev/pve/root
resize2fs /dev/mapper/pve-root


To have a single drive storage and remove the LVM the video is here I used.
Can I copy the contents from the 1TB over the new 2TB using Clonezilla and enlarge the partition with Gparted ?

I tested this idea with a nested Proxmox 8.0.3 VM but the drive appeared to show the previous size ? I had two virtual drives 8GB and 32GB I installed to the 8GB first then cloned over to the 32GB and extended the partition. Is there a correct way of installing a new drive ?
 
Last edited:
UPDATE:-
I reread my own post and tried
Code:
lvresize -l +100%FREE pve/root
resize2fs /dev/mapper/pve-root

and that appeared to fix the size not showing up correctly. I assume this is the correct way of doing this ?
 
There are instructions here: https://pve.proxmox.com/wiki/Resize_disks

Your commands are basically not that wrong, but not entirely correct either (see instructions). Please provide us with some outputs that show what your current partitions, PV, LV etc. layout looks like.
 
Thank you for replying.

I think this covers your query, obviously this is a virtualized Proxmox nested in my main Proxmox.

Code:
root@pve:~# lvs
  LV   VG  Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root pve -wi-ao----  30.62g
  swap pve -wi-ao---- 896.00m

root@pve:~# pvs
  PV         VG  Fmt  Attr PSize   PFree
  /dev/sda3  pve lvm2 a--  <31.50g    0

root@pve:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda            8:0    0   32G  0 disk
├─sda1         8:1    0 1007K  0 part
├─sda2         8:2    0  512M  0 part
└─sda3         8:3    0 31.5G  0 part
  ├─pve-swap 253:0    0  896M  0 lvm  [SWAP]
  └─pve-root 253:1    0 30.6G  0 lvm  /
sr0           11:0    1  512M  0 rom

root@pve:~# fdisk -l
Disk /dev/sda: 32 GiB, 34359738368 bytes, 67108864 sectors
Disk model: QEMU HARDDISK
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: EDD3288B-CEB9-4151-906E-9600E8CC5F2E

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 67106815 66056192 31.5G Linux LVM


Disk /dev/mapper/pve-swap: 896 MiB, 939524096 bytes, 1835008 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: 30.62 GiB, 32879149056 bytes, 64217088 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

 lvdisplay
  --- Logical volume ---
  LV Path                /dev/pve/swap
  LV Name                swap
  VG Name                pve
  LV UUID                1bNHYY-3ym7-4DU4-rHlQ-hLg1-FsAl-19uGKY
  LV Write Access        read/write
  LV Creation host, time proxmox, 2023-11-19 11:42:11 +0000
  LV Status              available
  # open                 2
  LV Size                896.00 MiB
  Current LE             224
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Path                /dev/pve/root
  LV Name                root
  VG Name                pve
  LV UUID                EofnNw-DPxx-EKDN-3j4I-IW6P-intk-yX08cz
  LV Write Access        read/write
  LV Creation host, time proxmox, 2023-11-19 11:42:11 +0000
  LV Status              available
  # open                 1
  LV Size                30.62 GiB
  Current LE             7839
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
 

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!