vim /etc/fstab #挂载永久生效 ############### /dev/sdb1 /work xfs defaults 0 0 ###############
ls /sys/class/scsi_host/ echo "- - -" > /sys/class/scsi_host/host0/scan echo "- - -" > /sys/class/scsi_host/host1/scan echo "- - -" > /sys/class/scsi_host/host2/scan fdisk -l #查看效果
cat /proc/scsi/scsi #查看设备ID,在最大的ID上加1.每次添加一块硬盘 echo "scsi add (有空格)-single-device 0 0 3 0" > /proc/scsi/scsi echo "scsi add (有空格)-single-device 0 0 4 0" > /proc/scsi/scsi echo "scsi add (有空格)-single-device 0 0 5 0" > /proc/scsi/scsi
#1.检查环境 getenforce (setenforce 0 #关闭) #2.分区 fdisk -l ls /sys/class/scsi_host/ echo "- - -" > /sys/class/scsi_host/host0/scan echo "- - -" > /sys/class/scsi_host/host1/scan echo "- - -" > /sys/class/scsi_host/host2/scan fdisk -l fdisk /dev/sdb fdisk -l #3.格式化 mkfs.xfs /dev/sdb1 #4.挂载 mkdir /work mount /dev/sdb1 /work/ #5.永久挂载 vim /etc/fstab ############### /dev/sdb1 /work xfs defaults 0 0 ############### #6.重启验证 reboot
具体实例请参考:、
来源:博客园
作者:无荨
链接:https://www.cnblogs.com/twoo/p/11588784.html