Skip to content

Commit 27658f8

Browse files
committed
Add logic to check if local NVMe SSDs in node boot-up script
Current logic would assume all the NVMe disks are data disks and applicable for reformat and mount. This will cause the issue when booting disk is also NVMe disk, which will fail the node boot up. This change will check if any additional NVMe disks are required/specified and skip the reformat step otherwise.
1 parent d8febcc commit 27658f8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cluster/gce/gci/configure-helper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,13 @@ function ensure-local-ssds() {
364364
# The following mounts or symlinks NVMe devices
365365
get-local-disk-num "nvme" "block"
366366
local nvmeblocknum="${localdisknum}"
367+
get-local-disk-num "nvme" "fs"
368+
local nvmefsnum="${localdisknum}"
369+
# Check if NVMe SSD specified.
370+
if [ "${nvmeblocknum}" -eq "0" ] && [ "${nvmefsnum}" -eq "0" ]; then
371+
echo "No local NVMe SSD specified."
372+
return
373+
fi
367374
local i=0
368375
for ssd in /dev/nvme*; do
369376
if [ -e "${ssd}" ]; then

0 commit comments

Comments
 (0)