分盘方式一: "数据盘:总大小500G 分5块盘,每个盘100G parted /dev/sdb mklabel gpt parted /dev/sdb mkpart primary xfs 1M 100GB parted /dev/sdb mkpart primary xfs 100GB 200GB parted /dev/sdb mkpart primary xfs 200GB 300GB parted /dev/sdb mkpart primary xfs 300GB 400GB parted /dev/sdb mkpart primary xfs 400GB 500GB //加盘挂载到对应的数据目录 ls /dev/sdb?|while read name;do x=$((x+1)); echo ""$name /mnt/disk0$x xfs defaults 0 0"";done >> /etc/fstab //创建数据目录 mkdir /mnt/disk0{1,2,3,4,5} //格式化 ls /dev/sdb?|while read disk;do mkfs.xfs $disk;done //挂载 mount -a" 分盘方式二: fdisk /dev/sdb 输入:m 获取帮助 输入:n 新建分区 输入:p 显示分区表 输入:w 写入分区表 格式化分区: mkfs.ext4 /dev/hdb5