[pve-devel] [PATCH installer 1/3] expand comment on /sys/block/$dev/size

Stoiko Ivanov s.ivanov at proxmox.com
Tue Nov 26 15:27:45 CET 2019


/sys/block/$dev/size is also given in 512b sectors even for 4kn disks.

Since it surprised me - mention it explicitly in the comment

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 proxinstall | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxinstall b/proxinstall
index 5d02b34..1a5acc5 100755
--- a/proxinstall
+++ b/proxinstall
@@ -686,7 +686,7 @@ sub hd_size {
 
     foreach my $hd (@$hds) {
 	my ($disk, $devname, $size, $model) = @$hd;
-	# size is always in 512B "sectors"! convert to KB
+	# size is always (also for 4kn disks) in 512B "sectors"! convert to KB
 	return int($size/2) if $devname eq $dev;
     }
 
-- 
2.20.1





More information about the pve-devel mailing list