Tag: disk

Remove orphan disks in Proxmox

Remove orphan disks in Proxmox

If you canceled disk movement in Proxmox, an orphaned disk will be created. In such case, it will not be shown in VM hardware configuration, and it can not be removed from storage session. If you try to remove it, you will have an error as the disk is attached to a VM.

In order to remove it, rescan disk is required.

Rescan

Use following command can make the orphan disk reattached to the VM.

qm rescan --vmid <vm_id>

*Note: rescan should be done in the Proxmox node which contains VM configuration, otherwise, could not find the VM configuration file error will appear.

References

https://forum.proxmox.com/threads/cancelled-disk-move-orphaned-disk.96650/

Rescan Proxmox Disks

Rescan Proxmox Disks

There are many reasons that some dangling disk images files exists in Proxmox folder. To remove them from the Proxmox storage, might not be possible, and they might be not shown in VM hardware items as well.

Use rescan command

This is to fix the following issues

  • Disk size change
  • Disk images with no owner
qm rescan

Rename or move old disk

If rescan can not fix the issue, rename the old disk or disk folder, then restart VM to confirm the disk file is not necessary. Then remove disk.

Error replace hard disk in zpool in TrueNAS

Error replace hard disk in zpool in TrueNAS

Got following error when trying to replace hard disk in zpool. Reboot is required.

middlewared.service_exception.CallError: [EFAULT] Partition type 6a898cc3-1dd2-11b2-99a6-080020736631 not found on sda

Partition exists

First issue with the partition which exists in the old hard disk. Use fdisk to remove all partitions. But still could not replace.

Use force option

Then click on force check box, the replacing was started, but stopped at 15%. Tried many times, but still failed. Search google, people got same issue, but they said sudden worked.

Run partprob

Run partprob, error shows the kernel didn't know the new partition table, reboot is required.

Check partition after reboot

After reboot, checked partition table, found TrueNAS had updated partition as others, which has one 2GB swap. Then force replace hard disk in pool again, then worked

Conclution

This is TrueNAS bug, which didn't close devices in kernel before repartition hard disk, this caused partition is opened and could not reread the new partition table into kernel.

Solution

Reboot

References

Cant create Pool on TrueNAS Scale (it does work on TrueNAS Core under same Hardware)
Cant create Pool on TrueNas Scale