From a54e48da5db6622d12d7b6fa3d425127f34b1836 Mon Sep 17 00:00:00 2001
From: Nathan Paulin <nathan.paulin@inria.fr>
Date: Mon, 3 Mar 2025 16:07:09 +0100
Subject: [PATCH] [sophia][mercantour5] add disk config

---
 .../clusters/mercantour5/nodes/mercantour5-1.json    | 12 +++++++++++-
 .../clusters/mercantour5/nodes/mercantour5-2.json    | 12 +++++++++++-
 .../clusters/mercantour5/nodes/mercantour5-3.json    | 12 +++++++++++-
 .../clusters/mercantour5/nodes/mercantour5-4.json    | 12 +++++++++++-
 input/grid5000/disks.yaml                            |  1 +
 .../sophia/clusters/mercantour5/mercantour5.yaml     |  8 ++++++--
 .../sites/sophia/clusters/mercantour5/nodes.yaml.erb |  4 ++++
 7 files changed, 55 insertions(+), 6 deletions(-)

diff --git a/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-1.json b/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-1.json
index bb1974a1617..5e1be964c39 100644
--- a/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-1.json
+++ b/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-1.json
@@ -105,13 +105,23 @@
   "storage_devices": [
     {
       "by_id": "",
-      "by_path": "/dev/disk/by-path/dummy",
+      "by_path": "/dev/disk/by-path/pci-0000:3b:00.0-scsi-0:2:0:0",
       "id": "disk0",
       "interface": "SAS",
       "model": "unknown",
       "size": 8,
       "storage": "SSD",
       "vendor": "Unknown"
+    },
+    {
+      "by_id": "",
+      "by_path": "/dev/disk/by-path/pci-0000:3b:00.0-scsi-0:2:1:0",
+      "id": "disk1",
+      "interface": "SSD",
+      "model": "unknown",
+      "size": 8,
+      "storage": "SSD",
+      "vendor": "Unknown"
     }
   ],
   "supported_job_types": {
diff --git a/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-2.json b/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-2.json
index 79b99ddc600..731995a76c6 100644
--- a/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-2.json
+++ b/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-2.json
@@ -105,13 +105,23 @@
   "storage_devices": [
     {
       "by_id": "",
-      "by_path": "/dev/disk/by-path/dummy",
+      "by_path": "/dev/disk/by-path/pci-0000:3b:00.0-scsi-0:2:0:0",
       "id": "disk0",
       "interface": "SAS",
       "model": "unknown",
       "size": 8,
       "storage": "SSD",
       "vendor": "Unknown"
+    },
+    {
+      "by_id": "",
+      "by_path": "/dev/disk/by-path/pci-0000:3b:00.0-scsi-0:2:1:0",
+      "id": "disk1",
+      "interface": "SSD",
+      "model": "unknown",
+      "size": 8,
+      "storage": "SSD",
+      "vendor": "Unknown"
     }
   ],
   "supported_job_types": {
diff --git a/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-3.json b/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-3.json
index 0ed9dc86f5f..eb7aea67984 100644
--- a/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-3.json
+++ b/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-3.json
@@ -105,13 +105,23 @@
   "storage_devices": [
     {
       "by_id": "",
-      "by_path": "/dev/disk/by-path/dummy",
+      "by_path": "/dev/disk/by-path/pci-0000:3b:00.0-scsi-0:2:0:0",
       "id": "disk0",
       "interface": "SAS",
       "model": "unknown",
       "size": 8,
       "storage": "SSD",
       "vendor": "Unknown"
+    },
+    {
+      "by_id": "",
+      "by_path": "/dev/disk/by-path/pci-0000:3b:00.0-scsi-0:2:1:0",
+      "id": "disk1",
+      "interface": "SSD",
+      "model": "unknown",
+      "size": 8,
+      "storage": "SSD",
+      "vendor": "Unknown"
     }
   ],
   "supported_job_types": {
diff --git a/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-4.json b/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-4.json
index 7e445bb9d97..9480be26030 100644
--- a/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-4.json
+++ b/data/grid5000/sites/sophia/clusters/mercantour5/nodes/mercantour5-4.json
@@ -105,13 +105,23 @@
   "storage_devices": [
     {
       "by_id": "",
-      "by_path": "/dev/disk/by-path/dummy",
+      "by_path": "/dev/disk/by-path/pci-0000:3b:00.0-scsi-0:2:0:0",
       "id": "disk0",
       "interface": "SAS",
       "model": "unknown",
       "size": 8,
       "storage": "SSD",
       "vendor": "Unknown"
+    },
+    {
+      "by_id": "",
+      "by_path": "/dev/disk/by-path/pci-0000:3b:00.0-scsi-0:2:1:0",
+      "id": "disk1",
+      "interface": "SSD",
+      "model": "unknown",
+      "size": 8,
+      "storage": "SSD",
+      "vendor": "Unknown"
     }
   ],
   "supported_job_types": {
diff --git a/input/grid5000/disks.yaml b/input/grid5000/disks.yaml
index 1d411c3ef89..0013acdb5cc 100644
--- a/input/grid5000/disks.yaml
+++ b/input/grid5000/disks.yaml
@@ -45,6 +45,7 @@ disk_vendor_model_mapping:
       - ST600MM0088
       - ST600MP0005
       - ST600MP0036
+      - ST600MM0069
       - ST2000NX0463
       - ST4000NM0295
       - ST8000NM0185
diff --git a/input/grid5000/sites/sophia/clusters/mercantour5/mercantour5.yaml b/input/grid5000/sites/sophia/clusters/mercantour5/mercantour5.yaml
index 2a0277f4a7d..243fbba8a3f 100644
--- a/input/grid5000/sites/sophia/clusters/mercantour5/mercantour5.yaml
+++ b/input/grid5000/sites/sophia/clusters/mercantour5/mercantour5.yaml
@@ -30,10 +30,14 @@ nodes:
         mountable: true
         mounted: true
     storage_devices:
-      disk0: # This field will have to be renamed later.
+      disk0:
         id: disk0
         interface: SAS
-        by_path: "/dev/disk/by-path/dummy" # this path will have to change later.
+        by_path: "/dev/disk/by-path/pci-0000:3b:00.0-scsi-0:2:0:0"
+      disk1:
+        id: disk1
+        interface: SSD
+        by_path: "/dev/disk/by-path/pci-0000:3b:00.0-scsi-0:2:1:0"
     software:
       standard-environment: debian11-x64-std
     management_tools:
diff --git a/input/grid5000/sites/sophia/clusters/mercantour5/nodes.yaml.erb b/input/grid5000/sites/sophia/clusters/mercantour5/nodes.yaml.erb
index b7c9a0c5b70..eb1a6179578 100644
--- a/input/grid5000/sites/sophia/clusters/mercantour5/nodes.yaml.erb
+++ b/input/grid5000/sites/sophia/clusters/mercantour5/nodes.yaml.erb
@@ -83,4 +83,8 @@ nodes:
         storage: SSD # Fake data, will be replaced by g5k-checks
         model: unknown # Fake data, will be replaced by g5k-checks
         size: 8 # Fake data, will be replaced by g5k-checks
+      disk1:
+        storage: SSD # Fake data, will be replaced by g5k-checks
+        model: unknown # Fake data, will be replaced by g5k-checks
+        size: 8 # Fake data, will be replaced by g5k-checks
 <% } %>
-- 
GitLab