Boot-SSD mit local/local-lvm erweitern nach cloning?

Jan 9, 2021
29
11
8
46
Hi,

haben auf meinem Proxmox-Host eine 240GB SSD eingebaut gehabt, das ist die Boot-SSD und darauf befindet sich auch local-lvm/lvm-thin Storage. Nach dem clonen mittels dd via Offline Linux-Rechner auf eine 960GB SSD funktioniert auch alles ganz normal. Jetzt möchte ich den lvm/thin-lvm space aber erweitern, sodaß die volle kapazität der SSD genutzt werden kann. Wie stelle ich das in Proxmox am besten an?

Vielen Dank!

LG Martin
 
Hi, was steht denn bei
Code:
pvs
vgs
lvs
fdisk -l
?
Wahrscheinlich braucht es
  1. fdisk
  2. pvresize
  3. lvextend
 
Hi, was steht denn bei
Code:
pvs
vgs
lvs
fdisk -l
?
Wahrscheinlich braucht es
  1. fdisk
  2. pvresize
  3. lvextend
Vielen Dank für deine Antwort, hier die outputs:

$ pvs
Code:
PV           VG   Fmt  Attr PSize    PFree
  /dev/nvme0n1 nvme lvm2 a--  <953.87g 648.00m
  /dev/sda3    pve  lvm2 a--  <223.07g <16.00g

$ vgs
Code:
VG   #PV #LV #SN Attr   VSize    VFree
  nvme   1  10   0 wz--n- <953.87g 648.00m
  pve    1   4   0 wz--n- <223.07g <16.00g

$ lvs
Code:
  LV            VG   Attr       LSize   Pool  Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvol1         nvme twi-aotz-- 953.00g              39.03  28.36                          
  vm-101-disk-0 nvme Vwi-aotz-- 210.00g lvol1        74.05                                
  vm-102-disk-0 nvme Vwi-aotz--  32.00g lvol1        9.83                                  
  vm-102-disk-1 nvme Vwi-aotz--   1.00g lvol1        0.00                                  
  vm-103-disk-0 nvme Vwi-aotz--   4.00m lvol1        12.50                                
  vm-103-disk-1 nvme Vwi-aotz-- 512.00g lvol1        38.20                                
  vm-201-disk-0 nvme Vwi-a-tz-- 135.00g lvol1        4.64                                  
  vm-301-disk-0 nvme Vwi-aotz--   8.00g lvol1        58.38                                
  vm-302-disk-0 nvme Vwi-aotz--  16.00g lvol1        33.62                                
  vm-303-disk-0 nvme Vwi-aotz--   8.00g lvol1        17.70                                
  data          pve  twi-aotz-- 140.45g              1.35   1.20                          
  root          pve  -wi-ao----  55.75g                                                    
  swap          pve  -wi-ao----   8.00g                                                    
  vm-202-disk-0 pve  Vwi-a-tz--  32.00g data         5.93

$ fdisk -l
Code:
Disk /dev/loop0: 2 TiB, 2199023255552 bytes, 4294967296 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/nvme0n1: 953.9 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: KXG60ZNV1T02 TOSHIBA                  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes




GPT PMBR size mismatch (468862127 != 1875385007) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
Disk /dev/sda: 894.3 GiB, 960197124096 bytes, 1875385008 sectors
Disk model: INTEL SSDSC2KG96
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: F45DFF89-6D52-4309-BDEF-7DF538DC5DF7


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 468862094 467811471 223.1G Linux LVM


Partition 1 does not start on physical sector boundary.


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

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




Disk /dev/mapper/pve-vm--202--disk--0: 32 GiB, 34359738368 bytes, 67108864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes
Disklabel type: dos
Disk identifier: 0x18135366


Device                                 Boot    Start      End  Sectors  Size Id Type
/dev/mapper/pve-vm--202--disk--0-part1 *        2048 65107967 65105920   31G 83 Linux
/dev/mapper/pve-vm--202--disk--0-part2      65110014 67106815  1996802  975M  5 Extended
/dev/mapper/pve-vm--202--disk--0-part5      65110016 67106815  1996800  975M 82 Linux swap / Solaris


Partition 2 does not start on physical sector boundary.




Disk /dev/mapper/nvme-vm--101--disk--0: 210 GiB, 225485783040 bytes, 440401920 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes
Disklabel type: dos
Disk identifier: 0x0c77572c


Device                                  Boot     Start       End   Sectors   Size Id Type
/dev/mapper/nvme-vm--101--disk--0-part1 *         2048 396085247 396083200 188.9G 83 Linux
/dev/mapper/nvme-vm--101--disk--0-part2      396085248 400279807   4194560     2G  5 Extended
/dev/mapper/nvme-vm--101--disk--0-part5      396089344 400277503   4188160     2G 82 Linux swap / Solaris


Disk /dev/mapper/nvme-vm--301--disk--0: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes




Disk /dev/mapper/nvme-vm--302--disk--0: 16 GiB, 17179869184 bytes, 33554432 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes




Disk /dev/mapper/nvme-vm--102--disk--0: 32 GiB, 34359738368 bytes, 67108864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes
Disklabel type: dos
Disk identifier: 0x18135366


Device                                  Boot    Start      End  Sectors  Size Id Type
/dev/mapper/nvme-vm--102--disk--0-part1 *        2048 65107967 65105920   31G 83 Linux
/dev/mapper/nvme-vm--102--disk--0-part2      65110014 67106815  1996802  975M  5 Extended
/dev/mapper/nvme-vm--102--disk--0-part5      65110016 67106815  1996800  975M 82 Linux swap / Solaris

Partition 2 does not start on physical sector boundary.


Disk /dev/mapper/nvme-vm--102--disk--1: 1 GiB, 1073741824 bytes, 2097152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes

Disk /dev/mapper/nvme-vm--201--disk--0: 135 GiB, 144955146240 bytes, 283115520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes
Disklabel type: dos
Disk identifier: 0x0c77572c

Device                                  Boot     Start       End   Sectors   Size Id Type
/dev/mapper/nvme-vm--201--disk--0-part1 *         2048 258406399 258404352 123.2G 83 Linux
/dev/mapper/nvme-vm--201--disk--0-part2      258408446 262598655   4190210     2G  5 Extended
/dev/mapper/nvme-vm--201--disk--0-part5      258408448 262598655   4190208     2G 82 Linux swap / Solaris

Partition 2 does not start on physical sector boundary.


Disk /dev/mapper/nvme-vm--103--disk--0: 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): 524288 bytes / 524288 bytes


Disk /dev/mapper/nvme-vm--103--disk--1: 512 GiB, 549755813888 bytes, 1073741824 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes
Disklabel type: gpt
Disk identifier: 44075EA1-24CF-4E53-8461-011A2219E99D

Device                                       Start        End    Sectors   Size Type
/dev/mapper/nvme-vm--103--disk--1-part1       2048    1050623    1048576   512M EFI System
/dev/mapper/nvme-vm--103--disk--1-part2    1050624 1069549567 1068498944 509.5G Linux filesystem
/dev/mapper/nvme-vm--103--disk--1-part3 1069549568 1073739775    4190208     2G Linux swap


Disk /dev/mapper/nvme-vm--303--disk--0: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes

$ lsblk
Code:
NAME                         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0                          7:0    0     2T  0 loop
sda                            8:0    1 894.3G  0 disk
├─sda1                         8:1    1  1007K  0 part
├─sda2                         8:2    1   512M  0 part
└─sda3                         8:3    1 223.1G  0 part
  ├─pve-swap                 253:0    0     8G  0 lvm  [SWAP]
  ├─pve-root                 253:1    0  55.8G  0 lvm  /
  ├─pve-data_tmeta           253:2    0   1.4G  0 lvm 
  │ └─pve-data-tpool         253:4    0 140.5G  0 lvm 
  │   ├─pve-data             253:5    0 140.5G  0 lvm 
  │   └─pve-vm--202--disk--0 253:6    0    32G  0 lvm 
  └─pve-data_tdata           253:3    0 140.5G  0 lvm 
    └─pve-data-tpool         253:4    0 140.5G  0 lvm 
      ├─pve-data             253:5    0 140.5G  0 lvm 
      └─pve-vm--202--disk--0 253:6    0    32G  0 lvm 
nvme0n1                      259:0    0 953.9G  0 disk
├─nvme-lvol1_tmeta           253:7    0   120M  0 lvm 
│ └─nvme-lvol1-tpool         253:9    0   953G  0 lvm 
│   ├─nvme-lvol1             253:10   0   953G  0 lvm 
│   ├─nvme-vm--101--disk--0  253:11   0   210G  0 lvm 
│   ├─nvme-vm--301--disk--0  253:12   0     8G  0 lvm 
│   ├─nvme-vm--302--disk--0  253:13   0    16G  0 lvm 
│   ├─nvme-vm--102--disk--0  253:14   0    32G  0 lvm 
│   ├─nvme-vm--102--disk--1  253:15   0     1G  0 lvm 
│   ├─nvme-vm--201--disk--0  253:16   0   135G  0 lvm 
│   ├─nvme-vm--103--disk--0  253:17   0     4M  0 lvm 
│   ├─nvme-vm--103--disk--1  253:18   0   512G  0 lvm 
│   └─nvme-vm--303--disk--0  253:20   0     8G  0 lvm 
└─nvme-lvol1_tdata           253:8    0   953G  0 lvm 
  └─nvme-lvol1-tpool         253:9    0   953G  0 lvm 
    ├─nvme-lvol1             253:10   0   953G  0 lvm 
    ├─nvme-vm--101--disk--0  253:11   0   210G  0 lvm 
    ├─nvme-vm--301--disk--0  253:12   0     8G  0 lvm 
    ├─nvme-vm--302--disk--0  253:13   0    16G  0 lvm 
    ├─nvme-vm--102--disk--0  253:14   0    32G  0 lvm 
    ├─nvme-vm--102--disk--1  253:15   0     1G  0 lvm 
    ├─nvme-vm--201--disk--0  253:16   0   135G  0 lvm 
    ├─nvme-vm--103--disk--0  253:17   0     4M  0 lvm 
    ├─nvme-vm--103--disk--1  253:18   0   512G  0 lvm 
    └─nvme-vm--303--disk--0  253:20   0     8G  0 lvm
 
Last edited:
Es geht darum /dev/sda zu erweitern? Dann scheint es für mich genau die 3 Schritte zu benötigen:

  1. fdisk um die Partition /dev/sda3 zu vergrößern
  2. pvresize /dev/sda3 und
  3. lvextend um dann die volumes anzupassen
 

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!