使用的·是CentOS-7-x86-64 iso 镜像安装Linux系统。
1.添加一块硬盘——》默认SCSI——》默认20G
2.fdisk -l
3.reboot 重启
4.fdisk -l
5.fdisk /dev/sdb 分区
6.m——帮助,查看全部可查看的参数;d——删除;n——创建新的磁盘分区;p——查看分区信息。
详细操作如下:
Exersize:
1./etc/fstab
delete last 2 lines including /dev/sdb1 and dev /sdb2
2.remove extral hard disk from VM
3.reboot
4.fdisk -l to check hard disk
5.add a new disk to VM .fdisk -l to check.Added hard disk is not fount.
6.reboot
7.fdisk -l to check hard disk
8.分两个区,各为10G
fdisk /dev/sdb
n,p
9.检查partition
fdisk -ll
10.格式化
mkfs -t xfs /dev/sdb1
mkfs -t xfs /dev/sdb2
11.挂载到responding directories.
mount /dev/sdb1 /music
mount /dev/sdb2 /video
df
12.Edit /etc/fstab,adding 2 lines about /dev/sdb1 and /music, /dev/sdb2 and /video