1. The longitudinal expansion (adding a hard disk)
1.1 adding a hard disk
OK to finish adding, running lsblk view disk usage
1.2 hard disk partition
fdisk /dev/sdb #对新硬盘sdb进行分区
m 帮助 n 添加一个分区 p 选择主分区 q 不保存退出 w 保存并退出
CenterOS7 is the default file system xfs, centerOS6 default file system is ext4
mkfs.xfs /dev/sdb1 #格式化并构建xfs文件系统
1.3 Mount
mount sub-district is mounted folder
Note: umount / dev / sdb1 / sdb1 unmounted, data partition sdb1 is not going away, but sdb1 can not access the data through a file folder, re-mount, in turn can sdb1 folder access
Because the mount after the mount is temporary, restart the virtual machine disappears, so you need to configure the boot automatically mount
vim /etc/fstab #进入配置文件
#添加一下配置
/dev/sdb1 /sdb1 xfs defaults 0 0
1.4 increasing the access node position data (hdfs-site.sh)