[pve-devel] [PATCH manager 1/3] fix #2777: create zpool with stable dev links
Stoiko Ivanov
s.ivanov at proxmox.com
Thu Jun 4 13:50:53 CEST 2020
If a device has a stable /dev/disk/by-id link use that instead of /dev/sdX
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
www/manager6/node/ZFS.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/www/manager6/node/ZFS.js b/www/manager6/node/ZFS.js
index c978f742..b8978559 100644
--- a/www/manager6/node/ZFS.js
+++ b/www/manager6/node/ZFS.js
@@ -30,7 +30,11 @@ Ext.define('PVE.node.CreateZFS', {
});
disks.forEach(function(disk) {
- val.push(disk.get('devpath'));
+ if (disk.get('by_id_link') === undefined) {
+ val.push(disk.get('devpath'));
+ } else {
+ val.push(disk.get('by_id_link'));
+ }
});
me.down('field[name=devices]').setValue(val.join(','));
@@ -125,6 +129,10 @@ Ext.define('PVE.node.CreateZFS', {
dataIndex: 'devpath',
flex: 1
},
+ {
+ text: gettext('Stable Device Link'),
+ dataIndex: 'by_id_link',
+ },
{
text: gettext('Serial'),
dataIndex: 'serial'
--
2.20.1
More information about the pve-devel
mailing list