As can be read in https://forum.proxmox.com/threads/a...a-disk-for-a-client-how-do-i-decrease.178622/ I have had an accident with my setup when I tried to resize some of my LVs. I am left with two specific problems regarding size and a warning I do not understand.
This was the situation before I started to adapt it:
I wanted to decrease (VG/LV)
My error was that I tried to do everything at PVE-level assuming that the VM would simply mount what there is. So, I tried to
Now, the issues are
On the client:
I am completely baffled (which is easy to do as I am not a Linux specialist). I appreciate all tips and suggestions.
This was the situation before I started to adapt it:
Code:
PVE Host INTERN SSD:
pve/vm-100-disk-2 (500GB) becomes scsi3 /dev/sdd1 on the client and is mounted on /mnt/ServerData; 24GB in use from 492GB
PVE Host EXTERN RAID1 (LUKS):
rna-mepdm-1/rna-pbs-mepdm-1 (500GB) is mounted on the PVE host as /mnt/pbs-backup-1; 40GB in use from 492GB
rna-mepdm-1/vm-100-disk-0 (500GB) becomes scsi1 /dev/sdb1 on the client mounted on /mnt/ServerBackup; 431GB in use from 492GB
rna-mepdm-1/rna-pbs-mepdm-1 to 200GB, increase rna-mepdm-1/vm-100-disk-0 to 800GB and decrease pve/vm-100-disk-2 to 300GB to make room for something else.My error was that I tried to do everything at PVE-level assuming that the VM would simply mount what there is. So, I tried to
lvresize rna-mepdm-1/vm-100-disk-0 and I made a complete idiotic error by forgetting about raw device (which was created on PVE and handed to the client) versus partition (which was created on the client). And at some point I made a mistake in doing an increase on the wrong virtual 'disk'. In the thread linked above I got help and I am now back to mostly OK (/mnt/pbs-backup-1 has an OK FS on the PVE host and /mnt/ServerData has an OK FS on the client), except for two things.Now, the issues are
- On the PVE host, the LV
rna-mepdm-1/vm-100-disk-0(inside the LUKS container that is on the physical external RAID device) is 800GB, but that becomes scsi1/dev/sdbon the client with 300GB. I am assuming t he data on this device has been lost. This is my primary backup, but luckily I have a secondary one in the cloud with the same data (just with a bit less granularity in time). Though the data may actually still be there I have no idea how to reach it. - On the PVE host, the LV
pve/vm-100-disk-2is 300GB, but that becomes scsi3/dev/sddon the client with 800GB (parted shows bigger numbers for all) . This is my primary data volume for that VM and luckily the data isn't lost there. And there is a warning I do not understand that seems clearly related.
Code:
root@pve:~# lvs
WARNING: Thin volume pve/vm-100-disk-2 maps <465.25 GiB while the size is only 300.00 GiB.
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-aotz-- <794.79g 64.62 2.14
root pve -wi-ao---- 96.00g
swap pve -wi-ao---- 8.00g
vm-100-disk-0 pve Vwi-aotz-- 32.00g data 52.66
vm-100-disk-1 pve Vwi-aotz-- 32.00g data 98.32
vm-100-disk-2 pve Vwi-aotz-- 300.00g data 100.00
rna-pbs-mepdm-1 rna-mepdm-1 -wi-ao---- 200.00g
vm-100-disk-0 rna-mepdm-1 -wi-ao---- 800.00g
root@pve:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1.7T 0 disk
`-sda1 8:1 0 1.7T 0 part
`-luks-fa1483bd-f599-4dcf-9732-c09069472150 252:9 0 1.7T 0 crypt
|-rna--mepdm--1-vm--100--disk--0 252:10 0 800G 0 lvm
`-rna--mepdm--1-rna--pbs--mepdm--1 252:11 0 200G 0 lvm /mnt/pbs-backup-1
On the client:
Code:
# parted -l /dev/sdb
...
Error: Invalid argument during seek for read on /dev/sdb
Retry/Ignore/Cancel? i
Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
OK/Cancel? OK
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sdb: 322GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
...
Warning: Not all of the space available to /dev/sdd appears to be used, you can fix the GPT to use all of
the space (an extra 629145600 blocks) or continue with the current setting?
Fix/Ignore? I
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sdd: 859GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 322GB 322GB ext4 Linux filesystem
I am completely baffled (which is easy to do as I am not a Linux specialist). I appreciate all tips and suggestions.
Last edited: