自动分区脚本:
cat a.sh
#!/bin/bashmkdir /data1echo "np1w" | fdisk /dev/vdc && mkfs -t ext4 /dev/vdc1
添加到自动挂载:
cat auto-mount.sh
echo "UUID=`ls -l /dev/disk/by-uuid |grep vdc1 |awk '{print $9}'` /data1 ext4 defaults 0 0" >>/etc/fstabmount -arm -f a.sh