Duplicate disk after resize

ifsuser

New Member
Nov 2, 2023
6
0
1
After resizing a disk, the container has two disks assigned to it:

Code:
# pvesm list local-lvm


Volid Format Type Size VMID
.....
local-lvm:vm-1105-disk-0 raw rootdir 429496729600 1105
local-lvm:vm-1105-disk-1 raw rootdir 536870912000 1105
...

However, in your configuration you only have the second one:

Code:
rootfs: local-lvm:vm-1105-disk-1,size=500G

Can disk-0 be deleted safely?
 
Its unlikely that disk resize caused the duplication. Its more probable that you had a leftover disk from creating/deleting the CT from before.
I would recommend examining the log (journalctl), grepping for disk names and tracing their history. I'd be hesitant to recommend any data deletions without properly researching the source of the data.
Its really your call.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Thank you for your kind instructions

But journalctl does not show anything because the resize was done more than 1 year ago.

Container 1105 configuration uses only disk-1 (local-lvm:vm-1105-disk-1)
But the command "pvesm list local-lvm" shows disk-0 assigned to CT 1105

When trying to delete from the GUI I get the error: "Cannot remove image, a guest with VMID '1105' exists"
The disk is not in use, but deletion is not allow
Disk_remove.jpg
 
No, the disk is not in the panel or in the configuration file: /etc/pve/lxc/1105.conf
But 1105 is a Container. I can't use qm rescan

ct1105_hw.jpg
 
Use a corresponding container command:
man pct
Code:
pct rescan [OPTIONS]

       Rescan all storages and update disk sizes and unused disk images.

       --dryrun <boolean> (default = 0)
           Do not actually write changes out to conifg.

       --vmid <integer> (100 - 999999999)
           The (unique) ID of the VM.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
The rescan command worked, marking disk-0 as "unused", although it still appears in "pvesm list local-lvm"

But the GUI still won't let you delete it
Can it be deleted from the CLI?

Code:
# pct rescan
rescan volumes...
CT 1405: updated volume size of '/backups/shared/vm/1105' in config.
CT 1105: add unreferenced volume 'local-lvm:vm-1105-disk-0' as 'unused0' to config.
CT 1105: updated volume size of '/backups/shared/vm/1105' in config.
CT 1101: updated volume size of '/backups/shared/vm/1101' in config.
CT 1207: updated volume size of '/backups/shared/' in config.

# pvesm list local-lvm
Volid                    Format  Type              Size VMID
local-lvm:vm-1101-disk-0 raw     rootdir   322122547200 1101
local-lvm:vm-1103-disk-0 raw     rootdir   214748364800 1103
local-lvm:vm-1105-disk-0 raw     rootdir   429496729600 1105
local-lvm:vm-1105-disk-1 raw     rootdir   536870912000 1105
local-lvm:vm-1120-disk-0 raw     rootdir    85899345920 1120
 
I am using the "Resources" panel of the container 1105
In the VM they appear as Hardware but in containers I don't see anything else


1704727848020.png
 
doesn't work either: contains File System in use!
But this File System is the duplicate from when I resized from disk-0 to disk-1.

How can it be in use?

1704730383647.png
 
As I mentioned previously, its highly unlikely that resize had anything to do with your "duplicate" disk issue.
I dont know why the disk/filesystem is in-use, may be its mounted/attached somewhere else. At this point, reboot your host and it will likely work.

You can also plug the message in google "lvremove logical volume contains a filesystem in use" and read some of the discussion around this.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:

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!