From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jmr.richardson@gmail.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id BC9266A795
 for <pve-user@lists.proxmox.com>; Sat, 23 Jan 2021 17:07:36 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id B0D0D249F9
 for <pve-user@lists.proxmox.com>; Sat, 23 Jan 2021 17:07:36 +0100 (CET)
Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com
 [IPv6:2607:f8b0:4864:20::231])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id 3BFBD249EB
 for <pve-user@lists.proxmox.com>; Sat, 23 Jan 2021 17:07:36 +0100 (CET)
Received: by mail-oi1-x231.google.com with SMTP id h6so8360125oie.5
 for <pve-user@lists.proxmox.com>; Sat, 23 Jan 2021 08:07:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:date:message-id:mime-version
 :content-transfer-encoding:thread-index:content-language;
 bh=lRzCPO07Olt6+Ap6QiTaJn8iW/bi8fc/DuOiRpz2MDI=;
 b=B5GQXU2kJocUL2ZEEaqrOhoNrFVcajWgImOjKojWc0+RbasmQHErJojdYDtG6aXpjG
 JWMqJWWrpDuz3MUXrsjz/K1KUdHSPqVursoUtW+/KJAt1mm6cybg+yuJ+jWhx2PFUDJR
 iXM0IVf/ZPJ9NmoEI7Tct/da7PYzO9kP3NhQnJUvXg3Ee7cTCtGCFe3ughiNghrhM7X7
 n4Ie4EdA1N+mnVH51y3LMSP50kCzqA2NEwUc4Qi1q7/5RfBAu+W28210ZTOCIej3MUCY
 15qo/8BPhvcz1YwMPlMHV72bK58s3xESrcSPo7F4PQdTB7x2NDq7shbH+71/dL3Lq3So
 O6ag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version
 :content-transfer-encoding:thread-index:content-language;
 bh=lRzCPO07Olt6+Ap6QiTaJn8iW/bi8fc/DuOiRpz2MDI=;
 b=Mt69CvWjDWYwW4uS6u96UmvX3IquFPkvlcT9ZxEUfUQmYYvUjXrKDPbx6/8NPA/7Mw
 tYxFrw1tR3c7TIg6y2qZOZpp8jsmrflXWBAY/fHju0jD4niQ/QRe3D7piazbTF4ERooD
 VMbfPv4YKj/EO5S31gttxwcum89XgSUL+58c+FJ8rIgQP8aoxJBIXM0BRuww0h9QrgOH
 QnDwoz8PqlDY0Lxc1crY+syNpxQ3ezqnsZObeQfKcXFQAvzP8670lf1aNn6pcyCOzuTS
 s7Ddd5I2YObH56DBYC42hV/r4g/Z/xKhRR0Jioo46vYtcQciSNbmH5Djzmk2igR66yN7
 BYJA==
X-Gm-Message-State: AOAM5335tfOUqc5M8ONqwx1QKYfStHP0pyArKNCCqSRhmdgY9WzTwMBK
 kVtcdrR+9bOwXOAF31ScYI+tnlzfbqo=
X-Google-Smtp-Source: ABdhPJwduh8T2GdPM89ICdYK+JZUId634rx/t3ikd4mWpcORf019pEwrLPZ5xrmkSUAsHfiZ31iFPw==
X-Received: by 2002:a54:4804:: with SMTP id j4mr6307511oij.85.1611418048639;
 Sat, 23 Jan 2021 08:07:28 -0800 (PST)
Received: from JRT7500 ([47.185.163.113])
 by smtp.gmail.com with ESMTPSA id l8sm2439914ota.9.2021.01.23.08.07.28
 for <pve-user@lists.proxmox.com>
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 23 Jan 2021 08:07:28 -0800 (PST)
From: "JR Richardson" <jmr.richardson@gmail.com>
To: <pve-user@lists.proxmox.com>
Date: Sat, 23 Jan 2021 10:07:26 -0600
Message-ID: <000201d6f1a1$d80b0d80$88212880$@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AdbxodXjwRbLFphhQzOzBhur3Wq/Kg==
Content-Language: en-us
X-SPAM-LEVEL: Spam detection results:  0
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
 FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider
 RCVD_IN_DNSWL_NONE     -0.0001 Sender listed at https://www.dnswl.org/,
 no trust
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [PVE-User] Unused Disk Remove vs Detach SOLVED
X-BeenThere: pve-user@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE user list <pve-user.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-user>, 
 <mailto:pve-user-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-user/>
List-Post: <mailto:pve-user@lists.proxmox.com>
List-Help: <mailto:pve-user-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user>, 
 <mailto:pve-user-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Sat, 23 Jan 2021 16:07:36 -0000

* JR Richardson <jmr.richardson@gmail.com> [210115 17:57]:
> I'm running PVE 6.2.11, I have VMs with Disks on NFS shared storage. I
> moved disks to other storage nodes but did not choose to delete the
> old disk, so the old disk is still assigned to the VM in hardware as
> 'Unused Disk 0'. When I select the disk, the 'Detach' button changes
> to 'Remove'. I remember in older versions of PVE, you could just
> 'Detach' disks instead of removing them. Is this due to the old
> storage node is still on-line? If I shutdown the old storage node,
> would I get the option to Detach Unused Disks?

I can only speculate, but essentially, completely detached disks are
invisible to PVE. I believe, on subsequent actions - like disk
moves, VM migrations, ... - the disk "numbers" can be reused. If
there's such an old disk around, the operation might either fail or
the disk might be silently overwritten.

>From this PoV, I would strongly recommend against fully detaching
disks from VMs.

> Can I get around this via command line utility to detach the old disk?

You can edit the VM definition file and remove the unusedN: line.

Best,
Chris

Hi Chris, I removed the unused disk from the VM.conf file and that
immediately removed it from the GUI. I shut down the storage node and kept
all my disks intact without errors.

Thanks.

JR

JR Richardson
Engineering for the Masses
Chasing the Azeotrope
JRx DistillCo
1'st Place Brisket
1'st Place Chili