My VM's system is centos7,I have configured the hostname and IP address successfully through the cloud-init.
But I dont know how to configure the custom script,Is here anyone can help me?
For example:
      I want to format the disk-sdb,then mount it on /data.
'''
3 steps
mkfs.xfs  /dev/sdb
mount /dev/sdb /data
echo"/dev/sdb /data xfs defaults  0 0" >>/etc/fstab
'''
      How do I write this script?




zhouhao@vip.friendtimes.net