问题描述
你好
我正在尝试为Ubuntu Linux群集自动化Azure磁盘加密. Linux集群仅支持数据卷加密,因此我将通过ARM模板添加数据磁盘,并使用base 64编码的云初始化脚本来安装添加的数据磁盘,但是在成功之后 部署-我看不到使用命令 LSBLK
装入的数据磁盘我正在ARM模板中使用 customData 变量来注入云初始化脚本.
通过模板添加数据磁盘-
"dataDisks":[
{
" diskSizeGB" ;: 1023,
"lun":0,
" createOption":空"
}
]
Cound Init脚本-#cloud-config
包装:
-lsscsi
runcmd:
#!/bin/bash
须藤-i
回声"y" | mkfs.ext4/dev/disk/azure/scsi1/lun0
UUID0 =''$(blkid -s UUID -o值/dev/disk/azure/scsi1/lun0)''
mkdir/data0
回声"UUID = $ UUID0/data0 ext4默认值,nofail,umask = 000 0 0"; >>/etc/fstab
sudo mount -a
final_message:云配置在$ UPTIME秒后完成"
这里的任何帮助将不胜感激.我想念什么吗?
谢谢
Vivek Bansod
博客 | MSDN | LinkedIn
Hello,
I am trying to automate Azure Disk Encryption for Ubuntu Linux Cluster. Linux cluster only support data volume encryption so I am adding data disk through ARM template and using base 64 encoded cloud init script to mount added data disk however after successful deployment - I don't see data disk mounted using command LSBLK
I am using customData variable in ARM template to inject cloud init script.
Add data disk through template -
"dataDisks": [
{
"diskSizeGB": 1023,
"lun": 0,
"createOption": "Empty"
}
]
Cound Init script -
#cloud-configpackages:
- lsscsi
runcmd:
#!/bin/bash
sudo -i
echo "y" | mkfs.ext4 /dev/disk/azure/scsi1/lun0
UUID0="$(blkid -s UUID -o value /dev/disk/azure/scsi1/lun0)"
mkdir /data0
echo "UUID=$UUID0 /data0 ext4 defaults,nofail,umask=000 0 0" >>/etc/fstab
sudo mount -a
final_message: "cloud-config is complete after $UPTIME seconds"
Any help here will really appreciate. Am I missing something?
Thanks
Vivek Bansod
Blog | MSDN | LinkedIn
这篇关于无法使用云初始化脚本安装添加到Linux Service Fabric集群的数据磁盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!